[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0Ufnupf=fUbivLWrMhmfkcx4f0ApZ7gS_9VK7P7J8zB1aw@mail.gmail.com>
Date: Fri, 27 Oct 2017 14:00:20 -0700
From: Alexander Duyck <alexander.duyck@...il.com>
To: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Cc: David Miller <davem@...emloft.net>, Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: qualcomm: rmnet: Support recycling frames
to real device
On Fri, Oct 27, 2017 at 1:30 PM, Subash Abhinov Kasiviswanathan
<subashab@...eaurora.org> wrote:
> For deaggregation, the real device receives a large linear skb and
> passes it on to rmnet. rmnet creates new skbs from this large frame.
>
> If the real device supports recycling, it does not need to allocate
> the large skbs during packet reception and can instead reuse them.
>
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
> ---
> drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> index 29842cc..7869fcf 100644
> --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> @@ -108,7 +108,10 @@ static void rmnet_set_skb_proto(struct sk_buff *skb)
> while ((skbn = rmnet_map_deaggregate(skb)) != NULL)
> __rmnet_map_ingress_handler(skbn, port);
>
> - consume_skb(skb);
> + if (skb->destructor)
> + skb->destructor(skb);
> + else
> + consume_skb(skb);
> } else {
> __rmnet_map_ingress_handler(skb, port);
> }
This doesn't make sense to me, maybe I am missing something. What
"real device" is setting the skb->destructor() and doing it to somehow
handle recycling? The only driver I can find that is setting
skb->desctructor() is the Chelsio drivers, and they appear to be using
it to just clean-up DMA mappings in their transmit path.
Thanks.
- Alex
Powered by blists - more mailing lists