[v3,3/5] net/bnxt: fix vnic allocation failure on port toggle

Message ID 20191104225026.97569-4-ajit.khaparde@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series bnxt patchset with bug fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ajit Khaparde Nov. 4, 2019, 10:50 p.m. UTC
  From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>

bnxt_init_chip called on port start keeps incrementing rx_cosq_cnt.
Hence more vnics are allocated with less number of rings on each port
stop/start operation. Eventually vnic allocation fails due to incorrect
ring group as no ring gets allocated to the vnic.

Fixes: 84d49664b5b2 ("net/bnxt: support CoS classification")

Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 0b0ce8785..3acf66d59 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -967,6 +967,7 @@  static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	bnxt_shutdown_nic(bp);
 	bnxt_hwrm_if_change(bp, 0);
 	bp->dev_stopped = 1;
+	bp->rx_cosq_cnt = 0;
 }
 
 static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)