Skip to content

devlink: linecard and reporters locking cleanup

Jiri Pirko netdev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest12 patches 12 repliesIn review 11 of 12 applied
  2. v410 patches 3 repliesSuperseded
  3. v311 patches 11 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v29 patches9 repliesSuperseded
v18 patches1 replySuperseded

Changes in v5 from the cover letter

- fixed mlx5 locking issues

Patches in v5 11 of 12 applied

#Subject and filesSizeRepliesApplied
1/12devlink: remove linecards lockdrivers/net/ethernet/mellanox/mlxsw/core_linecards.c include/net/devlink.h net/devlink/core.c +2 more+21 -371 reply
2/12devlink: remove linecard reference countingnet/devlink/devl_internal.h net/devlink/leftover.c net/devlink/netlink.c+2 -181 replyApplied
3/12net/mlx5e: Create separate devlink instance for ethernet auxiliary devicedrivers/net/ethernet/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en/devlink.c drivers/net/ethernet/mellanox/mlx5/core/en/devlink.h +1 more+55 -231 replyApplied
4/12net/mlx5: Remove MLX5E_LOCKED_FLOW flagdrivers/net/ethernet/mellanox/mlx5/core/dev.c include/linux/mlx5/driver.h+2 -161 replyApplied
5/12devlink: protect health reporter operation with instance lockdrivers/net/ethernet/mellanox/mlxsw/core.c drivers/net/netdevsim/health.c include/net/devlink.h +1 more+110 -391 replyApplied
6/12devlink: remove reporters_lockinclude/net/devlink.h net/devlink/core.c net/devlink/devl_internal.h +1 more+9 -481 replyApplied
7/12devlink: remove devl*_port_health_reporter_destroy()drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c include/net/devlink.h +1 more+4 -411 replyApplied
8/12devlink: remove reporter reference countingnet/devlink/leftover.c+30 -831 replyApplied
9/12devlink: convert linecards dump to devlink_nl_instance_iter_dump()net/devlink/devl_internal.h net/devlink/leftover.c net/devlink/netlink.c+30 -361 replyApplied
10/12devlink: convert reporters dump to devlink_nl_instance_iter_dump()net/devlink/devl_internal.h net/devlink/leftover.c net/devlink/netlink.c+40 -491 replyApplied
11/12devlink: remove devlink_dump_for_each_instance_get() helpernet/devlink/devl_internal.h net/devlink/netlink.c+4 -121 replyApplied
12/12devlink: add instance lock assertion in devl_is_registered()net/devlink/devl_internal.h+1 -31 replyApplied

Reviews trailers per patch

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

PatchIdo SchimmelJacob Keller
1/12R-b R-b
2/12R-b R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b R-b
10/12R-b
11/12R-b
12/12R-b

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

Read the v5 thread

Cover letter [patch net-next v5 00/12] devlink: linecard and reporters locking cleanup

From: Jiri Pirko <[email protected]>

This patchset does not change functionality.

Patches 1-2 remove linecards lock and reference counting, converting them to be protected by devlink instance lock as the rest of the objects.

Patches 3-4 fix the mlx5 auxiliary device devlink locking scheme whis is needed for proper reporters lock conversion done in the following patches.

Patches 5-8 remove reporters locks and reference counting, converting them to be protected by devlink instance lock as the rest of the objects.

Patches 9 and 10 convert linecards and reporters dumpit callbacks to recently introduced devlink_nl_instance_iter_dump() infra.

Patch 11 removes no longer needed devlink_dump_for_each_instance_get() helper.

The last patch adds assertion to devl_is_registered() as dependency on other locks is removed.

---
v4->v5:
- fixed mlx5 locking issues
v3->v4:
- patch #1 was removed from the set and will be sent as a part of another patchset
v2->v3:
- see individual patches for changelog, mainly original patch #4 was split into 3 patches for easier review
v1->v2:
- patch 7 bits were unsquashed to patch 8

Jiri Pirko (12):
devlink: remove linecards lock
devlink: remove linecard reference counting
net/mlx5e: Create separate devlink instance for ethernet auxiliary
device
net/mlx5: Remove MLX5E_LOCKED_FLOW flag
devlink: protect health reporter operation with instance lock
devlink: remove reporters_lock
devlink: remove devl*_port_health_reporter_destroy()
devlink: remove reporter reference counting
devlink: convert linecards dump to devlink_nl_instance_iter_dump()
devlink: convert reporters dump to devlink_nl_instance_iter_dump()
devlink: remove devlink_dump_for_each_instance_get() helper
devlink: add instance lock assertion in devl_is_registered()

 drivers/net/ethernet/mellanox/mlx5/core/dev.c |  14 +-
 drivers/net/ethernet/mellanox/mlx5/core/en.h  |   4 +
 .../ethernet/mellanox/mlx5/core/en/devlink.c  |  44 +-
 .../ethernet/mellanox/mlx5/core/en/devlink.h  |   5 +-
 .../mellanox/mlx5/core/en/reporter_rx.c       |   2 +-
 .../mellanox/mlx5/core/en/reporter_tx.c       |   2 +-
 .../net/ethernet/mellanox/mlx5/core/en_main.c |  25 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c    |   8 +-
 .../ethernet/mellanox/mlxsw/core_linecards.c  |   8 +-
 drivers/net/netdevsim/health.c                |  20 +-
 include/linux/mlx5/driver.h                   |   4 -
 include/net/devlink.h                         |  27 +-
 net/devlink/core.c                            |   4 -
 net/devlink/devl_internal.h                   |  20 +-
 net/devlink/leftover.c                        | 442 +++++++-----------
 net/devlink/netlink.c                         |  12 +-
 16 files changed, 272 insertions(+), 369 deletions(-)
Signature · 1 line
2.39.0