Re: [PATCH net-next v6 5/5] veth: time-based BQL completion coalescing via ethtool tx-usecs
From: Simon Schippers
Date: Fri May 29 2026 - 13:18:32 EST
On 5/27/26 15:54, hawk@xxxxxxxxxx wrote:
> From: Simon Schippers <simon.schippers@xxxxxxxxxxxxxx>
> + /* If the ring is now empty and the peer TX queue is stalled by DQL
> + * backpressure, release completions immediately to unblock it.
> + */
> + if (peer_txq && state->n_bql && __ptr_ring_empty(&rq->xdp_ring)) {
> + /* Pairs with smp_wmb() in __ptr_ring_produce(); ensure ring
> + * emptiness is observed before reading peer_txq->state.
> + */
> + smp_rmb();
> + if (test_bit(__QUEUE_STATE_STACK_XOFF, &peer_txq->state))
> + veth_bql_complete(state, peer_txq);
> + }
"Does this leave coalesced BQL completions pending indefinitely if the
receive ring is empty but the peer TX queue isn't stalled by DQL? [...]"
Regarding this by [1]: Yes, this is desired behavior IMO.
>From my understanding there should not be a BQL stall caused by
this (needs to be tested though).
A minor nit is that the observation of the minimum amount of
slack found over several iterations of the completion processing
(saved in dql->lowest_slack) is inaccurate and therefore the limit
might be set to a too low value once (at the next completion call).
I think it does not matter though.
Overall The AI reviews [1] [2] have some valid points.
Apart from that I would consider joining patch 2 and 5.
[1] Link: https://sashiko.dev/#/patchset/20260527135418.1166665-1-hawk%40kernel.org
[2] Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260527135418.1166665-1-hawk%40kernel.org