diff options
author | 2016-11-16 06:06:04 +0000 | |
---|---|---|
committer | 2016-11-16 06:06:04 +0000 | |
commit | dc039b831364682ad8fda4985a99a3756b4446eb (patch) | |
tree | 2ded43b553e496de860b94a95a2844a992c05f80 /sys/netinet/tcp_input.c | |
parent | allocate dmamaps for every descriptor in the tx ring. (diff) | |
download | wireguard-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