2023-09-14 00:07:20

by naamax.meir

[permalink] [raw]
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] igc: Fix infinite initialization loop with early XDP redirect

On 9/7/2023 03:30, Vinicius Costa Gomes wrote:
> When a XDP redirect happens before the link is ready, that
> transmission will not finish and will timeout, causing an adapter
> reset. If the redirects do not stop, the adapter will not stop
> resetting.
>
> Wait for the driver to signal that there's a carrier before allowing
> transmissions to proceed.
>
> Previous code was relying that when __IGC_DOWN is cleared, the NIC is
> ready to transmit as all the queues are ready, what happens is that
> the carrier presence will only be signaled later, after the watchdog
> workqueue has a chance to run. And during this interval (between
> clearing __IGC_DOWN and the watchdog running) if any transmission
> happens the timeout is emitted (detected by igc_tx_timeout()) which
> causes the reset, with the potential for the inifite loop.
>
> Fixes: 4ff320361092 ("igc: Add support for XDP_REDIRECT action")
> Reported-by: Ferenc Fejes <[email protected]>
> Closes: https://lore.kernel.org/netdev/[email protected]/
> Signed-off-by: Vinicius Costa Gomes <[email protected]>
> Tested-by: Ferenc Fejes <[email protected]>
> Reviewed-by: Maciej Fijalkowski <[email protected]>
> ---
> v1 -> v2:
> - Added more information to the commit message (Maciej Fijalkowski)
>
>
> drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Naama Meir <[email protected]>