patch 'app/crypto-perf: fix next segment mbuf' has been queued to stable release 22.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Mar 7 02:31:09 CET 2024
Hi,
FYI, your patch has been queued to stable release 22.11.5
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/09/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ebfa1610698d839a63792a47becd4b58ac397df5
Thanks.
Luca Boccassi
---
>From ebfa1610698d839a63792a47becd4b58ac397df5 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm at nvidia.com>
Date: Thu, 4 Jan 2024 10:24:05 +0800
Subject: [PATCH] app/crypto-perf: fix next segment mbuf
[ upstream commit 06a109ca5dc551631d9251e81966a4bc52f98c5a ]
In fill_multi_seg_mbuf(), when remaining_segments is 0,
rte_mbuf m's next should pointer to NULL instead of a
new rte_mbuf, that causes setting m->next as NULL out
of the while loop to the invalid mbuf.
This commit fixes the invalid mbuf next operation.
Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")
Signed-off-by: Suanming Mou <suanmingm at nvidia.com>
Acked-by: Anoob Joseph <anoobj at marvell.com>
Acked-by: Ciara Power <ciara.power at intel.com>
---
app/test-crypto-perf/cperf_test_common.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 932aab16df..b3bf9f67e8 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -49,7 +49,6 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
{
uint16_t mbuf_hdr_size = sizeof(struct rte_mbuf);
uint16_t remaining_segments = segments_nb;
- struct rte_mbuf *next_mbuf;
rte_iova_t next_seg_phys_addr = rte_mempool_virt2iova(obj) +
mbuf_offset + mbuf_hdr_size;
@@ -70,15 +69,15 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
m->nb_segs = segments_nb;
m->port = 0xff;
rte_mbuf_refcnt_set(m, 1);
- next_mbuf = (struct rte_mbuf *) ((uint8_t *) m +
- mbuf_hdr_size + segment_sz);
- m->next = next_mbuf;
- m = next_mbuf;
+
remaining_segments--;
-
+ if (remaining_segments > 0) {
+ m->next = (struct rte_mbuf *)((uint8_t *) m + mbuf_hdr_size + segment_sz);
+ m = m->next;
+ } else {
+ m->next = NULL;
+ }
} while (remaining_segments > 0);
-
- m->next = NULL;
}
static void
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-07 01:05:39.340752252 +0000
+++ 0052-app-crypto-perf-fix-next-segment-mbuf.patch 2024-03-07 01:05:34.802940101 +0000
@@ -1 +1 @@
-From 06a109ca5dc551631d9251e81966a4bc52f98c5a Mon Sep 17 00:00:00 2001
+From ebfa1610698d839a63792a47becd4b58ac397df5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06a109ca5dc551631d9251e81966a4bc52f98c5a ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list