net/mlx5: fix failure on device start for default rules
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.
--- drivers/net/mlx5/mlx5_flow.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow.c +12 -2
@@ -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
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")Signed-off-by Maayan Kashani <[email protected]>Acked-by Bing Zhao <[email protected]>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh