Re: [PATCH] net: sfc: Fix kernel panic introduced by commit 044588b96372 ("sfc: define inner/outer csum offload TXQ types")

From: Edward Cree
Date: Wed Apr 21 2021 - 06:57:45 EST


On 20/04/2021 20:42, Yury Vostrikov wrote:
> efx_get_tx_queue(efx, qid / EFX_MAX_TXQ_PER_CHANNEL,
> qid % EFX_MAX_TXQ_PER_CHANNEL);
>
> This uses qid / EFX_MAX_TXQ_PER_CHANNEL as index inside
> efx_nic->channels[] and qid % EFX_MAX_TXQ_PER_CHANNEL as index inside
> channel->tx_queue_be_type[].
>
> Indexing into bitset mapping with modulo operation seems to oversight
> from the previous refactoring.

This should be fixed by 5b1faa92289b ("sfc: farch: fix TX queue lookup
in TX flush done handling") and 83b09a180741 ("sfc: farch: fix TX queue
lookup in TX event handling"), which were applied to 'net' this morning.
Do you see any call sites that I've missed and that remain broken?
(The one in ef100_ev_tx() is technically incorrect, but qlabel is always
0 there so it shouldn't matter.)

-ed