netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: David Miller <davem@davemloft.net>, Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: qualcomm: rmnet: Support recycling frames to real device
Date: Fri, 27 Oct 2017 18:19:13 -0700	[thread overview]
Message-ID: <CAKgT0UfDRavM+vNiegMyDiDNiuTt2wg39J9L_S2AepV3eVVgKA@mail.gmail.com> (raw)
In-Reply-To: <e5781ccadd670fd3ddf07f0e3fff1256@codeaurora.org>

On Fri, Oct 27, 2017 at 3:22 PM, Subash Abhinov Kasiviswanathan
<subashab@codeaurora.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

  reply	other threads:[~2017-10-28  1:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 20:30 [PATCH net-next] net: qualcomm: rmnet: Support recycling frames to real device Subash Abhinov Kasiviswanathan
2017-10-27 21:00 ` Alexander Duyck
2017-10-27 22:22   ` Subash Abhinov Kasiviswanathan
2017-10-28  1:19     ` Alexander Duyck [this message]
2017-11-01  2:55 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKgT0UfDRavM+vNiegMyDiDNiuTt2wg39J9L_S2AepV3eVVgKA@mail.gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=subashab@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).