Sebastian Andrzej Siewior [off-list ref] writes:
On 2025-05-02 17:59:00 [+0200], Toke Høiland-Jørgensen wrote:
quoted
quoted
quoted
I had in mind moving the out: label (and the unlock) below the
skb->protocol assignment, which would save the if(skb) check; any reason
we can't call xsk_buff_free() while holding the lock?
We could do that, I wasn't entirely sure about xsk_buff_free(). It is
just larger scope but nothing else so far.
I've been staring at xsk_buff_free() and the counterparts such as
xsk_buff_alloc_batch() and I didn't really figure out what is protecting
the list. Do we rely on the fact that this is used once per-NAPI
instance within RX-NAPI and never somewhere else?
Yeah, I believe so. The commit adding the API[0] mentions this being
"single core (single producer/consumer)".
So if TX is excluded, it should work…
For the former, I have now this:
Yeah, much cleaner, thanks!
Reviewed-by: Toke Høiland-Jørgensen <redacted>