patch 'examples/l3fwd: fix crash on multiple sockets' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Mon Aug 12 14:50:23 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.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 08/14/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5fa2084ac31b33ccaf67c4491b6a7638178d6be4

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 5fa2084ac31b33ccaf67c4491b6a7638178d6be4 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng at intel.com>
Date: Wed, 3 Jul 2024 15:50:37 +0800
Subject: [PATCH] examples/l3fwd: fix crash on multiple sockets
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 0cf06d7d846523abd48307613d429830bfb45ac9 ]

Setting acl will clear the acl config of other sockets, which
will result in core dump.

This commit will no longer clear the acl config when setting acl.

Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")

Signed-off-by: Kaiwen Deng <kaiwenx.deng at intel.com>
Tested-by: Hongbo Li <hongbox.li at intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
 examples/l3fwd/l3fwd_acl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index d9e4ae543f..a1d87f4a40 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -962,8 +962,6 @@ setup_acl(const int socket_id)
 	acl_log("IPv6 ACL entries %u:\n", acl_num_ipv6);
 	dump_ipv6_rules((struct acl6_rule *)acl_base_ipv6, acl_num_ipv6, 1);
 
-	memset(&acl_config, 0, sizeof(acl_config));
-
 	/* Check sockets a context should be created on */
 	if (socket_id >= NB_SOCKETS) {
 		acl_log("Socket %d is out "
@@ -973,6 +971,9 @@ setup_acl(const int socket_id)
 		return;
 	}
 
+	rte_acl_free(acl_config.acx_ipv4[socket_id]);
+	rte_acl_free(acl_config.acx_ipv6[socket_id]);
+
 	acl_config.acx_ipv4[socket_id] = app_acl_init(route_base_ipv4,
 		acl_base_ipv4, route_num_ipv4, acl_num_ipv4,
 		0, socket_id);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.127427832 +0800
+++ 0146-examples-l3fwd-fix-crash-on-multiple-sockets.patch	2024-08-12 20:44:02.565069387 +0800
@@ -1 +1 @@
-From 0cf06d7d846523abd48307613d429830bfb45ac9 Mon Sep 17 00:00:00 2001
+From 5fa2084ac31b33ccaf67c4491b6a7638178d6be4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 0cf06d7d846523abd48307613d429830bfb45ac9 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index ab8222c9db..2109ab0a8c 100644
+index d9e4ae543f..a1d87f4a40 100644
@@ -25 +27 @@
-@@ -950,8 +950,6 @@ setup_acl(const int socket_id)
+@@ -962,8 +962,6 @@ setup_acl(const int socket_id)
@@ -34 +36 @@
-@@ -961,6 +959,9 @@ setup_acl(const int socket_id)
+@@ -973,6 +971,9 @@ setup_acl(const int socket_id)


More information about the stable mailing list