From: Jakub Kicinski <kuba@kernel.org>
To: Mark Bloch <mbloch@nvidia.com>
Cc: Jiri Pirko <jiri@resnulli.us>, Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-doc@vger.kernel.org, Jiri Pirko <jiri@nvidia.com>
Subject: Re: [PATCH net-next V7 4/4] devlink: Apply eswitch mode boot defaults
Date: Fri, 31 Jul 2026 15:51:46 -0700 [thread overview]
Message-ID: <20260731155146.21c05157@kernel.org> (raw)
In-Reply-To: <716eaf68-6168-41fb-b705-e14e84910ea2@nvidia.com>
On Fri, 31 Jul 2026 16:52:25 +0300 Mark Bloch wrote:
> >> Maybe "after_init()" ? "in" sounds like we can release it multiple
> >> times but I think the idea is that it's the final, single "release
> >> into the wild" unlock.
> >
> > ack
>
> Just to make sure I understand the proposal.
>
> AFAIU devl_unlock_after_init() can be used in one of two ways:
>
> Convert all devlink drivers to use it for the final unlock, including
> drivers which don't support eswitch mode setting.
>
> That's a lot of churn for the few drivers which need this.
> We'd also need to make sure existing drivers are converted and new
> drivers use the right helper.
We can add a WARN_ON(!registered) to the normal unlock and it will
be impossible to miss the use of the wrong one?
> Convert only drivers which support eswitch mode setting.
>
> Then applying the default becomes driver opt-in, which AFAIU we were
> trying to avoid. For this feature it also looks very similar to the
> explicit apply API Jiri objected to.
Well, it would be a change to the init flow into which more things
can be hooked. We could also make it a separate "driver ready" call,
I guess, instead of packing it with the unlock. The point is that it's
not a eswitch-mode dedicated callback that's easy to miss in a driver.
> Which one do you have in mind?
>
> I don't think either option is great. Wouldn't it be simpler to queue
> work from devl_register(), as before? That keeps the logic out of
> devl_unlock() and doesn't require driver opt-in.
Having to edit the drivers is not a concern to me. That said, I do agree
that the API is somewhat awkward. It's a compromise. IDK.
prev parent reply other threads:[~2026-07-31 22:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 8:48 [PATCH net-next V7 0/4] devlink: Add boot-time eswitch mode defaults Mark Bloch
2026-07-16 8:48 ` [PATCH net-next V7 1/4] net/mlx5: Clear FW reset-in-progress bit before reload Mark Bloch
2026-07-16 8:48 ` [PATCH net-next V7 2/4] devlink: Factor out eswitch mode setting Mark Bloch
2026-07-16 8:48 ` [PATCH net-next V7 3/4] devlink: Parse eswitch mode boot defaults Mark Bloch
2026-07-16 8:48 ` [PATCH net-next V7 4/4] devlink: Apply " Mark Bloch
2026-07-24 23:11 ` Jakub Kicinski
2026-07-25 6:51 ` Mark Bloch
2026-07-27 20:10 ` Jakub Kicinski
2026-07-29 9:11 ` Jiri Pirko
2026-07-29 23:06 ` Jakub Kicinski
2026-07-30 11:00 ` Jiri Pirko
2026-07-31 13:52 ` Mark Bloch
2026-07-31 22:51 ` Jakub Kicinski [this message]
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=20260731155146.21c05157@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=skhan@linuxfoundation.org \
--cc=tariqt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.