[PATCH 42/54] net/bnxt: packet drop after port stop and start
Manish Kurup
manish.kurup at broadcom.com
Tue Sep 30 02:35:52 CEST 2025
From: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
The packets are getting dropped if some of the queues are configured
to stop and if the bnxt driver is reset due to port stop all and
port start all then when the bnxt driver comes up, the driver is
overwriting the queue configuration to operationally started
instead of stopping the queues that was previously stopped. The
stopped queues were getting added to the rss context resulting in
the packet drops.
Added a fix to address this issue, the rxq structure is not cleared
during the stop and start process and retains the context, that flag
is used to set the queue state. Thus stopped queues shall not be added
to the rss context on recovery from a stop and start. The queues that
were configured to be stopped have to explicitly started to see
traffic on those queues.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough at broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index efecbba2c3..c92e335a51 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -925,11 +925,13 @@ static int bnxt_start_nic(struct bnxt *bp)
for (j = 0; j < bp->rx_nr_rings; j++) {
struct bnxt_rx_queue *rxq = bp->rx_queues[j];
+ __rte_assume(j < RTE_MAX_QUEUES_PER_PORT);
+ /* If not deferred start then change only the state of the */
+ /* queue based on the queue rx_started flag */
if (!rxq->rx_deferred_start) {
- __rte_assume(j < RTE_MAX_QUEUES_PER_PORT);
- bp->eth_dev->data->rx_queue_state[j] =
+ if (rxq->rx_started)
+ bp->eth_dev->data->rx_queue_state[j] =
RTE_ETH_QUEUE_STATE_STARTED;
- rxq->rx_started = true;
}
}
--
2.39.5 (Apple Git-154)
More information about the dev
mailing list