[PATCH 6/6] net/nfb: stop only started queues in fail path

spinler
2026-01-15T14:02:43Z

The driver should stop only running queues in case of error
inside eth_dev_start.

Signed-off-by: Martin Spinler <spinler@cesnet.cz>
---
drivers/net/nfb/nfb_ethdev.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c
index 3bd9cab5fa..2d36a0a7dd 100644
--- a/drivers/net/nfb/nfb_ethdev.c
+++ b/drivers/net/nfb/nfb_ethdev.c
@@ -140,11 +140,12 @@ nfb_eth_dev_start(struct rte_eth_dev *dev)
return 0;

err_tx:
- for (i = 0; i < nb_tx; i++)
- nfb_eth_tx_queue_stop(dev, i);
+ for (; i > 0; i--)
+ nfb_eth_tx_queue_stop(dev, i-1);
+ i = nb_rx;
err_rx:
- for (i = 0; i < nb_rx; i++)
- nfb_eth_rx_queue_stop(dev, i);
+ for (; i > 0; i--)
+ nfb_eth_rx_queue_stop(dev, i-1);
return ret;
}

--
2.52.0