From: Jakub Kicinski <kuba@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Shay Drory <shayd@nvidia.com>,
netdev@vger.kernel.org, pabeni@redhat.com, davem@davemloft.net,
edumazet@google.com, Jiri Pirko <jiri@nvidia.com>
Subject: Re: [PATCH net v2] devlink: Delay health recover notification until devlink registered
Date: Fri, 11 Aug 2023 14:42:31 -0700 [thread overview]
Message-ID: <20230811144231.0cea3205@kernel.org> (raw)
In-Reply-To: <ZNXrr7MspgDp8QfA@nanopsycho>
On Fri, 11 Aug 2023 10:05:03 +0200 Jiri Pirko wrote:
> This patch is not about user accessing it, this is about
> notification that would be tried to send before the instance is
> registered. So the lock scheme you suggest is not necessary. What helps
> is to move devl_port_health_reporter_create() call after register.
We moved to a model where the instance is registered early,
why is the driver not registering the instance early?
My first choice would be to fix the driver rather than adjust
the behavior of the core, and I'm hearing no solid reason why
that's not possible.
> We have the same issue with mlxsw where this notification may be called
> before register from mlxsw_core_health_event_work()
mlxsw? I somehow assumed this patch was for mlx5..
Quality commit message :|
> Limiting the creation of health reporter only when instance is
> registered does not seem like a good solution to me.
>
> As with any other object, we postpone the notifications only after
> register is done, that sounds fine, doesn't it?
No, it doesn't. Registering health reporters on a semi-initialized
device is a major foot gun, we should not allow this unless really
necessary.
next prev parent reply other threads:[~2023-08-11 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 20:35 [PATCH net v2] devlink: Delay health recover notification until devlink registered Shay Drory
2023-08-10 17:33 ` Jakub Kicinski
2023-08-11 8:05 ` Jiri Pirko
2023-08-11 21:42 ` Jakub Kicinski [this message]
2023-08-11 22:14 ` Jakub Kicinski
2023-08-13 10:12 ` Shay Drory
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=20230811144231.0cea3205@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shayd@nvidia.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).