patch 'net/memif: fix overwriting of head segment' has been queued to stable release 20.11.6

Xueming Li xuemingl at nvidia.com
Tue Jun 21 10:02:28 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.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 06/23/22. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/89f54969e74601b49c90389df682b329c5a3776b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 89f54969e74601b49c90389df682b329c5a3776b Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong at arm.com>
Date: Wed, 25 May 2022 05:56:35 +0000
Subject: [PATCH] net/memif: fix overwriting of head segment
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]

The 'dst_off' was reset in multi segment case.
This caused memif buffer segment to write to
beginning of mbuf, overwriting previous data.
Fix it with this patch.

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

Reported-by: Ferruh Yigit <ferruh.yigit at xilinx.com>
Signed-off-by: Joyce Kong <joyce.kong at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
---
 drivers/net/memif/rte_eth_memif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 3dc357aef3..642c44d4ac 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -349,13 +349,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			goto no_free_bufs;
 		mbuf = mbuf_head;
 		mbuf->port = mq->in_port;
+		dst_off = 0;
 
 next_slot:
 		s0 = cur_slot & mask;
 		d0 = &ring->desc[s0];
 
 		src_len = d0->length;
-		dst_off = 0;
 		src_off = 0;
 
 		do {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.968686050 +0800
+++ 0082-net-memif-fix-overwriting-of-head-segment.patch	2022-06-21 15:37:49.167785046 +0800
@@ -1 +1 @@
-From 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c Mon Sep 17 00:00:00 2001
+From 89f54969e74601b49c90389df682b329c5a3776b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 587ad45576..dd951b8296 100644
+index 3dc357aef3..642c44d4ac 100644
@@ -25 +27 @@
-@@ -348,13 +348,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -349,13 +349,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)


More information about the stable mailing list