Skip to contentSkip to conversation

net/mlx5: fix failure on device start for default rules

PATCH In review Maayan Kashani 2 participants 2 messages Jul 30, 2025 – Aug 18, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix failure on device start for default rules

As part of non-template implementation,
new default rule was added in HWS mode (dv_flow_en=2)
in case dv_xmeta_en=4 (32bits extended META for HWS mode). In case the proxy port did not start, and it was not configured, it failed to create this rule and failed to start port representors.

Added ignore for this failure to align to other default rules creation failure behaviour, and to enable testing port representors
w/o starting the proxy port.

Fixes 821a6a5cc495 ("net/mlx5: add metadata split for compatibility")
---
 drivers/net/mlx5/mlx5_flow.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow.c +12 -2
index 8db372123c7..7c6811b5233 100644
@@ -8217,8 +8217,18 @@ mlx5_flow_start_default(struct rte_eth_dev *dev)
 #ifdef HAVE_MLX5_HWS_SUPPORT
 	struct mlx5_priv *priv = dev->data->dev_private;
 
-	if (priv->sh->config.dv_flow_en == 2)
-		return mlx5_flow_nta_add_default_copy_action(dev, &error);
+	if (priv->sh->config.dv_flow_en == 2) {
+		/*
+		 * Ignore this failure, if the proxy port is not started, other
+		 * default jump actions are not created and this rule will not
+		 * be hit.
+		 */
+		if (mlx5_flow_nta_add_default_copy_action(dev, &error)) {
+			DRV_LOG(DEBUG, "port %u failed to start default copy action: %s",
+				dev->data->port_id, strerror(rte_errno));
+			return 0;
+		}
+	}
 #endif
 	/* Make sure default copy action (reg_c[0] -> reg_b) is created. */
 	return flow_mreg_add_default_copy_action(dev, &error);
Signature · 1 line
2.21.0
#1 lore raw

Hi,

Quoted 10 lines · Maayan Kashani

As part of non-template implementation,
new default rule was added in HWS mode (dv_flow_en=2)
in case dv_xmeta_en=4 (32bits extended META for HWS mode). In case the proxy port did not start, and it was not configured, it failed to create this rule and failed to start port representors.

Added ignore for this failure to align to other default rules creation failure behaviour, and to enable testing port representors
w/o starting the proxy port.

Quoted 5 lines
Fixes 821a6a5cc495 ("net/mlx5: add metadata split for compatibility")

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh