* [PATCH v2] common/idpf: fix memory leak on AVX512 TX queue close [not found] <20230531013955.1069485-1-wenjun1.wu@intel.com> @ 2023-06-09 10:54 ` Wenjun Wu 2023-06-14 5:54 ` Zhang, Qi Z 0 siblings, 1 reply; 2+ messages in thread From: Wenjun Wu @ 2023-06-09 10:54 UTC (permalink / raw) To: dev, jingjing.wu, beilei.xing, qi.z.zhang; +Cc: Wenjun Wu, stable 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@dpdk.org Signed-off-by: Wenjun Wu <wenjun1.wu@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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH v2] common/idpf: fix memory leak on AVX512 TX queue close 2023-06-09 10:54 ` [PATCH v2] common/idpf: fix memory leak on AVX512 TX queue close Wenjun Wu @ 2023-06-14 5:54 ` Zhang, Qi Z 0 siblings, 0 replies; 2+ messages in thread From: Zhang, Qi Z @ 2023-06-14 5:54 UTC (permalink / raw) To: Wu, Wenjun1, dev, Wu, Jingjing, Xing, Beilei; +Cc: stable > -----Original Message----- > From: Wu, Wenjun1 <wenjun1.wu@intel.com> > Sent: Friday, June 9, 2023 6:54 PM > To: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei > <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com> > Cc: Wu, Wenjun1 <wenjun1.wu@intel.com>; stable@dpdk.org > Subject: [PATCH v2] common/idpf: fix memory leak on AVX512 TX queue > close > > 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@dpdk.org > > Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Applied to dpdk-next-net-intel. Thanks Qi ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-14 5:54 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20230531013955.1069485-1-wenjun1.wu@intel.com> 2023-06-09 10:54 ` [PATCH v2] common/idpf: fix memory leak on AVX512 TX queue close Wenjun Wu 2023-06-14 5:54 ` Zhang, Qi Z
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).