patch 'test/crypto: fix mbuf segment number' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 26 14:09:41 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

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/02/26. 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/6b1f4a4fa6d2da30f50001d89a8186fac3c7deff

Thanks.

Kevin

---
>From 6b1f4a4fa6d2da30f50001d89a8186fac3c7deff Mon Sep 17 00:00:00 2001
From: Nithinsen Kaithakadan <nkaithakadan at marvell.com>
Date: Fri, 23 Jan 2026 10:51:23 +0000
Subject: [PATCH] test/crypto: fix mbuf segment number

[ upstream commit 42be4215de63144a80dce80fa5bc61843043abac ]

Fix mbuf sanity check failures by updating nb_segs
field after mbuf allocation. Without this update, the
append function fails due to incorrect segment count.

Fixes: dcdd01691f39 ("test/crypto: add GMAC SGL")
Fixes: 43220096d66a ("test/crypto: add PDCP cases for scatter gather")
Fixes: f3dbf94be60c ("app/test: check SGL on QAT")

Signed-off-by: Nithinsen Kaithakadan <nkaithakadan at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 app/test/test_cryptodev.c | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 3269583f74..ed9a0fb5b5 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -9717,5 +9717,4 @@ test_pdcp_proto_SGL(int i, int oop,
 	int to_trn = 0;
 	int to_trn_tbl[16];
-	int segs = 1;
 	unsigned int trn_data = 0;
 	struct rte_cryptodev_info dev_info;
@@ -9786,5 +9785,4 @@ test_pdcp_proto_SGL(int i, int oop,
 
 	while (trn_data < input_vec_len) {
-		++segs;
 		to_trn = (input_vec_len - trn_data < fragsz) ?
 				(input_vec_len - trn_data) : fragsz;
@@ -9794,4 +9792,5 @@ test_pdcp_proto_SGL(int i, int oop,
 		buf->next = rte_pktmbuf_alloc(ts_params->mbuf_pool);
 		buf = buf->next;
+		ut_params->ibuf->nb_segs++;
 
 		memset(rte_pktmbuf_mtod(buf, uint8_t *), 0,
@@ -9803,4 +9802,5 @@ test_pdcp_proto_SGL(int i, int oop,
 					rte_pktmbuf_alloc(ts_params->mbuf_pool);
 			buf_oop = buf_oop->next;
+			ut_params->obuf->nb_segs++;
 			memset(rte_pktmbuf_mtod(buf_oop, uint8_t *),
 					0, rte_pktmbuf_tailroom(buf_oop));
@@ -9817,7 +9817,4 @@ test_pdcp_proto_SGL(int i, int oop,
 	}
 
-	ut_params->ibuf->nb_segs = segs;
-
-	segs = 1;
 	if (fragsz_oop && oop) {
 		to_trn = 0;
@@ -9826,5 +9823,4 @@ test_pdcp_proto_SGL(int i, int oop,
 		trn_data = frag_size_oop;
 		while (trn_data < output_vec_len) {
-			++segs;
 			to_trn =
 				(output_vec_len - trn_data <
@@ -9838,4 +9834,5 @@ test_pdcp_proto_SGL(int i, int oop,
 				rte_pktmbuf_alloc(ts_params->mbuf_pool);
 			buf_oop = buf_oop->next;
+			ut_params->obuf->nb_segs++;
 			memset(rte_pktmbuf_mtod(buf_oop, uint8_t *),
 					0, rte_pktmbuf_tailroom(buf_oop));
@@ -9844,5 +9841,4 @@ test_pdcp_proto_SGL(int i, int oop,
 			trn_data += to_trn;
 		}
-		ut_params->obuf->nb_segs = segs;
 	}
 
@@ -15869,5 +15865,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
 	unsigned int trn_data = 0;
 	void *digest_mem = NULL;
-	uint32_t segs = 1;
 	unsigned int to_trn = 0;
 	struct rte_mbuf *buf = NULL;
@@ -15930,5 +15925,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
 
 	while (trn_data < tdata->plaintext.len) {
-		++segs;
 		to_trn = (tdata->plaintext.len - trn_data < fragsz) ?
 				(tdata->plaintext.len - trn_data) : fragsz;
@@ -15936,4 +15930,5 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
 		buf->next = rte_pktmbuf_alloc(ts_params->mbuf_pool);
 		buf = buf->next;
+		ut_params->ibuf->nb_segs++;
 
 		memset(rte_pktmbuf_mtod(buf, uint8_t *), 0,
@@ -15953,5 +15948,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
 		}
 	}
-	ut_params->ibuf->nb_segs = segs;
 
 	/*
@@ -17106,5 +17100,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 	int to_trn = 0;
 	int to_trn_tbl[SGL_MAX_NO];
-	int segs = 1;
 	unsigned int trn_data = 0;
 	uint8_t *plaintext, *ciphertext, *auth_tag;
@@ -17231,5 +17224,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 
 	while (trn_data < tdata->plaintext.len) {
-		++segs;
 		to_trn = (tdata->plaintext.len - trn_data < fragsz) ?
 				(tdata->plaintext.len - trn_data) : fragsz;
@@ -17239,4 +17231,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 		buf->next = rte_pktmbuf_alloc(ts_params->mbuf_pool);
 		buf = buf->next;
+		ut_params->ibuf->nb_segs++;
 
 		memset(rte_pktmbuf_mtod(buf, uint8_t *), 0,
@@ -17248,4 +17241,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 					rte_pktmbuf_alloc(ts_params->mbuf_pool);
 			buf_oop = buf_oop->next;
+			ut_params->obuf->nb_segs++;
 			memset(rte_pktmbuf_mtod(buf_oop, uint8_t *),
 					0, rte_pktmbuf_tailroom(buf_oop));
@@ -17277,7 +17271,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 	uint64_t digest_phys = 0;
 
-	ut_params->ibuf->nb_segs = segs;
-
-	segs = 1;
 	if (fragsz_oop && oop) {
 		to_trn = 0;
@@ -17295,5 +17286,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 		trn_data = frag_size_oop;
 		while (trn_data < tdata->plaintext.len) {
-			++segs;
 			to_trn =
 				(tdata->plaintext.len - trn_data <
@@ -17307,4 +17297,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 					rte_pktmbuf_alloc(ts_params->mbuf_pool);
 			TEST_ASSERT_NOT_NULL(buf_oop->next, "Unexpected end of chain");
+			ut_params->obuf->nb_segs++;
 			buf_oop = buf_oop->next;
 			memset(rte_pktmbuf_mtod(buf_oop, uint8_t *),
@@ -17320,6 +17311,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 			}
 		}
-
-		ut_params->obuf->nb_segs = segs;
 	}
 
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-26 10:16:50.927579021 +0000
+++ 0099-test-crypto-fix-mbuf-segment-number.patch	2026-02-26 10:16:47.052459679 +0000
@@ -1 +1 @@
-From 42be4215de63144a80dce80fa5bc61843043abac Mon Sep 17 00:00:00 2001
+From 6b1f4a4fa6d2da30f50001d89a8186fac3c7deff Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42be4215de63144a80dce80fa5bc61843043abac ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index b0a4b46743..a60983c6b7 100644
+index 3269583f74..ed9a0fb5b5 100644
@@ -25 +26 @@
-@@ -9718,5 +9718,4 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9717,5 +9717,4 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -31 +32 @@
-@@ -9787,5 +9786,4 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9786,5 +9785,4 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -37 +38 @@
-@@ -9795,4 +9793,5 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9794,4 +9792,5 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -43 +44 @@
-@@ -9804,4 +9803,5 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9803,4 +9802,5 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -49 +50 @@
-@@ -9818,7 +9818,4 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9817,7 +9817,4 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -57 +58 @@
-@@ -9827,5 +9824,4 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9826,5 +9823,4 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -63 +64 @@
-@@ -9839,4 +9835,5 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9838,4 +9834,5 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -69 +70 @@
-@@ -9845,5 +9842,4 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9844,5 +9841,4 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -75 +76 @@
-@@ -15870,5 +15866,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
+@@ -15869,5 +15865,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
@@ -81 +82 @@
-@@ -15931,5 +15926,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
+@@ -15930,5 +15925,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
@@ -87 +88 @@
-@@ -15937,4 +15931,5 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
+@@ -15936,4 +15930,5 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
@@ -93 +94 @@
-@@ -15954,5 +15949,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
+@@ -15953,5 +15948,4 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
@@ -99 +100 @@
-@@ -17107,5 +17101,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17106,5 +17100,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -105 +106 @@
-@@ -17232,5 +17225,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17231,5 +17224,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -111 +112 @@
-@@ -17240,4 +17232,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17239,4 +17231,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -117 +118 @@
-@@ -17249,4 +17242,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17248,4 +17241,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -123 +124 @@
-@@ -17278,7 +17272,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17277,7 +17271,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -131 +132 @@
-@@ -17296,5 +17287,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17295,5 +17286,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -137 +138 @@
-@@ -17308,4 +17298,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17307,4 +17297,5 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -143 +144 @@
-@@ -17321,6 +17312,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17320,6 +17311,4 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,



More information about the stable mailing list