[dpdk-dev] [PATCH 1/2] net/bnxt: fix freeing aggregation rings
Kalesh A P
kalesh-anakkur.purayil at broadcom.com
Sat Oct 30 05:50:19 CEST 2021
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
During port stop, we clear "eth_dev->data->scattered_rx" at the
beginning. As a result, in bnxt_free_hwrm_rx_ring() the check
bnxt_need_agg_ring() returns false and we end up not freeing
the Rx aggregation rings which results in resource leak in the FW.
Fixes: 657c2a7f1dd4 ("net/bnxt: create aggregation rings when needed")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 668e3aa..91f114e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1476,7 +1476,6 @@ static int bnxt_dev_stop(struct rte_eth_dev *eth_dev)
int ret;
eth_dev->data->dev_started = 0;
- eth_dev->data->scattered_rx = 0;
/* Prevent crashes when queues are still in use */
eth_dev->rx_pkt_burst = &bnxt_dummy_recv_pkts;
@@ -1533,6 +1532,8 @@ static int bnxt_dev_stop(struct rte_eth_dev *eth_dev)
if (BNXT_FLOW_XSTATS_EN(bp))
bp->flow_stat->flow_count = 0;
+ eth_dev->data->scattered_rx = 0;
+
return 0;
}
--
2.10.1
More information about the dev
mailing list