[PATCH] net/mlx5: fix failure on device start for default rules
Maayan Kashani
mkashani at nvidia.com
Wed Jul 30 13:35:12 CEST 2025
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")
Cc: stable at dpdk.org
Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 8db372123c7..7c6811b5233 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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);
--
2.21.0
More information about the stable
mailing list