Skip to contentSkip to conversation

net/mlx5: fix non-template sample action validation

PATCH In review Gregory Etelson 3 participants 3 messages Nov 6, 2025 – Nov 16, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix non-template sample action validation

The patch validates that sample actions include terminal action

Fixes d986f04d6529 ("net/mlx5: add functions for non-template flow sample")
---
 drivers/net/mlx5/mlx5_flow.h       |  3 +++
 drivers/net/mlx5/mlx5_flow_hw.c    |  4 ---
 drivers/net/mlx5/mlx5_nta_sample.c | 43 +++++++++++++++++++++++++++++-
 3 files changed, 45 insertions(+), 5 deletions(-)
drivers/net/mlx5/mlx5_flow.h +3 -0
index 146d547f72..d4f4d5a8ef 100644
@@ -21,6 +21,9 @@
 #include "hws/mlx5dr.h"
 #include "mlx5_tx.h"
 
+#define MLX5_HW_PORT_IS_PROXY(priv) \
+	(!!((priv)->sh->esw_mode && (priv)->master))
+
 /* E-Switch Manager port, used for rte_flow_item_port_id. */
 #define MLX5_PORT_ESW_MGR UINT32_MAX
 
drivers/net/mlx5/mlx5_flow_hw.c +0 -4
index ff68483a40..2d80c99c18 100644
@@ -62,10 +62,6 @@ static struct rte_flow_fp_ops mlx5_flow_hw_fp_ops;
 #define MLX5_HW_VLAN_PUSH_VID_IDX 1
 #define MLX5_HW_VLAN_PUSH_PCP_IDX 2
 
-#define MLX5_HW_PORT_IS_PROXY(priv) \
-	(!!((priv)->sh->esw_mode && (priv)->master))
-
-
 struct mlx5_indlst_legacy {
 	struct mlx5_indirect_list indirect;
 	struct rte_flow_action_handle *handle;
drivers/net/mlx5/mlx5_nta_sample.c +42 -1

58 lines not on this page · raw message

Signature · 1 line
2.51.0