From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, jgarzik@pobox.com, hadi@cyberus.ca,
rusty@rustcorp.com.au
Subject: Re: [PATCH RFC]: napi_struct V6
Date: Wed, 8 Aug 2007 07:06:28 -0400 [thread overview]
Message-ID: <20070808070628.284d805c@oldman> (raw)
In-Reply-To: <20070807.215432.09951753.davem@davemloft.net>
On Tue, 07 Aug 2007 21:54:32 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
>
> Changes since V5:
>
> 1) Revert unnecessary TX locking changes in bnx2 and tg3
>
> 2) ++i
>
> This is probably what I'll check into my net-2.6.24 tree
>
> Thanks.
>
> [NET]: Make NAPI polling independant of struct net_device objects.
>
> Several devices have multiple independant RX queues per net
> device, and some have a single interrupt doorbell for several
> queues.
>
> In either case, it's easier to support layouts like that if the
> structure representing the poll is independant from the net
> device itself.
>
> The signature of the ->poll() call back goes from:
>
> int foo_poll(struct net_device *dev, int *budget)
>
> to
>
> int foo_poll(struct napi_struct *napi, int budget)
>
> The caller is returned the number of RX packets processed (or
> the number of "NAPI credits" consumed if you want to get
> abstract). The callee no longer messes around bumping
> dev->quota, *budget, etc. because that is all handled in the
> caller upon return.
>
> The napi_struct is to be embedded in the device driver private data
> structures.
>
> Furthermore, it is the driver's responsibility to disable all NAPI
> instances in it's ->stop() device close handler. Since the
> napi_struct is privatized into the driver's private data structures,
> only the driver knows how to get at all of the napi_struct instances
> it may have per-device.
>
> With lots of help and suggestions from Rusty Russell.
>
> [ Ported to current tree and all drivers converted. -DaveM ]
>
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Thanks for doing all this. Looks great.
Documentation of NAPI still needs more work. I'll take a start at getting
net_device docbook format cleaned up, then start on a redo of the API
documentation.
next prev parent reply other threads:[~2007-08-08 11:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-08 4:54 [PATCH RFC]: napi_struct V6 David Miller
2007-08-08 11:06 ` Stephen Hemminger [this message]
2007-08-08 16:27 ` Jeff Garzik
2007-08-08 23:18 ` David Miller
2007-08-09 4:36 ` 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=20070808070628.284d805c@oldman \
--to=shemminger@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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).