Files
linux/drivers
Simon Schippers 8a0b03058f veth: wake a stopped peer txq beyond real_num_tx_queues
Since commit dc82a33297 ("veth: apply qdisc backpressure on full
ptr_ring to reduce TX drops"), only the peer's veth_poll() wakes a txq
that veth_xmit() stopped on a full ptr_ring. veth_poll() skips txqs at
or above the peer's real_num_tx_queues.

If the peer shrinks its TX channels while such a txq is stopped, nothing
wakes it. netif_set_real_num_tx_queues() keeps its state, so once the
channels are grown back, its first skb is requeued forever. With a single
root qdisc this blocks all transmission of the device.

Look the txq up below num_tx_queues instead. Waking a txq that is not in
use is harmless.

Reproduced in virtme-ng with a UDP flood from veth0 into veth1, which has
GRO, while switching veth0 between one and two TX channels: without this
patch veth0 stopped transmitting within 11 cycles in 3 of 3 runs, with
it veth0 kept transmitting through 30 cycles in 3 of 3 runs.

Fixes: 08f566e8f8 ("veth: fix OOB txq access in veth_poll() with asymmetric queue counts")
Signed-off-by: Simon Schippers <[email protected]>
Reviewed-by: Tianyi Gao <[email protected]>
Tested-by: Tianyi Gao <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
2026-11-19 11:50:44 +01:00
..
…
…
…
…
…
…
…
…
…
2026-11-10 08:03:44 -08:00
…
…
…
…
…
…
…
…