Re: [PATCH net] net: ena: clean up XDP TX queues when regular TX setup fails

From: Arthur Kiyanovski

Date: Wed Jun 17 2026 - 16:42:22 EST


On Tue, 16 Jun 2026 22:24:24 +0800, Dawei Feng <dawei.feng@xxxxxxxxxx> wrote:
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> index 92d149d4f091..5d05020a6d05 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> @@ -2078,14 +2090,21 @@ static int create_queues_with_size_backoff(struct ena_adapter *adapter)
> [ ... skip 17 lines ... ]
> + ena_destroy_xdp_tx_queues(adapter);
> goto err_create_tx_queues;
> + }
>
> rc = ena_setup_all_rx_resources(adapter);
> if (rc)

Thank you for submitting the fix.

I verified it on AWS.

The inline cleanup before goto is slightly non-idiomatic — kernel
style typically prefers label-based unwinding. Splitting
ena_destroy_all_tx_queues() into regular-only and XDP-only variants
would allow a clean label chain without special-case code at each call
site. But that's a larger refactor better suited for net-next; for a
targeted bug fix this is fine.

Reviewed-by: Arthur Kiyanovski <akiyano@xxxxxxxxxx>
Tested-by: Arthur Kiyanovski <akiyano@xxxxxxxxxx>

--
Arthur Kiyanovski <akiyano@xxxxxxxxxx>