patch 'net/mlx5: fix internal HWS pattern template creation' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:09:55 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ba10110a1457b0a47ce6085cf262daea67e5efc1
Thanks.
Kevin
---
>From ba10110a1457b0a47ce6085cf262daea67e5efc1 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Mon, 12 Jan 2026 11:24:37 +0200
Subject: [PATCH] net/mlx5: fix internal HWS pattern template creation
[ upstream commit 2269696b023254d3d4c99e3d5d03466a8f47cce3 ]
HWS pattern template creation tries to build a table with
the tested items after basic verifications to check
if the pattern is valid.
Time consumed in that table creation can be critical for applications
that require fast PMD initialization.
The patch separates pattern templates to internal and external.
Internal templates are created by the PMD and are considered safe and
can skip some validations.
Pattern templates provided by applications will be fully validated.
Fixes: a190f25e6a93 ("net/mlx5: improve pattern template validation")
Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 35 +++++++++++++++++++++++----------
1 file changed, 25 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 24d1eba02f..50bdd4e3fd 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -9153,4 +9153,5 @@ flow_hw_pattern_template_create(struct rte_eth_dev *dev,
const struct rte_flow_pattern_template_attr *attr,
const struct rte_flow_item items[],
+ bool external,
struct rte_flow_error *error)
{
@@ -9307,7 +9308,9 @@ setup_pattern_template:
}
rte_atomic_fetch_add_explicit(&it->refcnt, 1, rte_memory_order_relaxed);
- rc = pattern_template_validate(dev, &it, 1, error);
- if (rc)
- goto error;
+ if (external) {
+ rc = pattern_template_validate(dev, &it, 1, error);
+ if (rc)
+ goto error;
+ }
LIST_INSERT_HEAD(&priv->flow_hw_itt, it, next);
return it;
@@ -9328,4 +9331,14 @@ error:
}
+static struct rte_flow_pattern_template *
+flow_hw_external_pattern_template_create
+ (struct rte_eth_dev *dev,
+ const struct rte_flow_pattern_template_attr *attr,
+ const struct rte_flow_item items[],
+ struct rte_flow_error *error)
+{
+ return flow_hw_pattern_template_create(dev, attr, items, true, error);
+}
+
/**
* Destroy flow item template.
@@ -9933,5 +9946,5 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev, struct rte_flow_
};
- return flow_hw_pattern_template_create(dev, &attr, items, error);
+ return flow_hw_pattern_template_create(dev, &attr, items, false, error);
}
@@ -10225,5 +10238,5 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev,
};
- return flow_hw_pattern_template_create(dev, &attr, items, error);
+ return flow_hw_pattern_template_create(dev, &attr, items, false, error);
}
@@ -10279,5 +10292,5 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev,
};
- return flow_hw_pattern_template_create(dev, &attr, items, error);
+ return flow_hw_pattern_template_create(dev, &attr, items, false, error);
}
@@ -10316,5 +10329,5 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev,
};
- return flow_hw_pattern_template_create(dev, &attr, items, error);
+ return flow_hw_pattern_template_create(dev, &attr, items, false, error);
}
@@ -10352,5 +10365,6 @@ flow_hw_create_lacp_rx_pattern_template(struct rte_eth_dev *dev, struct rte_flow
},
};
- return flow_hw_pattern_template_create(dev, &pa_attr, eth_all, error);
+ return flow_hw_pattern_template_create(dev, &pa_attr, eth_all,
+ false, error);
}
@@ -11596,5 +11610,5 @@ flow_hw_create_ctrl_rx_pattern_template
};
- return flow_hw_pattern_template_create(dev, &attr, items, NULL);
+ return flow_hw_pattern_template_create(dev, &attr, items, false, NULL);
}
@@ -15624,4 +15638,5 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
}
+
const struct mlx5_flow_driver_ops mlx5_flow_hw_drv_ops = {
.list_create = flow_hw_list_create,
@@ -15631,5 +15646,5 @@ const struct mlx5_flow_driver_ops mlx5_flow_hw_drv_ops = {
.configure = flow_hw_configure,
.pattern_validate = flow_hw_pattern_validate,
- .pattern_template_create = flow_hw_pattern_template_create,
+ .pattern_template_create = flow_hw_external_pattern_template_create,
.pattern_template_destroy = flow_hw_pattern_template_destroy,
.actions_validate = flow_hw_actions_validate,
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:51.490775565 +0000
+++ 0113-net-mlx5-fix-internal-HWS-pattern-template-creation.patch 2026-02-26 10:16:47.139460059 +0000
@@ -1 +1 @@
-From 2269696b023254d3d4c99e3d5d03466a8f47cce3 Mon Sep 17 00:00:00 2001
+From ba10110a1457b0a47ce6085cf262daea67e5efc1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2269696b023254d3d4c99e3d5d03466a8f47cce3 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -29 +30 @@
-index 2ae857aca3..dc70909cff 100644
+index 24d1eba02f..50bdd4e3fd 100644
@@ -32 +33 @@
-@@ -9235,4 +9235,5 @@ flow_hw_pattern_template_create(struct rte_eth_dev *dev,
+@@ -9153,4 +9153,5 @@ flow_hw_pattern_template_create(struct rte_eth_dev *dev,
@@ -38 +39 @@
-@@ -9389,7 +9390,9 @@ setup_pattern_template:
+@@ -9307,7 +9308,9 @@ setup_pattern_template:
@@ -51 +52 @@
-@@ -9410,4 +9413,14 @@ error:
+@@ -9328,4 +9331,14 @@ error:
@@ -66 +67 @@
-@@ -10015,5 +10028,5 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev, struct rte_flow_
+@@ -9933,5 +9946,5 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev, struct rte_flow_
@@ -73 +74 @@
-@@ -10307,5 +10320,5 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev,
+@@ -10225,5 +10238,5 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev,
@@ -80 +81 @@
-@@ -10361,5 +10374,5 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev,
+@@ -10279,5 +10292,5 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev,
@@ -87 +88 @@
-@@ -10398,5 +10411,5 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev,
+@@ -10316,5 +10329,5 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev,
@@ -94 +95 @@
-@@ -10434,5 +10447,6 @@ flow_hw_create_lacp_rx_pattern_template(struct rte_eth_dev *dev, struct rte_flow
+@@ -10352,5 +10365,6 @@ flow_hw_create_lacp_rx_pattern_template(struct rte_eth_dev *dev, struct rte_flow
@@ -102 +103 @@
-@@ -11678,5 +11692,5 @@ flow_hw_create_ctrl_rx_pattern_template
+@@ -11596,5 +11610,5 @@ flow_hw_create_ctrl_rx_pattern_template
@@ -109 +110 @@
-@@ -15706,4 +15720,5 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -15624,4 +15638,5 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -115 +116 @@
-@@ -15713,5 +15728,5 @@ const struct mlx5_flow_driver_ops mlx5_flow_hw_drv_ops = {
+@@ -15631,5 +15646,5 @@ const struct mlx5_flow_driver_ops mlx5_flow_hw_drv_ops = {
More information about the stable
mailing list