1
0
Fork 0
alistair23-linux/net/sched
Stephen Hemminger bea3348eef [NET]: Make NAPI polling independent 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, Roland Dreier,
Michael Chan, Jeff Garzik, and Jamal Hadi Salim.

Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.

[ Ported to current tree and all drivers converted.  Integrated
  Stephen's follow-on kerneldoc additions, and restored poll_list
  handling to the old style to fix mutual exclusion issues.  -DaveM ]

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:47:45 -07:00
..
Kconfig [PKT_SCHED]: Some typo fixes in net/sched/Kconfig 2007-07-18 02:00:04 -07:00
Makefile [NET_SCHED]: Kill CONFIG_NET_CLS_POLICE 2007-07-15 00:03:05 -07:00
act_api.c [NET_SCHED] protect action config/dump from irqs 2007-09-14 16:43:05 -07:00
act_gact.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
act_ipt.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
act_mirred.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
act_pedit.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
act_police.c [NET_SCHED] protect action config/dump from irqs 2007-09-14 16:43:05 -07:00
act_simple.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_api.c [NET_SCHED]: Kill CONFIG_NET_CLS_POLICE 2007-07-15 00:03:05 -07:00
cls_basic.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_fw.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_route.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_rsvp.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_rsvp.h [NETLINK]: Use nlmsg_trim() where appropriate 2007-04-25 22:26:37 -07:00
cls_rsvp6.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_tcindex.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_u32.c [PKT_SCHED] cls_u32: error code isn't been propogated properly 2007-10-07 23:57:45 -07:00
em_cmp.c [NET_SCHED]: ematch: module autoloading 2007-07-11 19:46:26 -07:00
em_meta.c [NET_SCHED]: ematch: module autoloading 2007-07-11 19:46:26 -07:00
em_nbyte.c [NET_SCHED]: ematch: module autoloading 2007-07-11 19:46:26 -07:00
em_text.c [NET_SCHED]: ematch: module autoloading 2007-07-11 19:46:26 -07:00
em_u32.c [NET_SCHED]: ematch: module autoloading 2007-07-11 19:46:26 -07:00
ematch.c [NET_SCHED]: ematch: module autoloading 2007-07-11 19:46:26 -07:00
sch_api.c [NET]: Fix sch_api to properly set sch->parent on the root. 2007-07-31 02:28:19 -07:00
sch_atm.c [ATM]: Replacing kmalloc/memset combination with kzalloc. 2007-07-18 01:46:51 -07:00
sch_blackhole.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
sch_cbq.c [PKT_SCHED]: sch_cbq.c: Shut up uninitialized variable warning 2007-09-16 14:54:05 -07:00
sch_dsmark.c [NET_SCHED]: Kill CONFIG_NET_CLS_POLICE 2007-07-15 00:03:05 -07:00
sch_fifo.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
sch_generic.c [NET]: Make NAPI polling independent of struct net_device objects. 2007-10-10 16:47:45 -07:00
sch_gred.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
sch_hfsc.c [NET_SCHED]: Kill CONFIG_NET_CLS_POLICE 2007-07-15 00:03:05 -07:00
sch_htb.c [NET_SCHED]: Kill CONFIG_NET_CLS_POLICE 2007-07-15 00:03:05 -07:00
sch_ingress.c [NET_SCHED]: Fix prio/ingress classification logic error 2007-07-31 02:28:18 -07:00
sch_netem.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
sch_prio.c [NET_SCHED] sch_prio.c: remove duplicate call of tc_classify() 2007-08-30 22:35:46 -07:00
sch_red.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
sch_sfq.c [SFQ]: Remove artificial limitation for queue limit. 2007-10-01 21:01:23 -07:00
sch_tbf.c [NET_SCHED]: Kill CONFIG_NET_CLS_POLICE 2007-07-15 00:03:05 -07:00
sch_teql.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00