[PATCH 24.11] net/mlx5: fix item prepending conditions
Dariusz Sosnowski
dsosnowski at nvidia.com
Wed Aug 5 12:32:32 CEST 2026
Offending commit, which is a backport, dropped checks
on priv->sh->config.repr_matching before flow pattern is prepended
inside mlx5 driver. This issue was caused by the fact,
that on main branch this config flag does not exist anymore.
priv->sh->config.repr_matching was removed in 25.11 release.
It should be used in 24.11 branch.
This patch adds back the missing check.
Fixes: 471350f6cd46 ("net/mlx5: prepend implicit items in sync flow creation")
Cc: maxime.peim at gmail.com
Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 651f973901..6a16388647 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -9020,12 +9020,19 @@ flow_hw_adjust_pattern(struct rte_eth_dev *dev, const struct rte_flow_pattern_te
return NULL;
*nb_items = rc;
- if (priv->sh->config.dv_esw_en && attr->ingress && !attr->egress && !attr->transfer) {
+ if (priv->sh->config.dv_esw_en &&
+ priv->sh->config.repr_matching &&
+ attr->ingress &&
+ !attr->egress &&
+ !attr->transfer) {
*copied_items = flow_hw_prepend_item(items, *nb_items, &port, error);
if (!*copied_items)
return NULL;
return *copied_items;
- } else if (priv->sh->config.dv_esw_en && !attr->ingress && attr->egress &&
+ } else if (priv->sh->config.dv_esw_en &&
+ priv->sh->config.repr_matching &&
+ !attr->ingress &&
+ attr->egress &&
!attr->transfer) {
if (*item_flags & MLX5_FLOW_ITEM_SQ) {
DRV_LOG(DEBUG,
--
2.47.3
More information about the stable
mailing list