Subject: Re: [patch net-next v2 4/9] devlink: remove reporters_lock

From: Ido Schimmel <[email-masked]>
Date: Sun, 8 Jan 2023 18:28:50 +0200

On Sat, Jan 07, 2023 at 11:11:45AM +0100, Jiri Pirko wrote:
> From: Jiri Pirko <[email-masked]>
> 
> Similar to other devlink objects, convert the reporters list to be
> protected by devlink instance lock. Alongside add unlocked versions
> of health reporter create functions and remove port-specific destroy
> function which is no longer needed.
> 
> Signed-off-by: Jiri Pirko <[email-masked]>
> ---
>  .../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 +-
>  drivers/net/netdevsim/health.c                |  20 +--
>  include/net/devlink.h                         |  20 +--
>  net/devlink/core.c                            |   2 -
>  net/devlink/devl_internal.h                   |   1 -
>  net/devlink/leftover.c                        | 131 +++++++-----------
>  9 files changed, 96 insertions(+), 110 deletions(-)

This is quite difficult to review because there are multiple changes
squashed into one patch:

1. Addition of locked versions of both device and port health reporter
while refactoring the code to share code paths.

2. Removal of the reporters mutex.

3. Partial conversion of drivers to use the locked APIs. The conversion
of mlxsw and netdevsim is trivial because they hold the instance lock
during probe, but the conversion of mlx5 is less trivial. I would split
it into a separate patch.