> -----Original Message----- > From: Yunjian Wang <[email protected]> > Sent: Wednesday, September 22, 2021 21:30 > To: [email protected] > Cc: Wang, Haiyue <[email protected]>; Xing, Beilei > <[email protected]>; Yang, Qiming > <[email protected]>; Zhang, Qi Z <[email protected]>; > [email protected]; Yunjian Wang > <[email protected]>; [email protected] > Subject: [dpdk-dev] [PATCH v3 3/4] net/i40e: fix memzone leak when > re-configure the RX/TX queues > > Normally when closing the device the queue memzone should be > freed. But the memzone will be not freed, when device setup > ops like: > > rte_eth_bond_slave_remove > -->__eth_bond_slave_remove_lock_free > ---->slave_remove > ------>rte_eth_dev_internal_reset > -------->rte_eth_dev_rx_queue_config > ---------->eth_dev_rx_queue_config > ------------>i40e_dev_rx_queue_release > rte_eth_dev_close > -->i40e_dev_close > ---->i40e_dev_free_queues > ------>i40e_dev_rx_queue_release > (not been called due to nb_rx_queues and nb_tx_queues are 0) > > And when queue number is changed to small size, the BIG memzone > queue index will be lost. This will lead to a memory leak. So we > should release the memzone when releasing queues. > > Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues") > Cc: [email protected] > > Signed-off-by: Yunjian Wang <[email protected]> > --- > drivers/net/i40e/i40e_fdir.c | 3 --- > drivers/net/i40e/i40e_rxtx.c | 8 ++++++-- > drivers/net/i40e/i40e_rxtx.h | 2 ++ > 3 files changed, 8 insertions(+), 5 deletions(-) >
Acked-by: Haiyue Wang <[email protected]> > -- > 2.23.0

