> -----Original Message----- > From: Yunjian Wang <wangyunj...@huawei.com> > Sent: Wednesday, September 22, 2021 21:28 > To: dev@dpdk.org > Cc: Wang, Haiyue <haiyue.w...@intel.com>; Xing, Beilei > <beilei.x...@intel.com>; Yang, Qiming > <qiming.y...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; > dingxiaoxi...@huawei.com; Yunjian Wang > <wangyunj...@huawei.com>; sta...@dpdk.org > Subject: [dpdk-dev] [PATCH v3 1/4] net/e1000: 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 > ------------>em_rx_queue_release > rte_eth_dev_close > -->eth_em_close > ---->em_dev_free_queues > ------>em_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: sta...@dpdk.org > > Signed-off-by: Yunjian Wang <wangyunj...@huawei.com> > --- > drivers/net/e1000/em_rxtx.c | 8 ++++++-- > drivers/net/e1000/igb_rxtx.c | 9 +++++++-- > 2 files changed, 13 insertions(+), 4 deletions(-) >
Acked-by: Haiyue Wang <haiyue.w...@intel.com> > -- > 2.23.0