Skip to contentSkip to conversation

net/mlx5: fix mark flow action validation in FDB mode

PATCH In review Gregory Etelson 2 participants 2 messages Mar 11, 2025 – Mar 13, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix mark flow action validation in FDB mode

The MARK flow action is supported in FDB SWS mode, but it was not supported in the early FDB HWS implementations.

The current MARK flow action validation reflects the original HWS functionality.

Recent MLX5 FW supports the MARK flow action in FDB mode.

The patch clears the MARK action for both SWS FDB and HWS FDB.

Fixes d6dc072aeb12 ("net/mlx5: validate flow actions in table creation")
---
 drivers/net/mlx5/mlx5_flow.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/mlx5/mlx5_flow.c +1 -5
index 6169ebc13f..e2f4bd8cef 100644
@@ -1944,7 +1944,7 @@ mlx5_flow_validate_action_flag(uint64_t action_flags,
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_flow_validate_action_mark(struct rte_eth_dev *dev,
+mlx5_flow_validate_action_mark(__rte_unused struct rte_eth_dev *dev,
 			       const struct rte_flow_action *action,
 			       uint64_t action_flags,
 			       const struct rte_flow_attr *attr,
@@ -1977,10 +1977,6 @@ mlx5_flow_validate_action_mark(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, NULL,
 					  "mark action not supported for "
 					  "egress");
-	if (attr->transfer && !mlx5_hws_active(dev))
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER, NULL,
-					  "non-template mark action not supported for transfer");
 	return 0;
 }
 
Signature · 1 line
2.45.2
Acked-by Dariusz Sosnowski on v1 1/1
#1 lore raw

Hi,

From: Gregory Etelson <[email protected]>
Sent: Tuesday, March 11, 2025 2:46 PM
To: [email protected]
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; [email protected]; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad
Subject: [PATCH] net/mlx5: fix mark flow action validation in FDB mode

The MARK flow action is supported in FDB SWS mode, but it was not supported in the early FDB HWS implementations.

The current MARK flow action validation reflects
the original HWS functionality.

Recent MLX5 FW supports the MARK flow action in FDB mode.

The patch clears the MARK action for both SWS FDB and HWS FDB.

Fixes d6dc072aeb12 ("net/mlx5: validate flow actions in table creation")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh