patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Mon Aug 12 14:50:22 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=17082297291439dad25bffee52dba87eee737c02

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 17082297291439dad25bffee52dba87eee737c02 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev at huawei.com>
Date: Thu, 2 May 2024 16:28:15 +0100
Subject: [PATCH] examples/l3fwd: fix crash in ACL mode for mixed traffic
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 659ded8eb733315878857f82bc22f0b03be5ce71 ]

When running l3fwd in ACL mode, if we'll have mix of IPv4/IPv6 packets in
the same burst, it will most likely cause a crash.
The reason for that is that we split our burst of packets into 2 arrays -
one for ipv4, another for ipv6 for classify().
But then we try to send all packets as one burst again,
not taking into account that acl_search.res_ipv4[] will be set
only for ipv4 packets.
Same story for ipv6.
The fix is straightforward: use two already split arrays for TX.

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

Signed-off-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
 examples/l3fwd/l3fwd_acl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index 401692bcec..d9e4ae543f 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -1073,9 +1073,9 @@ acl_main_loop(__rte_unused void *dummy)
 
 					l3fwd_acl_send_packets(
 						qconf,
-						pkts_burst,
+						acl_search.m_ipv4,
 						acl_search.res_ipv4,
-						nb_rx);
+						acl_search.num_ipv4);
 				}
 
 				if (acl_search.num_ipv6) {
@@ -1088,9 +1088,9 @@ acl_main_loop(__rte_unused void *dummy)
 
 					l3fwd_acl_send_packets(
 						qconf,
-						pkts_burst,
+						acl_search.m_ipv6,
 						acl_search.res_ipv6,
-						nb_rx);
+						acl_search.num_ipv6);
 				}
 			}
 		}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.104204634 +0800
+++ 0145-examples-l3fwd-fix-crash-in-ACL-mode-for-mixed-traff.patch	2024-08-12 20:44:02.565069387 +0800
@@ -1 +1 @@
-From 659ded8eb733315878857f82bc22f0b03be5ce71 Mon Sep 17 00:00:00 2001
+From 17082297291439dad25bffee52dba87eee737c02 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 659ded8eb733315878857f82bc22f0b03be5ce71 ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list