lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 8 Aug 2007 07:06:28 -0400
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, jgarzik@...ox.com, hadi@...erus.ca,
	rusty@...tcorp.com.au
Subject: Re: [PATCH RFC]: napi_struct V6

On Tue, 07 Aug 2007 21:54:32 -0700 (PDT)
David Miller <davem@...emloft.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@...ux-foundation.org>
> Signed-off-by: David S. Miller <davem@...emloft.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.  
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ