Skip to content

Commit

Permalink
net/bnxt: fix crash after port stop/start
Browse files Browse the repository at this point in the history
On chips like Thor, port stop/start sequence could result in a crash
in the application. This is because of false detection of a bad
opaque in the Rx completion and the subsequent kicking-in of the ring
reset code to recover from the condition.
The root cause being that the port stop/start would result in the HW
starting with fresh values, while the driver internal tracker variable
`rx_next_cons` is still pointing to a stale value.
Fix this by resetting rx_next_cons to 0 in bnxt_init_one_rx_ring()

Fixes: 03c8f2f ("net/bnxt: detect bad opaque in Rx completion")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
skotur-brcm authored and ajitkhaparde committed Aug 25, 2021
1 parent 08d4d50 commit 61cd438
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/bnxt/bnxt_rxr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
}
PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n");

/* Explicitly reset this driver internal tracker on a ring init */
rxr->rx_next_cons = 0;

return 0;
}

Expand Down

0 comments on commit 61cd438

Please sign in to comment.