patch 'app/regex: fix mbuf size for multi-segment buffer' has been queued to stable release 21.11.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Jul 6 22:35:05 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.2

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/08/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/kevintraynor/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From 20ee5fbe91aa81bbd72fbb6014cd5d1bcfbf5941 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland at nvidia.com>
Date: Tue, 5 Jul 2022 11:09:16 +0300
Subject: [PATCH] app/regex: fix mbuf size for multi-segment buffer

[ upstream commit a442ca2d230209e1bbc9262abc7c871ff33ef627 ]

When allocating multi segmented buffers, and in case there is
a remainder in total buf len, the actual job len might be more
than expected job_len.

This adds additional space in the mbuf in the multi seg case,
to allow the remaining memory to be stored in one segment.

Fixes: c1d1b94eec58 ("app/regex: fix number of matches")

Signed-off-by: Raslan Darawsheh <rasland at nvidia.com>
Acked-by: Ori Kam <orika at nvidia.com>
---
 app/test-regex/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index 564025bceb..ca0b0a5d6a 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -415,8 +415,8 @@ run_regex(void *args)
 	mbuf_mp = rte_pktmbuf_pool_create(mbuf_pool,
 			rte_align32pow2(nb_jobs * nb_qps * nb_segs),
 			0, 0, (nb_segs == 1) ? MBUF_SIZE :
-			(rte_align32pow2(job_len) / nb_segs +
-			RTE_PKTMBUF_HEADROOM),
+			(rte_align32pow2(job_len + (data_len % nb_jobs)) /
+			 nb_segs + RTE_PKTMBUF_HEADROOM),
 			rte_socket_id());
 	if (mbuf_mp == NULL) {
 		printf("Error, can't create memory pool\n");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-06 21:07:54.589976634 +0100
+++ 0030-app-regex-fix-mbuf-size-for-multi-segment-buffer.patch	2022-07-06 21:07:53.583519475 +0100
@@ -1 +1 @@
-From a442ca2d230209e1bbc9262abc7c871ff33ef627 Mon Sep 17 00:00:00 2001
+From 20ee5fbe91aa81bbd72fbb6014cd5d1bcfbf5941 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a442ca2d230209e1bbc9262abc7c871ff33ef627 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index fe90e11313..351c36a879 100644
+index 564025bceb..ca0b0a5d6a 100644
@@ -26 +27 @@
-@@ -412,8 +412,8 @@ run_regex(void *args)
+@@ -415,8 +415,8 @@ run_regex(void *args)


More information about the stable mailing list