patch 'common/idpf: fix memory leak on AVX512 Tx queue close' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Thu Aug 10 01:48:00 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=520330cbb1764754866e416e04bb5abae3400923

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 520330cbb1764754866e416e04bb5abae3400923 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu at intel.com>
Date: Fri, 9 Jun 2023 18:54:05 +0800
Subject: [PATCH] common/idpf: fix memory leak on AVX512 Tx queue close
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit b28f22e8709661fb9927c8121bbd4257ddd9202a ]

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")

Signed-off-by: Wenjun Wu <wenjun1.wu at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/idpf/idpf_rxtx_vec_avx512.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/idpf/idpf_rxtx_vec_avx512.c b/drivers/net/idpf/idpf_rxtx_vec_avx512.c
index fb2b6bb53c..f31582f5fd 100644
--- a/drivers/net/idpf/idpf_rxtx_vec_avx512.c
+++ b/drivers/net/idpf/idpf_rxtx_vec_avx512.c
@@ -843,6 +843,10 @@ idpf_singleq_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_singleq_tx_vec_ops = {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.233333400 +0800
+++ 0038-common-idpf-fix-memory-leak-on-AVX512-Tx-queue-close.patch	2023-08-09 21:51:18.174352000 +0800
@@ -1 +1 @@
-From b28f22e8709661fb9927c8121bbd4257ddd9202a Mon Sep 17 00:00:00 2001
+From 520330cbb1764754866e416e04bb5abae3400923 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit b28f22e8709661fb9927c8121bbd4257ddd9202a ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -17 +19 @@
- drivers/common/idpf/idpf_common_rxtx_avx512.c | 4 ++++
+ drivers/net/idpf/idpf_rxtx_vec_avx512.c | 4 ++++
@@ -20,5 +22,5 @@
-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)
+diff --git a/drivers/net/idpf/idpf_rxtx_vec_avx512.c b/drivers/net/idpf/idpf_rxtx_vec_avx512.c
+index fb2b6bb53c..f31582f5fd 100644
+--- a/drivers/net/idpf/idpf_rxtx_vec_avx512.c
++++ b/drivers/net/idpf/idpf_rxtx_vec_avx512.c
+@@ -843,6 +843,10 @@ idpf_singleq_tx_release_mbufs_avx512(struct idpf_tx_queue *txq)
@@ -34 +36 @@
- static const struct idpf_txq_ops avx512_tx_vec_ops = {
+ static const struct idpf_txq_ops avx512_singleq_tx_vec_ops = {


More information about the stable mailing list