mbox series

[net-next,v4,00/10] devlink: linecard and reporters locking cleanup

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

Message

Jiri Pirko Jan. 11, 2023, 9:07 a.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

This patchset does not change functionality.

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

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

---
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 (10):
  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()

 .../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    |   8 +-
 .../ethernet/mellanox/mlxsw/core_linecards.c  |   8 +-
 drivers/net/netdevsim/health.c                |  20 +-
 include/net/devlink.h                         |  26 +-
 net/devlink/core.c                            |   4 -
 net/devlink/devl_internal.h                   |  20 +-
 net/devlink/leftover.c                        | 428 +++++++-----------
 net/devlink/netlink.c                         |  12 +-
 11 files changed, 213 insertions(+), 337 deletions(-)

Comments

Jacob Keller Jan. 12, 2023, 12:12 a.m. UTC | #1
On 1/11/2023 1:07 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> This patchset does not change functionality.
> 
> Patches 1-6 removes linecards and reporters locks and reference counting,
> converting them to be protected by devlink instance lock as the rest of
> the objects.
> 
> Patches 7 and 8 convert linecards and reporters dumpit callbacks to
> recently introduced devlink_nl_instance_iter_dump() infra.
> Patch 9 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.
> 
> ---

I think you said a v5 would be posted rebased on top of Kuba's fix, but
the whole series looks good to me.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

> 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 (10):
>   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()
> 
>  .../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    |   8 +-
>  .../ethernet/mellanox/mlxsw/core_linecards.c  |   8 +-
>  drivers/net/netdevsim/health.c                |  20 +-
>  include/net/devlink.h                         |  26 +-
>  net/devlink/core.c                            |   4 -
>  net/devlink/devl_internal.h                   |  20 +-
>  net/devlink/leftover.c                        | 428 +++++++-----------
>  net/devlink/netlink.c                         |  12 +-
>  11 files changed, 213 insertions(+), 337 deletions(-)
>
Leon Romanovsky Jan. 15, 2023, 9:16 a.m. UTC | #2
On Wed, Jan 11, 2023 at 10:07:38AM +0100, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> This patchset does not change functionality.

This series causes to some glitches in our CI. Jiri is looking into it.

Thanks
Jiri Pirko Jan. 16, 2023, 10:34 a.m. UTC | #3
Sun, Jan 15, 2023 at 10:16:24AM CET, leon@kernel.org wrote:
>On Wed, Jan 11, 2023 at 10:07:38AM +0100, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@nvidia.com>
>> 
>> This patchset does not change functionality.
>
>This series causes to some glitches in our CI. Jiri is looking into it.

I'm trying to untangle odd locking scheme during mlx5 auxdev probe. Stay
tuned.

>
>Thanks