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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 20 15:56:20 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.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 02/22/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a0fc13808b095639de35a7ebd3bfe0cc1120f267

Thanks.

Luca Boccassi

---
>From a0fc13808b095639de35a7ebd3bfe0cc1120f267 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 84b85615db..2fdbc7c24a 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -9687,7 +9687,6 @@ test_pdcp_proto_SGL(int i, int oop,
 	int ret = TEST_SUCCESS;
 	int to_trn = 0;
 	int to_trn_tbl[16];
-	int segs = 1;
 	unsigned int trn_data = 0;
 	struct rte_cryptodev_info dev_info;
 	uint64_t feat_flags;
@@ -9756,7 +9755,6 @@ 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;
 
@@ -9764,6 +9762,7 @@ 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,
 				rte_pktmbuf_tailroom(buf));
@@ -9773,6 +9772,7 @@ test_pdcp_proto_SGL(int i, int oop,
 			buf_oop->next =
 					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));
 			TEST_ASSERT_NOT_NULL(ut_params->obuf, "Output buffer not initialized");
@@ -9787,16 +9787,12 @@ test_pdcp_proto_SGL(int i, int oop,
 		trn_data += to_trn;
 	}
 
-	ut_params->ibuf->nb_segs = segs;
-
-	segs = 1;
 	if (fragsz_oop && oop) {
 		to_trn = 0;
 		ecx = 0;
 
 		trn_data = frag_size_oop;
 		while (trn_data < output_vec_len) {
-			++segs;
 			to_trn =
 				(output_vec_len - trn_data <
 						frag_size_oop) ?
@@ -9808,13 +9804,13 @@ test_pdcp_proto_SGL(int i, int oop,
 			buf_oop->next =
 				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));
 			TEST_ASSERT_NOT_NULL(rte_pktmbuf_append(ut_params->obuf, to_trn), "Failed to append to mbuf");
 
 			trn_data += to_trn;
 		}
-		ut_params->obuf->nb_segs = segs;
 	}
 
 	/* Setup Cipher Parameters */
@@ -15811,7 +15807,6 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
 	uint64_t feature_flags;
 	unsigned int trn_data = 0;
 	void *digest_mem = NULL;
-	uint32_t segs = 1;
 	unsigned int to_trn = 0;
 	struct rte_mbuf *buf = NULL;
 	uint8_t *auth_tag, *plaintext;
@@ -15872,12 +15867,12 @@ 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;
 
 		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,
 				rte_pktmbuf_tailroom(buf));
@@ -15895,7 +15890,6 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
 			TEST_ASSERT_NOT_NULL(digest_mem, "Failed to append digest data");
 		}
 	}
-	ut_params->ibuf->nb_segs = segs;
 
 	/*
 	 * Place digest at the end of the last buffer
@@ -17046,7 +17040,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 	int retval;
 	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;
 	struct rte_cryptodev_info dev_info;
@@ -17171,7 +17164,6 @@ 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;
 
@@ -17179,6 +17171,7 @@ 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,
 				rte_pktmbuf_tailroom(buf));
@@ -17188,6 +17181,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 			buf_last_oop = buf_oop->next =
 					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));
 			TEST_ASSERT_NOT_NULL(rte_pktmbuf_append(ut_params->obuf, to_trn), "Failed to append to mbuf");
@@ -17217,9 +17211,6 @@ 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;
 		ecx = 0;
@@ -17235,7 +17226,6 @@ 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 <
 						frag_size_oop) ?
@@ -17247,6 +17237,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 			buf_last_oop = buf_oop->next =
 					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 *),
 					0, rte_pktmbuf_tailroom(buf_oop));
@@ -17260,8 +17251,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 				TEST_ASSERT_NOT_NULL(digest_mem, "Failed to append auth tag");
 			}
 		}
-
-		ut_params->obuf->nb_segs = segs;
 	}
 
 	/*
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-20 14:55:46.209696034 +0000
+++ 0078-test-crypto-fix-mbuf-segment-number.patch	2026-02-20 14:55:43.284192430 +0000
@@ -1 +1 @@
-From 42be4215de63144a80dce80fa5bc61843043abac Mon Sep 17 00:00:00 2001
+From a0fc13808b095639de35a7ebd3bfe0cc1120f267 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 84b85615db..2fdbc7c24a 100644
@@ -25 +26 @@
-@@ -9717,7 +9717,6 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9687,7 +9687,6 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -33 +34 @@
-@@ -9786,7 +9785,6 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9756,7 +9755,6 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -41 +42 @@
-@@ -9794,6 +9792,7 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9764,6 +9762,7 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -49 +50 @@
-@@ -9803,6 +9802,7 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9773,6 +9772,7 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -57 +58 @@
-@@ -9817,16 +9817,12 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9787,16 +9787,12 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -74 +75 @@
-@@ -9838,13 +9834,13 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9808,13 +9804,13 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -89 +90 @@
-@@ -15869,7 +15865,6 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
+@@ -15811,7 +15807,6 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
@@ -97 +98 @@
-@@ -15930,12 +15925,12 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
+@@ -15872,12 +15867,12 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
@@ -111 +112 @@
-@@ -15953,7 +15948,6 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
+@@ -15895,7 +15890,6 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
@@ -119 +120 @@
-@@ -17106,7 +17100,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17046,7 +17040,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -127 +128 @@
-@@ -17231,7 +17224,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17171,7 +17164,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -135 +136 @@
-@@ -17239,6 +17231,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17179,6 +17171,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -143 +144 @@
-@@ -17248,6 +17241,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17188,6 +17181,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -151 +152 @@
-@@ -17277,9 +17271,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17217,9 +17211,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -161 +162 @@
-@@ -17295,7 +17286,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17235,7 +17226,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -169 +170 @@
-@@ -17307,6 +17297,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17247,6 +17237,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
@@ -177 +178 @@
-@@ -17320,8 +17311,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -17260,8 +17251,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,


More information about the stable mailing list