mbox series

[net-next,v3,00/11] devlink: features, linecard and reporters locking cleanup

Message ID 20230109183120.649825-1-jiri@resnulli.us (mailing list archive)
Headers show
Series devlink: features, linecard and reporters locking cleanup | expand

Message

Jiri Pirko Jan. 9, 2023, 6:31 p.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

This patchset does not change functionality.

In the first patch, no longer needed devlink features are removed.

Patches 2-7 removes linecards and reporters locks and reference counting,
converting them to be protected by devlink instance lock as the rest of
the objects.

Patches 8 and 9 convert linecards and reporters dumpit callbacks to
recently introduced devlink_nl_instance_iter_dump() infra.
Patch 10 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.

---
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 (11):
  devlink: remove devlink features
  devlink: remove linecards lock
  devlink: remove linecard reference counting
  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()

 .../net/ethernet/broadcom/bnxt/bnxt_devlink.c |   1 -
 .../hisilicon/hns3/hns3pf/hclge_devlink.c     |   1 -
 .../hisilicon/hns3/hns3vf/hclgevf_devlink.c   |   1 -
 drivers/net/ethernet/intel/ice/ice_devlink.c  |   1 -
 drivers/net/ethernet/mellanox/mlx4/main.c     |   1 -
 .../net/ethernet/mellanox/mlx5/core/devlink.c |   9 +-
 .../ethernet/mellanox/mlx5/core/en/health.c   |  12 +
 .../mellanox/mlx5/core/en/reporter_rx.c       |   6 +-
 .../mellanox/mlx5/core/en/reporter_tx.c       |   6 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c    |   9 +-
 .../ethernet/mellanox/mlxsw/core_linecards.c  |   8 +-
 drivers/net/netdevsim/dev.c                   |   1 -
 drivers/net/netdevsim/health.c                |  20 +-
 include/net/devlink.h                         |  28 +-
 net/devlink/core.c                            |  23 -
 net/devlink/devl_internal.h                   |  21 +-
 net/devlink/leftover.c                        | 431 +++++++-----------
 net/devlink/netlink.c                         |  12 +-
 18 files changed, 219 insertions(+), 372 deletions(-)

Comments

Jakub Kicinski Jan. 10, 2023, 1:13 a.m. UTC | #1
On Mon,  9 Jan 2023 19:31:09 +0100 Jiri Pirko wrote:
> This patchset does not change functionality.
> 
> In the first patch, no longer needed devlink features are removed.
> 
> Patches 2-7 removes linecards and reporters locks and reference counting,
> converting them to be protected by devlink instance lock as the rest of
> the objects.
> 
> Patches 8 and 9 convert linecards and reporters dumpit callbacks to
> recently introduced devlink_nl_instance_iter_dump() infra.
> Patch 10 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.

Other than the question patch 1, lgtm!
Ido Schimmel Jan. 10, 2023, 8:40 a.m. UTC | #2
On Mon, Jan 09, 2023 at 07:31:09PM +0100, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> This patchset does not change functionality.
> 
> In the first patch, no longer needed devlink features are removed.
> 
> Patches 2-7 removes linecards and reporters locks and reference counting,
> converting them to be protected by devlink instance lock as the rest of
> the objects.
> 
> Patches 8 and 9 convert linecards and reporters dumpit callbacks to
> recently introduced devlink_nl_instance_iter_dump() infra.
> Patch 10 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.

Asked Petr to queue this for testing, so we should be able to report
results tomorrow.
Ido Schimmel Jan. 11, 2023, 7:14 a.m. UTC | #3
On Tue, Jan 10, 2023 at 10:40:42AM +0200, Ido Schimmel wrote:
> On Mon, Jan 09, 2023 at 07:31:09PM +0100, Jiri Pirko wrote:
> > From: Jiri Pirko <jiri@nvidia.com>
> > 
> > This patchset does not change functionality.
> > 
> > In the first patch, no longer needed devlink features are removed.
> > 
> > Patches 2-7 removes linecards and reporters locks and reference counting,
> > converting them to be protected by devlink instance lock as the rest of
> > the objects.
> > 
> > Patches 8 and 9 convert linecards and reporters dumpit callbacks to
> > recently introduced devlink_nl_instance_iter_dump() infra.
> > Patch 10 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.
> 
> Asked Petr to queue this for testing, so we should be able to report
> results tomorrow.

Looks OK, no regressions.