Skip to contentSkip to conversation

net/mlx5: E-Switch, skip vport change work for disabled vports

PATCH New Tariq Toukan 2 participants 2 messages Nov 18

Subsystems (4)
lore
Share & tools
lore

Tariq Toukan

author maintainer
#0 lore raw

PATCH 1/1 net/mlx5: E-Switch, skip vport change work for disabled vports

From: Uri Dar <[email protected]>

A vport change work can still be pending when its vport is disabled. For an SF, the vport is then freed in FW and the work's query fails with syndrome 0x29d722. A disabled vport has nothing to sync, so skip the work.

Fixes d970812b91d0 ("net/mlx5: E-switch, Add eswitch helpers for SF vport")
---
 drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +2 -1
index 76f808e06a88..174197f69888 100644
@@ -758,7 +758,8 @@ static void esw_vport_change_handler(struct work_struct *work)
 	struct mlx5_eswitch *esw = vport->dev->priv.eswitch;
 
 	mutex_lock(&esw->state_lock);
-	esw_vport_change_handle_locked(vport);
+	if (vport->enabled)
+		esw_vport_change_handle_locked(vport);
 	mutex_unlock(&esw->state_lock);
 }
 

base-commit: aa40afa831ebfe45e40a23721711059f2ac584d4

Signature · 1 line
2.44.0
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 7 lines

From: Uri Dar <[email protected]>

A vport change work can still be pending when its vport is disabled. For an SF, the vport is then freed in FW and the work's query fails with syndrome 0x29d722. A disabled vport has nothing to sync, so skip the work.

Quoted 5 lines
Fixes d970812b91d0 ("net/mlx5: E-switch, Add eswitch helpers for SF vport")

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1