<div dir="auto"><div>Hi Luca Boccassi,</div><div dir="auto"><br></div><div dir="auto">Sorry to interrupt you again. </div><div dir="auto">Please apply the patch to dpdk-stable. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Khadem </div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Jul 2, 2025, 20:32 Khadem Ullah <<a href="mailto:14pwcse1224@uetpeshawar.edu.pk">14pwcse1224@uetpeshawar.edu.pk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hi Luca Boccassi </div><div dir="auto"><br></div><div dir="auto">I think the page is still in queue. Please apply it to dpdk-stable. </div><div><br></div><div dir="auto">Regards, </div><div dir="auto">Khadem </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 30, 2025, 17:26 <<a href="mailto:luca.boccassi@gmail.com" target="_blank" rel="noreferrer">luca.boccassi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
FYI, your patch has been queued to stable release 22.11.9<br>
<br>
Note it hasn't been pushed to <a href="http://dpdk.org/browse/dpdk-stable" rel="noreferrer noreferrer noreferrer" target="_blank">http://dpdk.org/browse/dpdk-stable</a> yet.<br>
It will be pushed if I get no objections before 07/02/25. So please<br>
shout if anyone has objections.<br>
<br>
Also note that after the patch there's a diff of the upstream commit vs the<br>
patch applied to the branch. This will indicate if there was any rebasing<br>
needed to apply to the stable branch. If there were code changes for rebasing<br>
(ie: not only metadata diffs), please double check that the rebase was<br>
correctly done.<br>
<br>
Queued patches are on a temporary branch at:<br>
<a href="https://github.com/bluca/dpdk-stable" rel="noreferrer noreferrer noreferrer" target="_blank">https://github.com/bluca/dpdk-stable</a><br>
<br>
This queued commit can be viewed at:<br>
<a href="https://github.com/bluca/dpdk-stable/commit/ab74ac87bc7fe0554e3a2e0e6c94558647b9770d" rel="noreferrer noreferrer noreferrer" target="_blank">https://github.com/bluca/dpdk-stable/commit/ab74ac87bc7fe0554e3a2e0e6c94558647b9770d</a><br>
<br>
Thanks.<br>
<br>
Luca Boccassi<br>
<br>
---<br>
>From ab74ac87bc7fe0554e3a2e0e6c94558647b9770d Mon Sep 17 00:00:00 2001<br>
From: Khadem Ullah <<a href="mailto:14pwcse1224@uetpeshawar.edu.pk" rel="noreferrer noreferrer" target="_blank">14pwcse1224@uetpeshawar.edu.pk</a>><br>
Date: Thu, 26 Jun 2025 09:07:02 -0400<br>
Subject: [PATCH] net/mlx5: fix crash on age query with indirect conntrack<br>
<br>
[ upstream commit 3bb6e3bf05284f0668e2ac14ce4b90a2909dff99 ]<br>
<br>
This patch fixes a segmentation fault that occurs when querying the<br>
AGE action of a flow rule that uses indirect connection tracking (CT).<br>
<br>
Background:<br>
AGE and CT indices share a union in the mlx5 flow struct. When using CT<br>
without age, the age index is invalid. Querying AGE in this case leads<br>
to a crash due to reading an invalid pointer.<br>
<br>
Solution:<br>
Add a check in `flow_dv_query()` to prevent AGE queries on indirect CT<br>
actions. This is the correct fix rather than null-checking the pool.<br>
<br>
Steps to reproduce:<br>
1. Create an indirect CT action:<br>
flow indirect_action 0 create ingress action conntrack / end<br>
<br>
2. Create a root rule with jump:<br>
flow create 0 ingress pattern eth / ipv4 / tcp / end actions jump group 3 / end<br>
<br>
3. Create a group 3 rule using the indirect action:<br>
flow create 0 group 3 ingress pattern eth / ipv4 / tcp / end actions indirect 0 / jump group 5 / end<br>
<br>
4. Create a group 5 rule matching CT state:<br>
flow create 0 group 5 ingress pattern eth / ipv4 / tcp / conntrack is 1 / end actions queue index 5 / end<br>
<br>
5. Querying the first rule causes segfault:<br>
flow query 0 1 age<br>
<br>
Fixes: 2d084f69aa26 ("net/mlx5: add translation of connection tracking action")<br>
<br>
Signed-off-by: Khadem Ullah <<a href="mailto:14pwcse1224@uetpeshawar.edu.pk" rel="noreferrer noreferrer" target="_blank">14pwcse1224@uetpeshawar.edu.pk</a>><br>
Acked-by: Dariusz Sosnowski <<a href="mailto:dsosnowski@nvidia.com" rel="noreferrer noreferrer" target="_blank">dsosnowski@nvidia.com</a>><br>
---<br>
.mailmap | 1 +<br>
drivers/net/mlx5/mlx5_flow_dv.c | 5 +++++<br>
2 files changed, 6 insertions(+)<br>
<br>
diff --git a/.mailmap b/.mailmap<br>
index 7e6ada5733..9a89b1a12e 100644<br>
--- a/.mailmap<br>
+++ b/.mailmap<br>
@@ -736,6 +736,7 @@ Kevin Scott <<a href="mailto:kevin.c.scott@intel.com" rel="noreferrer noreferrer" target="_blank">kevin.c.scott@intel.com</a>><br>
Kevin Traynor <<a href="mailto:ktraynor@redhat.com" rel="noreferrer noreferrer" target="_blank">ktraynor@redhat.com</a>><br>
Ke Xu <<a href="mailto:ke1.xu@intel.com" rel="noreferrer noreferrer" target="_blank">ke1.xu@intel.com</a>><br>
Ke Zhang <<a href="mailto:ke1x.zhang@intel.com" rel="noreferrer noreferrer" target="_blank">ke1x.zhang@intel.com</a>><br>
+Khadem Ullah <<a href="mailto:14pwcse1224@uetpeshawar.edu.pk" rel="noreferrer noreferrer" target="_blank">14pwcse1224@uetpeshawar.edu.pk</a>><br>
Khoa To <<a href="mailto:khot@microsoft.com" rel="noreferrer noreferrer" target="_blank">khot@microsoft.com</a>><br>
Kiran KN <<a href="mailto:kirankn@juniper.net" rel="noreferrer noreferrer" target="_blank">kirankn@juniper.net</a>><br>
Kiran Kumar K <<a href="mailto:kirankumark@marvell.com" rel="noreferrer noreferrer" target="_blank">kirankumark@marvell.com</a>><br>
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c<br>
index d11e39431f..f3a76f9e93 100644<br>
--- a/drivers/net/mlx5/mlx5_flow_dv.c<br>
+++ b/drivers/net/mlx5/mlx5_flow_dv.c<br>
@@ -16950,6 +16950,11 @@ flow_dv_query(struct rte_eth_dev *dev,<br>
error);<br>
break;<br>
case RTE_FLOW_ACTION_TYPE_AGE:<br>
+ if (flow->indirect_type == MLX5_INDIRECT_ACTION_TYPE_CT)<br>
+ return rte_flow_error_set(error, ENOTSUP,<br>
+ RTE_FLOW_ERROR_TYPE_ACTION,<br>
+ actions,<br>
+ "age not available");<br>
ret = flow_dv_query_age(dev, flow, data, error);<br>
break;<br>
default:<br>
-- <br>
2.47.2<br>
<br>
---<br>
Diff of the applied patch vs upstream commit (please double-check if non-empty:<br>
---<br>
--- - 2025-06-30 13:21:21.850344929 +0100<br>
+++ 0002-net-mlx5-fix-crash-on-age-query-with-indirect-conntr.patch 2025-06-30 13:21:21.739057181 +0100<br>
@@ -1 +1 @@<br>
-From 3bb6e3bf05284f0668e2ac14ce4b90a2909dff99 Mon Sep 17 00:00:00 2001<br>
+From ab74ac87bc7fe0554e3a2e0e6c94558647b9770d Mon Sep 17 00:00:00 2001<br>
@@ -5,0 +6,2 @@<br>
+[ upstream commit 3bb6e3bf05284f0668e2ac14ce4b90a2909dff99 ]<br>
+<br>
@@ -35 +36,0 @@<br>
-Cc: <a href="mailto:stable@dpdk.org" rel="noreferrer noreferrer" target="_blank">stable@dpdk.org</a><br>
@@ -45 +46 @@<br>
-index 8483d96ec5..6126f7e472 100644<br>
+index 7e6ada5733..9a89b1a12e 100644<br>
@@ -48 +49 @@<br>
-@@ -812,6 +812,7 @@ Kevin Scott <<a href="mailto:kevin.c.scott@intel.com" rel="noreferrer noreferrer" target="_blank">kevin.c.scott@intel.com</a>><br>
+@@ -736,6 +736,7 @@ Kevin Scott <<a href="mailto:kevin.c.scott@intel.com" rel="noreferrer noreferrer" target="_blank">kevin.c.scott@intel.com</a>><br>
@@ -55 +56 @@<br>
- Kiran Kumar K <<a href="mailto:kirankumark@marvell.com" rel="noreferrer noreferrer" target="_blank">kirankumark@marvell.com</a>> <<a href="mailto:kkokkilagadda@caviumnetworks.com" rel="noreferrer noreferrer" target="_blank">kkokkilagadda@caviumnetworks.com</a>> <<a href="mailto:kiran.kokkilagadda@caviumnetworks.com" rel="noreferrer noreferrer" target="_blank">kiran.kokkilagadda@caviumnetworks.com</a>><br>
+ Kiran Kumar K <<a href="mailto:kirankumark@marvell.com" rel="noreferrer noreferrer" target="_blank">kirankumark@marvell.com</a>><br>
@@ -57 +58 @@<br>
-index d555a9cdcb..7b9e5018b8 100644<br>
+index d11e39431f..f3a76f9e93 100644<br>
@@ -60 +61 @@<br>
-@@ -18146,6 +18146,11 @@ flow_dv_query(struct rte_eth_dev *dev,<br>
+@@ -16950,6 +16950,11 @@ flow_dv_query(struct rte_eth_dev *dev,<br>
</blockquote></div>
</blockquote></div>