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

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:54:37 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/8abcce84f2eece557cbc254dd83c2bac9a7d137a

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 8abcce84f2eece557cbc254dd83c2bac9a7d137a 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

[ 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 fddf84a8fd..10aebadbd0 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -334,13 +334,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.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.960499353 +0200
+++ 0042-net-memif-fix-overwriting-of-head-segment.patch	2022-07-07 09:54:10.913824296 +0200
@@ -1 +1 @@
-From 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c Mon Sep 17 00:00:00 2001
+From 8abcce84f2eece557cbc254dd83c2bac9a7d137a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 587ad45576..dd951b8296 100644
+index fddf84a8fd..10aebadbd0 100644
@@ -25 +26 @@
-@@ -348,13 +348,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -334,13 +334,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)


More information about the stable mailing list