[dpdk-stable] patch 'net/memif: do not update local copy of tail in Tx' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:45:27 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/20. 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.

Thanks.

Luca Boccassi

---
>From 0f3cfad7f4a430d876a9c8470f58d8fb93bb00f6 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Date: Mon, 28 Sep 2020 14:03:27 -0500
Subject: [PATCH] net/memif: do not update local copy of tail in Tx

[ upstream commit 7fff1d311372d5dc850abbc5d09fe5cfc966538c ]

In the case of S2M queues, the receiver synchronizes with the sender
(i.e. informs of the packets it has received) using ring->tail.
Hence, the sender does not need to update last_tail.

In the case of M2S queues, the receiver uses last_tail to
keep track of the descriptors it has received. The
sender is not required to update the last_tail. Updating
the last_tail makes it a shared variable between the
transmitter and receiver affecting the performance.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Reviewed-by: Phil Yang <phil.yang at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia at cisco.com>
---
 drivers/net/memif/rte_eth_memif.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index aa83df3652..1c41988069 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -561,12 +561,10 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	ring_size = 1 << mq->log2_ring_size;
 	mask = ring_size - 1;
 
-	n_free = __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE) - mq->last_tail;
-	mq->last_tail += n_free;
-
 	if (type == MEMIF_RING_S2M) {
 		slot = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE);
-		n_free = ring_size - slot + mq->last_tail;
+		n_free = ring_size - slot +
+				__atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
 	} else {
 		slot = __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
 		n_free = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE) - slot;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.941435084 +0000
+++ 0168-net-memif-do-not-update-local-copy-of-tail-in-Tx.patch	2020-10-28 10:35:11.772833968 +0000
@@ -1,8 +1,10 @@
-From 7fff1d311372d5dc850abbc5d09fe5cfc966538c Mon Sep 17 00:00:00 2001
+From 0f3cfad7f4a430d876a9c8470f58d8fb93bb00f6 Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
 Date: Mon, 28 Sep 2020 14:03:27 -0500
 Subject: [PATCH] net/memif: do not update local copy of tail in Tx
 
+[ upstream commit 7fff1d311372d5dc850abbc5d09fe5cfc966538c ]
+
 In the case of S2M queues, the receiver synchronizes with the sender
 (i.e. informs of the packets it has received) using ring->tail.
 Hence, the sender does not need to update last_tail.
@@ -14,7 +16,6 @@
 transmitter and receiver affecting the performance.
 
 Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
-Cc: stable at dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
 Reviewed-by: Phil Yang <phil.yang at arm.com>
@@ -25,10 +26,10 @@
  1 file changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
-index ff8a58081f..d749b5b16c 100644
+index aa83df3652..1c41988069 100644
 --- a/drivers/net/memif/rte_eth_memif.c
 +++ b/drivers/net/memif/rte_eth_memif.c
-@@ -580,12 +580,10 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -561,12 +561,10 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
  	ring_size = 1 << mq->log2_ring_size;
  	mask = ring_size - 1;
  


More information about the stable mailing list