[2/2] net/bnxt: fix to reset VNIC rxq count on VNIC free

Message ID 20200423150224.27435-3-kalesh-anakkur.purayil@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series bnxt bug fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed

Commit Message

Kalesh A P April 23, 2020, 3:02 p.m. UTC
  From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

bnxt_free_one_vnic and bnxt_setup_one_vnic are called on configuring
port vlan stripping. bnxt_setup_one_vnic keeps incrementing the
vnic rx_queue_cnt. Fix to reset vnic rx_queue_cnt in bnxt_free_one_vnic.

Fixes: cfadfee41ed1 ("net/bnxt: fix VLAN strip")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1a3c7e6..ecfc765 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2173,6 +2173,8 @@  static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 	rte_free(vnic->fw_grp_ids);
 	vnic->fw_grp_ids = NULL;
 
+	vnic->rx_queue_cnt = 0;
+
 	return 0;
 }