patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' has been queued to stable release 21.11.7

Kevin Traynor ktraynor at redhat.com
Tue Mar 5 16:34:28 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/24. 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://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/18fb9b63a8efdfdb26512bfcfe72bc19cf9f86d9

Thanks.

Kevin

---
>From 18fb9b63a8efdfdb26512bfcfe72bc19cf9f86d9 Mon Sep 17 00:00:00 2001
From: Wathsala Vithanage <wathsala.vithanage at arm.com>
Date: Wed, 14 Feb 2024 00:36:16 +0000
Subject: [PATCH] net/memif: fix extra mbuf refcnt update in zero copy Tx

[ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ]

The refcnt update of stored mbufs in memif driver is redundant since
those mbufs are only freed in eth_memif_tx_zc(). No other place can
free those stored mbufs quietly. By removing this redundant update
single core dpdk memif performance can be improved by 7.5%.

testpmd stats on Arm Neoverse N1 (Ampere Altra)
+-----------------------------+-----------------------+
|        | With refcnt update | Without refcnt update |
+--------+--------------------+-----------------------+
| Rx-pps |      2748851       |         2955487       |
+--------+--------------------+-----------------------+
| Tx-pps |      2748812       |         2955436       |
+--------+--------------------+-----------------------+

Fixes: 43b815d88188 ("net/memif: support zero-copy slave")

Signed-off-by: Liangxing Wang <liangxing.wang at arm.com>
Signed-off-by: Wathsala Vithanage <wathsala.vithanage at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 .mailmap                          | 1 +
 drivers/net/memif/rte_eth_memif.c | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index af1a1103cb..5891d511a4 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1453,4 +1453,5 @@ Wang Sheng-Hui <shhuiw at gmail.com>
 Wangyu (Eric) <seven.wangyu at huawei.com>
 Waterman Cao <waterman.cao at intel.com>
+Wathsala Vithanage <wathsala.vithanage at arm.com>
 Weichun Chen <weichunx.chen at intel.com>
 Wei Dai <wei.dai at intel.com>
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index abaf98c65e..88908a42a5 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -265,6 +265,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
 	while (mq->last_tail != cur_tail) {
 		RTE_MBUF_PREFETCH_TO_FREE(mq->buffers[(mq->last_tail + 1) & mask]);
-		/* Decrement refcnt and free mbuf. (current segment) */
-		rte_mbuf_refcnt_update(mq->buffers[mq->last_tail & mask], -1);
 		rte_pktmbuf_free_seg(mq->buffers[mq->last_tail & mask]);
 		mq->last_tail++;
@@ -711,8 +709,4 @@ next_in_chain:
 	/* store pointer to mbuf to free it later */
 	mq->buffers[slot & mask] = mbuf;
-	/* Increment refcnt to make sure the buffer is not freed before server
-	 * receives it. (current segment)
-	 */
-	rte_mbuf_refcnt_update(mbuf, 1);
 	/* populate descriptor */
 	d0 = &ring->desc[slot & mask];
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.955732512 +0000
+++ 0055-net-memif-fix-extra-mbuf-refcnt-update-in-zero-copy-.patch	2024-03-05 14:08:54.698520892 +0000
@@ -1 +1 @@
-From aa3e97fcb55d7b68fef864aa76078bdae375ad3d Mon Sep 17 00:00:00 2001
+From 18fb9b63a8efdfdb26512bfcfe72bc19cf9f86d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -33 +34 @@
-index e040e2219b..b2d0fc0729 100644
+index af1a1103cb..5891d511a4 100644
@@ -36 +37 @@
-@@ -1519,4 +1519,5 @@ Wang Sheng-Hui <shhuiw at gmail.com>
+@@ -1453,4 +1453,5 @@ Wang Sheng-Hui <shhuiw at gmail.com>
@@ -43 +44 @@
-index 6f45a00172..18377d9caf 100644
+index abaf98c65e..88908a42a5 100644
@@ -46 +47 @@
-@@ -266,6 +266,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
+@@ -265,6 +265,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
@@ -53 +54 @@
-@@ -826,8 +824,4 @@ next_in_chain:
+@@ -711,8 +709,4 @@ next_in_chain:



More information about the stable mailing list