patch 'test/security: sync inline IPsec soft expiry check' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 6 12:19:59 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.11.7

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/05/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/9c16daeb4ce5aad8dd1ba1957b5d1ee1992dd301

Thanks.

Luca Boccassi

---
>From 9c16daeb4ce5aad8dd1ba1957b5d1ee1992dd301 Mon Sep 17 00:00:00 2001
From: Aarnav JP <ajp at marvell.com>
Date: Tue, 5 May 2026 16:13:50 +0530
Subject: [PATCH] test/security: sync inline IPsec soft expiry check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 910cea7b11e56fa6b146bcc20be9de0e4f2b6ab4 ]

Soft expiry events are delivered asynchronously via
the err-ring polling thread. The test checked notify_event
right after the RX loop, before the polling thread could
process the err-ring entry — causing intermittent failures
with fast algorithms where TX/RX completes faster than the
polling thread's usleep() wake-up.

Add a bounded poll loop after RX for soft expiry cases, using
rte_io_rmb() to ensure cross-core visibility. Fix store ordering
in the callback with rte_io_wmb() so that the event subtype is
visible before notify_event is set.

Fixes: 34e8a9d9b4f2 ("test/security: add inline IPsec SA soft expiry cases")

Signed-off-by: Aarnav JP <ajp at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 app/test/test_security_inline_proto.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c
index b9f3a9d923..70187889be 100644
--- a/app/test/test_security_inline_proto.c
+++ b/app/test/test_security_inline_proto.c
@@ -38,6 +38,7 @@ test_inline_ipsec_sg(void)
 
 #else
 
+#include <rte_cycles.h>
 #include <rte_eventdev.h>
 #include <rte_event_eth_rx_adapter.h>
 #include <rte_event_eth_tx_adapter.h>
@@ -1266,7 +1267,6 @@ test_ipsec_inline_sa_exp_event_callback(uint16_t port_id,
 		printf("Event descriptor not set\n");
 		return -1;
 	}
-	vector->notify_event = true;
 	if (event_desc->metadata != (uint64_t)vector->sa_data) {
 		printf("Mismatch in event specific metadata\n");
 		return -1;
@@ -1289,6 +1289,10 @@ test_ipsec_inline_sa_exp_event_callback(uint16_t port_id,
 		return -1;
 	}
 
+	/* Ensure event subtype is visible before signaling notify_event. */
+	rte_io_wmb();
+	vector->notify_event = true;
+
 	return 0;
 }
 
@@ -1435,6 +1439,16 @@ test_ipsec_inline_proto_process(struct ipsec_test_data *td,
 				break;
 		} while (j++ < 5 || nb_rx == 0);
 
+	/* Wait for soft expiry event from the err-ring poll thread. */
+	if ((flags->sa_expiry_pkts_soft || flags->sa_expiry_bytes_soft) &&
+	    td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
+		j = 0;
+		while (!vector.notify_event && j++ < 100) {
+			rte_delay_us(1000);
+			rte_io_rmb();
+		}
+	}
+
 	if (!flags->sa_expiry_pkts_hard &&
 			!flags->sa_expiry_bytes_hard &&
 			(nb_rx != nb_sent)) {
@@ -1498,10 +1512,13 @@ out:
 		destroy_default_flow(port_id);
 	if (flags->sa_expiry_pkts_soft || flags->sa_expiry_bytes_soft ||
 		flags->sa_expiry_pkts_hard || flags->sa_expiry_bytes_hard) {
-		if (vector.notify_event && (vector.event == event))
-			ret = TEST_SUCCESS;
-		else
+		if (vector.notify_event) {
+			rte_io_rmb();
+			ret = (vector.event == event) ?
+				TEST_SUCCESS : TEST_FAILED;
+		} else {
 			ret = TEST_FAILED;
+		}
 
 		rte_eth_dev_callback_unregister(port_id, RTE_ETH_EVENT_IPSEC,
 			test_ipsec_inline_sa_exp_event_callback, &vector);
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-03 12:55:46.988953866 +0100
+++ 0007-test-security-sync-inline-IPsec-soft-expiry-check.patch	2026-07-03 12:55:46.582571675 +0100
@@ -1 +1 @@
-From 910cea7b11e56fa6b146bcc20be9de0e4f2b6ab4 Mon Sep 17 00:00:00 2001
+From 9c16daeb4ce5aad8dd1ba1957b5d1ee1992dd301 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 910cea7b11e56fa6b146bcc20be9de0e4f2b6ab4 ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
@@ -31 +32 @@
-index b0cce5ebd9..5db8718a34 100644
+index b9f3a9d923..70187889be 100644
@@ -42 +43 @@
-@@ -1306,7 +1307,6 @@ test_ipsec_inline_sa_exp_event_callback(uint16_t port_id,
+@@ -1266,7 +1267,6 @@ test_ipsec_inline_sa_exp_event_callback(uint16_t port_id,
@@ -50 +51 @@
-@@ -1329,6 +1329,10 @@ test_ipsec_inline_sa_exp_event_callback(uint16_t port_id,
+@@ -1289,6 +1289,10 @@ test_ipsec_inline_sa_exp_event_callback(uint16_t port_id,
@@ -61 +62 @@
-@@ -1483,6 +1487,16 @@ test_ipsec_inline_proto_process(struct ipsec_test_data *td,
+@@ -1435,6 +1439,16 @@ test_ipsec_inline_proto_process(struct ipsec_test_data *td,
@@ -78 +79 @@
-@@ -1546,10 +1560,13 @@ out:
+@@ -1498,10 +1512,13 @@ out:


More information about the stable mailing list