summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2016-11-16 06:06:04 +0000
committerdlg <dlg@openbsd.org>2016-11-16 06:06:04 +0000
commitdc039b831364682ad8fda4985a99a3756b4446eb (patch)
tree2ded43b553e496de860b94a95a2844a992c05f80 /sys/netinet/tcp_input.c
parentallocate dmamaps for every descriptor in the tx ring. (diff)
downloadwireguard-openbsd-dc039b831364682ad8fda4985a99a3756b4446eb.tar.xz
wireguard-openbsd-dc039b831364682ad8fda4985a99a3756b4446eb.zip
rework re_start and re_txeof to be more like other drivers.
the important change is to no longer account for packets and descriptors separately, instead we just deal with available descriptors on the ring. this allows us to guarantee that oactive will only be set after re_start has queued at least one packet, which in turn guarantees that the chip will interrupt in the future and run re_txeof to clear oactive. without this change it was possible for a call of re_start to almost fill the descriptor ring, followed by a second call that could fail to post a packet because it had run out of descriptors and would then set oactive. if re_txeof ran concurrently it could complete all the previously posted packets without noticing that oactive had been set and therefore needed to be cleared. in that situation oactive would be set, but nothing would be set up to clear it in the immediate future. this fixes a lockup reported by haesbaert.
Diffstat (limited to 'sys/netinet/tcp_input.c')
0 files changed, 0 insertions, 0 deletions