summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-06-12 18:47:24 +0000
committermlaier <mlaier@FreeBSD.org>2004-06-12 18:47:24 +0000
commit8a4d60fb93b14b5a3d3a50dccd975dc9b633a2e3 (patch)
tree037f7f4a3db852989b06a857dce96f3a4ffc9c77 /sys/kern/uipc_socket.c
parentdc268bcf6a44b920628b2aa0d735b2f3d95e2958 (diff)
downloadFreeBSD-src-8a4d60fb93b14b5a3d3a50dccd975dc9b633a2e3.zip
FreeBSD-src-8a4d60fb93b14b5a3d3a50dccd975dc9b633a2e3.tar.gz
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.
Diffstat (limited to 'sys/kern/uipc_socket.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud