From: Santoshkumar Karanappa Rastapur Date: Mon, 4 Nov 2019 10:02:38 +0000 (+0530) Subject: net/bnxt: fix VNIC allocation on port toggle X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4602a4326903059c755bdacc5065591c3f68b389;p=dpdk.git net/bnxt: fix VNIC allocation on port toggle 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 Reviewed-by: Somnath Kotur --- diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 654866b9ff..a1e9c7066e 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)