From: Jakub Kicinski <kuba@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, pabeni@redhat.com,
edumazet@google.com, andrew@lunn.ch, vivien.didelot@gmail.com,
f.fainelli@gmail.com, olteanv@gmail.com, tariqt@nvidia.com,
moshe@nvidia.com, saeedm@nvidia.com
Subject: Re: [patch net-next 0/7] devlink: sanitize per-port region creation/destruction
Date: Fri, 26 Aug 2022 17:22:43 -0700 [thread overview]
Message-ID: <20220826172243.16ad86fe@kernel.org> (raw)
In-Reply-To: <YwiChaPfZKkAK/c4@nanopsycho>
On Fri, 26 Aug 2022 10:21:25 +0200 Jiri Pirko wrote:
>> The point of exposing the devlink lock was to avoid forcing drivers
>> to order object registration in a specific way. I don't like.
>
> Well for params, we are also forcing them in a specific way. The
> regions, with the DSA exception which is not voluntary, don't need to be
> created/destroyed during devlink/port being registered.
>
> I try to bring some order to the a bit messy devlink world. The
> intention is to make everyone's live happier :)
The way I remember it - we had to keep the ordering on resources for
mlx4 because of complicated locking/async nature of events, and since
it's a driver for a part which is much EoL we won't go back now and do
major surgery, that's fine.
But that shouldn't mean that the recommended way of using resources is
"hook them up before register". The overall devlink locking ordering
should converge towards the "hold devl_lock() around registration of
your components, or whenever the device goes out of consistent state".
next prev parent reply other threads:[~2022-08-27 0:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 10:33 [patch net-next 0/7] devlink: sanitize per-port region creation/destruction Jiri Pirko
2022-08-25 10:33 ` [patch net-next 1/7] netdevsim: don't re-create dummy region during devlink reload Jiri Pirko
2022-08-25 10:33 ` [patch net-next 2/7] net: devlink: introduce port registered assert helper and use it Jiri Pirko
2022-08-25 10:33 ` [patch net-next 3/7] net: devlink: introduce a flag to indicate devlink port being registered Jiri Pirko
2022-08-25 10:33 ` [patch net-next 4/7] net: devlink: add port_init/fini() helpers to allow pre-register/post-unregister functions Jiri Pirko
2022-08-25 10:33 ` [patch net-next 5/7] net: dsa: move port_setup/teardown to be called outside devlink port registered area Jiri Pirko
2022-08-25 10:33 ` [patch net-next 6/7] net: dsa: don't do devlink port setup early Jiri Pirko
2022-08-25 22:47 ` Vladimir Oltean
2022-08-26 8:37 ` Jiri Pirko
2022-08-25 10:34 ` [patch net-next 7/7] net: devlink: convert region create/destroy() to be forbidden on registered devlink/port Jiri Pirko
2022-08-25 22:01 ` [patch net-next 0/7] devlink: sanitize per-port region creation/destruction Jakub Kicinski
2022-08-26 8:21 ` Jiri Pirko
2022-08-27 0:22 ` Jakub Kicinski [this message]
2022-08-27 7:39 ` 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=20220826172243.16ad86fe@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=jiri@resnulli.us \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=vivien.didelot@gmail.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).