patch 'net/mlx5: fix flow metadata between E-Switch and VM' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:09:46 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/5044b8d53068a245483e072c58f2d36609720b26
Thanks.
Kevin
---
>From 5044b8d53068a245483e072c58f2d36609720b26 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Mon, 1 Dec 2025 19:36:27 +0200
Subject: [PATCH] net/mlx5: fix flow metadata between E-Switch and VM
[ upstream commit a1cca690a1e3a46a1ebdede15e09fd282e2ea187 ]
The PMD relied on a flow domain type in register selection for
modify header action that assigned metadata value.
In the HWS code, the PMD uses the MLX5DR_TABLE_TYPE_MAX instead of
the exact domain type for flows in group 0.
As a result, the register selection was wrong.
This patch fixes the register selection logic when flow metadata
sharing between E-Switch and VM is enabled.
In this case REG_C_1 will always be used.
Fixes: a78425ba3793 ("net/mlx5: support flow metadata between E-Switch and VM")
Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/mlx5_flow.h | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 218b55d536..09084d311e 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1795,4 +1795,11 @@ mlx5_multi_pattern_segment_find(struct rte_flow_template_table *table,
}
+static inline bool
+mlx5_esw_hws_xmeta_mode_meta32_enabled(const struct mlx5_dev_ctx_shared *sh)
+{
+ return sh->config.dv_esw_en &&
+ (sh->config.dv_xmeta_en == MLX5_XMETA_MODE_META32_HWS);
+}
+
/*
* Convert metadata or tag to the actual register.
@@ -1810,13 +1817,8 @@ flow_hw_get_reg_id_by_domain(struct rte_eth_dev *dev,
switch (type) {
case RTE_FLOW_ITEM_TYPE_META:
- if (sh->config.dv_esw_en &&
- (sh->config.dv_xmeta_en == MLX5_XMETA_MODE_META32_HWS ||
- mlx5_esw_metadata_passing_enabled(sh))) {
- return REG_C_1;
- }
- if ((mlx5_vport_rx_metadata_passing_enabled(sh) &&
- domain_type == MLX5DR_TABLE_TYPE_NIC_RX) ||
- (mlx5_vport_tx_metadata_passing_enabled(sh) &&
- domain_type == MLX5DR_TABLE_TYPE_NIC_TX))
+ if (mlx5_esw_hws_xmeta_mode_meta32_enabled(sh) ||
+ mlx5_esw_metadata_passing_enabled(sh) ||
+ mlx5_vport_rx_metadata_passing_enabled(sh) ||
+ mlx5_vport_tx_metadata_passing_enabled(sh))
return REG_C_1;
/*
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:51.118373089 +0000
+++ 0104-net-mlx5-fix-flow-metadata-between-E-Switch-and-VM.patch 2026-02-26 10:16:47.077459788 +0000
@@ -1 +1 @@
-From a1cca690a1e3a46a1ebdede15e09fd282e2ea187 Mon Sep 17 00:00:00 2001
+From 5044b8d53068a245483e072c58f2d36609720b26 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a1cca690a1e3a46a1ebdede15e09fd282e2ea187 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list