[PATCH v2] common/idpf: fix memory leak on AVX512 TX queue close
Wenjun Wu
wenjun1.wu at intel.com
Fri Jun 9 12:54:05 CEST 2023
When releasing mbufs for TX queue software ring of AVX512,
the mbuf in the range [i, tx_tail] should also be freed.
The variable i refers to the index of the last mbuf released
in the software ring.
Fixes: 5bf87b45b2c8 ("net/idpf: add AVX512 data path for single queue model")
Cc: stable at dpdk.org
Signed-off-by: Wenjun Wu <wenjun1.wu at intel.com>
---
drivers/common/idpf/idpf_common_rxtx_avx512.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/common/idpf/idpf_common_rxtx_avx512.c b/drivers/common/idpf/idpf_common_rxtx_avx512.c
index dffb11fcf2..81312617cc 100644
--- a/drivers/common/idpf/idpf_common_rxtx_avx512.c
+++ b/drivers/common/idpf/idpf_common_rxtx_avx512.c
@@ -1601,6 +1601,10 @@ idpf_tx_release_mbufs_avx512(struct idpf_tx_queue *txq)
}
i = 0;
}
+ for (; i < txq->tx_tail; i++) {
+ rte_pktmbuf_free_seg(swr[i].mbuf);
+ swr[i].mbuf = NULL;
+ }
}
static const struct idpf_txq_ops avx512_tx_vec_ops = {
--
2.34.1
More information about the dev
mailing list