summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2017-12-15 01:37:30 +0000
committerdlg <dlg@openbsd.org>2017-12-15 01:37:30 +0000
commitea47e5e1b6d67781cc4f61bd0240820384903832 (patch)
tree0d35fede2f7923beb21bc5dc75f3687f09c448c5 /lib
parentmake sched_barrier use cond_wait/cond_signal. (diff)
downloadwireguard-openbsd-ea47e5e1b6d67781cc4f61bd0240820384903832.tar.xz
wireguard-openbsd-ea47e5e1b6d67781cc4f61bd0240820384903832.zip
add ifiqueues for mp safety and nics with multiple rx rings.
currently there is a single mbuf_queue per interface, which all rings on a nic shove packets onto. while the list inside this queue is protected by a mutex, the counters around it (ie, ipackets, ibytes, idrops) are not. this means updates can be lost, and reading the statistics is also inconsistent. having a single queue means that busy rx rings can dominate and then starve the others. ifiqueue structs are like ifqueue structs. they provide per ring queues, and independent counters for each ring. when ifdata is read for userland, these counters are aggregated. having a queue per ring now allows for per ring backpressure to be applied. MCLGETI will have it's day again. right now we assume every interface wants an input queue and unconditionally provide one. individual interfaces can opt into more. im not completely happy about the shape of this atm, but shuffling it around more makes the diff bigger. ok visa@
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions