Skip to content

Commit 8716165

Browse files
Kishore Padmanabhaajitkhaparde
authored andcommitted
net/bnxt: fix port restart
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 <[email protected]> Reviewed-by: Somnath Kotur <[email protected]> Reviewed-by: Peter Spreadborough <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Reviewed-by: Ajit Khaparde <[email protected]>
1 parent 20f09f2 commit 8716165

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/net/bnxt/bnxt_ethdev.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,11 +925,13 @@ static int bnxt_start_nic(struct bnxt *bp)
925925
for (j = 0; j < bp->rx_nr_rings; j++) {
926926
struct bnxt_rx_queue *rxq = bp->rx_queues[j];
927927

928+
__rte_assume(j < RTE_MAX_QUEUES_PER_PORT);
929+
/* If not deferred start then change only the state of the */
930+
/* queue based on the queue rx_started flag */
928931
if (!rxq->rx_deferred_start) {
929-
__rte_assume(j < RTE_MAX_QUEUES_PER_PORT);
930-
bp->eth_dev->data->rx_queue_state[j] =
932+
if (rxq->rx_started)
933+
bp->eth_dev->data->rx_queue_state[j] =
931934
RTE_ETH_QUEUE_STATE_STARTED;
932-
rxq->rx_started = true;
933935
}
934936
}
935937

0 commit comments

Comments
 (0)