* [PATCH 1/2] examples/l3fwd: fix crash in ACL mode for mixed traffic
[not found] <20240502152816.65562-1-konstantin.v.ananyev@yandex.ru>
@ 2024-05-02 15:28 ` Konstantin Ananyev
0 siblings, 0 replies; only message in thread
From: Konstantin Ananyev @ 2024-05-02 15:28 UTC (permalink / raw)
To: dev; +Cc: Konstantin Ananyev, stable
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
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")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@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.35.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-02 15:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20240502152816.65562-1-konstantin.v.ananyev@yandex.ru>
2024-05-02 15:28 ` [PATCH 1/2] examples/l3fwd: fix crash in ACL mode for mixed traffic Konstantin Ananyev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).