From: Jakub Kicinski <kuba@kernel.org>
To: Mark Bloch <mbloch@nvidia.com>
Cc: Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Jiri Pirko <jiri@resnulli.us>, Simon Horman <horms@kernel.org>,
Sunil Goutham <sgoutham@marvell.com>,
Linu Cherian <lcherian@marvell.com>,
Geetha sowjanya <gakula@marvell.com>,
hariprasad <hkelam@marvell.com>,
Subbaraya Sundeep <sbhatta@marvell.com>,
Bharat Bhushan <bbhushan2@marvell.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
Ethan Nelson-Moore <enelsonmoore@gmail.com>,
<linux-doc@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-rdma@vger.kernel.org>
Subject: Re: [PATCH net-next V3 2/7] netdevsim: Register devlink after device init
Date: Wed, 10 Jun 2026 16:50:53 -0700 [thread overview]
Message-ID: <20260610165053.7c91f331@kernel.org> (raw)
In-Reply-To: <20260605181030.3486619-3-mbloch@nvidia.com>
On Fri, 5 Jun 2026 21:10:25 +0300 Mark Bloch wrote:
> devl_register() makes the devlink instance visible to userspace. A later
> patch also makes registration the point where devlink core may call
> eswitch_mode_set() to apply a boot-time default eswitch mode.
>
> Move netdevsim registration after all objects (resources, params, regions,
> traps, debugfs etc) are initialized, and after the initial eswitch mode is
> set to legacy.
>
> Move devl_unregister() to the beginning of nsim_drv_remove(), before those
> devlink objects are torn down. This keeps devlink register/unregister as
> the notification barrier and makes the later object teardown paths run
> after devlink is no longer registered, so they do not emit their own
> netlink DEL notifications.
This is going backwards. At some point someone from nVidia thought that
we can order our way out of locking, so mlx5 is likely ordered this way,
but this must not be required, or in any way normalized.
We (syzbot) quickly discovered that it doesn't cover all corner cases.
devl_lock() is exposed specifically to allow the driver to finish
whatever init it needs without letting user space invoke callbacks, yet.
Almost (?) all driver callbacks hold devl_lock(), so maybe the devlink
instance is "visible" to user space but that should not matter.
next prev parent reply other threads:[~2026-06-10 23:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 18:10 [PATCH net-next V3 0/7] devlink: Add boot-time eswitch mode defaults Mark Bloch
2026-06-05 18:10 ` [PATCH net-next V3 1/7] devlink: Skip health recover notifications before register Mark Bloch
2026-06-05 18:10 ` [PATCH net-next V3 2/7] netdevsim: Register devlink after device init Mark Bloch
2026-06-10 23:50 ` Jakub Kicinski [this message]
2026-06-11 6:02 ` Mark Bloch
2026-06-05 18:10 ` [PATCH net-next V3 3/7] net/mlx5: Clear FW reset-in-progress bit before reload Mark Bloch
2026-06-05 18:10 ` [PATCH net-next V3 4/7] net/mlx5: Register devlink after device init Mark Bloch
2026-06-05 18:10 ` [PATCH net-next V3 5/7] octeontx2-af: Register devlink after SR-IOV init Mark Bloch
2026-06-05 18:10 ` [PATCH net-next V3 6/7] octeontx2-pf: Register devlink after SR-IOV state init Mark Bloch
2026-06-05 18:10 ` [PATCH net-next V3 7/7] devlink: Add eswitch mode boot defaults Mark Bloch
2026-06-05 19:37 ` [PATCH net-next V3 0/7] devlink: Add boot-time eswitch mode defaults Borislav Petkov
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=20260610165053.7c91f331@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=enelsonmoore@gmail.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=lcherian@marvell.com \
--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=sbhatta@marvell.com \
--cc=sgoutham@marvell.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.