[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0UfDRavM+vNiegMyDiDNiuTt2wg39J9L_S2AepV3eVVgKA@mail.gmail.com>
Date: Fri, 27 Oct 2017 18:19:13 -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 3:22 PM, Subash Abhinov Kasiviswanathan
<subashab@...eaurora.org> wrote:
>> 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
>
>
> Hi Alex
>
> The real device will have a pool of skbs and mark them as unused on
> initialization. It will use these skbs to copy data from hardware and
> pass them onto rmnet after marking them as used. Once rmnet is done
> processing, the callback of the real device set in the skb_destructor
> is invoked and the skb is set as unused and can be used again for
> copying data.
There is a pretty big difference between calling skb->destructor() and
freeing the buffer. My concern would be how do you deal with the
reference count issues that is going to bring up?
> There are no drivers setting the skb->destructor() in receive path
> upstream as of now but the plan is to get them there.
Okay. Got it.
Thanks.
- Alex
Powered by blists - more mailing lists