freebsd-dev/sys/contrib
Max Laier 6ef5ab3cb5 Add an additional queue which will be "owned by the driver". This allows to
rig a PREPEND macro for ALTQ as the POLL/DEQUEUE semantic is very bad in
terms of locking. We make this a full functional queue to allow "bulk
dequeue" which will further reduce the locking overhead (for non-altq
enabled devices). Drivers will access this via the following macros, which
will show up in <net/if_var.h> once we expose ALTQ to the build:

IFQ_DRV_DEQUEUE(ifq, m)	- takes a mbuf off the queue (driver queue first)
IFQ_DRV_PREPEND(ifq, m)	- pushes a mbuf back to the driver queue
IFQ_DRV_PURGE(ifq)	- drops all packets in both queues
IFQ_DRV_IS_EMPTY(ifq)	- checks for pending mbufs in either queue

One has to make sure that the first three are protected by a driver mutex.
At the moment most network drivers still require Giant, so this is not an
issue. Even those that have thier own mutex usually hold it in if_start and
the like, so this requirement is almost always satisfied.

This evolved from a discussion with Andrew Gallatin.
2004-06-12 18:47:24 +00:00
..
altq/altq Add an additional queue which will be "owned by the driver". This allows to 2004-06-12 18:47:24 +00:00
dev Add missing #include <sys/module.h> 2004-05-30 20:34:58 +00:00
ia64/libuwx Update to BETA 7. Besides C++ support, which is irrelevant to us, 2004-05-09 03:06:25 +00:00
ipfilter/netinet Recognise NOINET6 as an indication to not build IPv6 enabled source even 2004-06-08 23:52:22 +00:00
ngatm This commit was generated by cvs2svn to compensate for changes in r122208, 2003-11-07 08:54:27 +00:00
pf "Get rid of the nested include of <sys/module.h> from <sys/kernel.h>" or 2004-05-31 22:48:19 +00:00