From: Jiri Pirko <jiri@resnulli.us>
To: Ido Schimmel <idosch@nvidia.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, edumazet@google.com,
michael.chan@broadcom.com, yisen.zhuang@huawei.com,
salil.mehta@huawei.com, jesse.brandeburg@intel.com,
anthony.l.nguyen@intel.com, tariqt@nvidia.com, saeedm@nvidia.com,
leon@kernel.org, petrm@nvidia.com, mailhol.vincent@wanadoo.fr,
jacob.e.keller@intel.com, gal@nvidia.com
Subject: Re: [patch net-next v2 4/9] devlink: remove reporters_lock
Date: Mon, 9 Jan 2023 09:44:08 +0100 [thread overview]
Message-ID: <Y7vT2IwhmJ5PK6F1@nanopsycho> (raw)
In-Reply-To: <Y7rvQkoatRhKMwGI@shredder>
Sun, Jan 08, 2023 at 05:28:50PM CET, idosch@nvidia.com wrote:
>On Sat, Jan 07, 2023 at 11:11:45AM +0100, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@nvidia.com>
>>
>> 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 <jiri@nvidia.com>
>> ---
>> .../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.
Yeah, I was thinking about splitting this, however since the new lock
needs to be used on locked path with different helpers, it is not easy
to find a good split, was a bit lazy to do that. Anyway, let me think
and try again. Thanks!
next prev parent reply other threads:[~2023-01-09 8:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-07 10:11 [patch net-next v2 0/9] devlink: features, linecard and reporters locking cleanup Jiri Pirko
2023-01-07 10:11 ` [patch net-next v2 1/9] devlink: remove devlink features Jiri Pirko
2023-01-08 15:32 ` Ido Schimmel
2023-01-09 8:41 ` Jiri Pirko
2023-01-07 10:11 ` [patch net-next v2 2/9] devlink: remove linecards lock Jiri Pirko
2023-01-08 15:42 ` Ido Schimmel
2023-01-09 8:42 ` Jiri Pirko
2023-01-07 10:11 ` [patch net-next v2 3/9] devlink: remove linecard reference counting Jiri Pirko
2023-01-08 15:50 ` Ido Schimmel
2023-01-09 8:42 ` Jiri Pirko
2023-01-07 10:11 ` [patch net-next v2 4/9] devlink: remove reporters_lock Jiri Pirko
2023-01-08 16:28 ` Ido Schimmel
2023-01-09 8:44 ` Jiri Pirko [this message]
2023-01-07 10:11 ` [patch net-next v2 5/9] devlink: remove reporter reference counting Jiri Pirko
2023-01-07 10:11 ` [patch net-next v2 6/9] devlink: convert linecards dump to devlink_nl_instance_iter_dump() Jiri Pirko
2023-01-08 17:01 ` Ido Schimmel
2023-01-07 10:11 ` [patch net-next v2 7/9] devlink: convert reporters " Jiri Pirko
2023-01-07 10:11 ` [patch net-next 8/8] devlink: add instance lock assertion in devl_is_registered() Jiri Pirko
2023-01-07 10:11 ` [patch net-next v2 8/9] devlink: remove devlink_dump_for_each_instance_get() helper Jiri Pirko
2023-01-07 10:26 ` [patch net-next v2 9/9] devlink: add instance lock assertion in devl_is_registered() Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y7vT2IwhmJ5PK6F1@nanopsycho \
--to=jiri@resnulli.us \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=idosch@nvidia.com \
--cc=jacob.e.keller@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=salil.mehta@huawei.com \
--cc=tariqt@nvidia.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).