patch 'net/i40e: fix AVX512 fast-free path' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:25:02 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/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/log/?h=22.11-staging/commit/91a60dfeee486a0815ed92a2e641380422a20ddc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 91a60dfeee486a0815ed92a2e641380422a20ddc Mon Sep 17 00:00:00 2001
From: Kamalakshitha Aligeri <kamalakshitha.aligeri at arm.com>
Date: Tue, 7 Mar 2023 19:32:21 +0000
Subject: [PATCH] net/i40e: fix AVX512 fast-free path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 1ad4bea0d73a7671095c2c675f9bb8b19503ac06 ]

In i40e_tx_free_bufs_avx512 fast-free path, when cache is NULL,
non fast-free path is being executed. Fixed the bug by calling
rte_mempool_generic_put API that handles the cache==NULL case.

Fixes: 5171b4ee6b6b ("net/i40e: optimize Tx by using AVX512")

Signed-off-by: Kamalakshitha Aligeri <kamalakshitha.aligeri at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Reviewed-by: Feifei Wang <feifei.wang2 at arm.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 .mailmap                                |  1 +
 drivers/net/i40e/i40e_rxtx_vec_avx512.c | 12 ++++--------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/.mailmap b/.mailmap
index da2ce216a3..cfdaeaf6a4 100644
--- a/.mailmap
+++ b/.mailmap
@@ -674,6 +674,7 @@ Kai Ji <kai.ji at intel.com>
 Kaiwen Deng <kaiwenx.deng at intel.com>
 Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Kamalakannan R <kamalakannan.r at intel.com>
+Kamalakshitha Aligeri <kamalakshitha.aligeri at arm.com>
 Kamil Bednarczyk <kamil.bednarczyk at intel.com>
 Kamil Chalupnik <kamilx.chalupnik at intel.com>
 Kamil Rytarowski <kamil.rytarowski at caviumnetworks.com>
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
index 60c97d5331..74ff54c653 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
@@ -906,16 +906,13 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
 		struct rte_mempool_cache *cache = rte_mempool_default_cache(mp,
 				rte_lcore_id());
 
-		if (!cache || cache->len == 0)
-			goto normal;
-
-		cache_objs = &cache->objs[cache->len];
-
-		if (n > RTE_MEMPOOL_CACHE_MAX_SIZE) {
-			rte_mempool_ops_enqueue_bulk(mp, (void *)txep, n);
+		if (!cache || n > RTE_MEMPOOL_CACHE_MAX_SIZE) {
+			rte_mempool_generic_put(mp, (void *)txep, n, cache);
 			goto done;
 		}
 
+		cache_objs = &cache->objs[cache->len];
+
 		/* The cache follows the following algorithm
 		 *   1. Add the objects to the cache
 		 *   2. Anything greater than the cache min value (if it
@@ -947,7 +944,6 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
 		goto done;
 	}
 
-normal:
 	m = rte_pktmbuf_prefree_seg(txep[0].mbuf);
 	if (likely(m)) {
 		free[0] = m;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:41.695634400 +0800
+++ 0114-net-i40e-fix-AVX512-fast-free-path.patch	2023-04-09 21:45:38.769042200 +0800
@@ -1 +1 @@
-From 1ad4bea0d73a7671095c2c675f9bb8b19503ac06 Mon Sep 17 00:00:00 2001
+From 91a60dfeee486a0815ed92a2e641380422a20ddc Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 1ad4bea0d73a7671095c2c675f9bb8b19503ac06 ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -26 +28 @@
-index 9578b86866..c77cdc9ddf 100644
+index da2ce216a3..cfdaeaf6a4 100644
@@ -29 +31 @@
-@@ -681,6 +681,7 @@ Kai Ji <kai.ji at intel.com>
+@@ -674,6 +674,7 @@ Kai Ji <kai.ji at intel.com>
@@ -38 +40 @@
-index d3c7bfd121..ad0893324d 100644
+index 60c97d5331..74ff54c653 100644
@@ -41 +43 @@
-@@ -783,16 +783,13 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
+@@ -906,16 +906,13 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
@@ -62 +64 @@
-@@ -824,7 +821,6 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
+@@ -947,7 +944,6 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)


More information about the stable mailing list