Skip to contentSkip to conversation

net/mlx5: fix LACP packets handling in isolated mode

PATCH In review Maayan Kashani 2 participants 2 messages Feb 27, 2025 – Mar 11, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix LACP packets handling in isolated mode

In HWS(dv_flow_en=2) mode, in the routine that enables traffic, isolated mode check was before LACP default rules creation as opposed to legacy mode handling.

As a result, the LACP default rules were not created in HWS mode and LACP packets arrived to testpmd.
The fix was to create the LACP default rules in isolated mode.

Fixes 87e4384d2662 ("net/mlx5: fix condition of LACP miss flow")
---
 drivers/net/mlx5/mlx5_trigger.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_trigger.c +2 -2
index 79b3d4d9821..4ee44e91658 100644
@@ -1533,11 +1533,11 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 	} else {
 		DRV_LOG(INFO, "port %u FDB default rule is disabled", dev->data->port_id);
 	}
-	if (priv->isolated)
-		return 0;
 	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master)
 		if (mlx5_flow_hw_lacp_rx_flow(dev))
 			goto error;
+	if (priv->isolated)
+		return 0;
 	if (dev->data->promiscuous)
 		flags |= MLX5_CTRL_PROMISCUOUS;
 	if (dev->data->all_multicast)
Signature · 1 line
2.21.0
Acked-by Dariusz Sosnowski on v1 1/1
#1 lore raw

Hi,

From: Maayan Kashani <[email protected]>
Sent: Thursday, February 27, 2025 12:20 PM
To: [email protected]
Cc: Maayan Kashani; Dariusz Sosnowski; Raslan Darawsheh; [email protected]; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad
Subject: [PATCH] net/mlx5: fix LACP packets handling in isolated mode

In HWS(dv_flow_en=2) mode, in the routine that enables traffic, isolated mode check was before LACP default rules creation as opposed to legacy mode handling.

As a result, the LACP default rules were not created in HWS mode and LACP packets arrived to testpmd.
The fix was to create the LACP default rules in isolated mode.

Fixes 87e4384d2662 ("net/mlx5: fix condition of LACP miss flow")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh