Skip to content

net/mlx5: SD LAG and devcom stability fixes

Tariq Toukan linux-rdma lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v24 patches 3 repliesSuperseded
  3. v14 patches 1 replySuperseded

Changes in v3 from the cover letter

- Drop the "SD, serialize SD LAG init/cleanup against LAG mode changes" patch.
- Elaborate the commit message in "net/mlx5: LAG, reload IB reps of LAG master before the rest".

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net/mlx5: devcom, Base component size on linked devicesdrivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c+4 -10 repliesApplied
2/3net/mlx5: SD, unload reps on shared FDB create error pathdrivers/net/ethernet/mellanox/mlx5/core/lag/shared_fdb.c+1 -00 repliesApplied
3/3net/mlx5: LAG, reload IB reps of LAG master before the restdrivers/net/ethernet/mellanox/mlx5/core/lag/lag.c+32 -120 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAkiva Goldberger
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net V3 0/3] net/mlx5: SD LAG and devcom stability fixes

Hi,

This series by Shay fixes four bugs in the Socket Direct LAG and devcom subsystems, all related to initialization/teardown ordering and concurrent access to the LAG device.

Regards,
Tariq

Internal sashiko comment:

Review static void sd_lag_init(struct mlx5_core_dev *dev) · line 351

Quoted 11 lines
(quoted diff) +6 -0
@@ -342,7 +342,14 @@ static void sd_lag_init(struct mlx5_core_dev *dev)
 		return;
 	}
 
+recheck:
 	mutex_lock(&ldev->lock);
+	if (ldev->mode_changes_in_progress) {
+		mutex_unlock(&ldev->lock);
+		msleep(100);
+		goto recheck;
+

}

Review static void sd_lag_init(struct mlx5_core_dev *dev) · line 352

Quoted 1 line
(quoted diff) +1 -0
+

Does this open-coded retry loop reimplement a wait mechanism without immediate
wakeups or fairness?
It looks like we are polling the mode_changes_in_progress flag using a hard
coded msleep(100). Could this unnecessarily delay the initialization path if
the condition clears much sooner than 100ms? Would it be better to use a proper
synchronization primitive like a waitqueue here instead of an ad-hoc flag loop?

[SD] This is the same check as in mlx5_lag_remove_mdev(). I agree we need to change it, but this is net-next material

V3:
- Drop the "SD, serialize SD LAG init/cleanup against LAG mode changes" patch.
- Elaborate the commit message in "net/mlx5: LAG, reload IB reps of LAG master before the rest".

V2:
https://lore.kernel.org/all/[email protected]/

Shay Drory (3):
net/mlx5: devcom, Base component size on linked devices net/mlx5: SD, unload reps on shared FDB create error path net/mlx5: LAG, reload IB reps of LAG master before the rest

 .../net/ethernet/mellanox/mlx5/core/lag/lag.c | 44 ++++++++++++++-----
 .../mellanox/mlx5/core/lag/shared_fdb.c       |  1 +
 .../ethernet/mellanox/mlx5/core/lib/devcom.c  |  5 ++-
 3 files changed, 37 insertions(+), 13 deletions(-)

base-commit: 23ca4ddc4fce2c233a49e9fd34d4b5b02bd7324e

Signature · 1 line
2.44.0