Re: [RFC net-next 7/7] net/mlx5e: kTLS, Keep a TX connection on one SQ at a time
From: Tariq Toukan
Date: Tue Nov 10 2026 - 10:05:59 EST
On 10/11/2026 0:15, Rishikesh Jethwani wrote:
> This write relies on an earlier may_move check in mlx5e_select_queue(),
> without locking the old queue or rechecking wmem.
Right, I assumed the socket lock serializes selection, which doesn't
hold with an upper device's qdisc in between.
> Selection needs the same initial-claim CAS and locked handoff: recheck
> the owner and current wmem under the old queue's lock, and leave
> ownership unchanged on failure. Locking only the write leaves the wmem
> check stale. Preserve zero self-charge for non-decrypted, possibly
> partially orphaned skbs.
>
> A failed transfer can fall back to the owner's queue, updating the
> cache, if the index is in [0, real_num_tx_queues), still maps to a live
> SQ and is not a PTP index. Keep the xmit ownership guard.
Agreed, v2 does that. Selection and xmit move the connection through
one helper, as you describe, and a failed move falls back to the
owner's TX queue under those conditions. The xmit guard stays.
Thanks,
Tariq