From: Leon Romanovsky <leon@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>, Shannon Nelson <shnelson@amd.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, edumazet@google.com,
michael.chan@broadcom.com, ioana.ciornei@nxp.com,
dmichail@fungible.com, jesse.brandeburg@intel.com,
anthony.l.nguyen@intel.com, tchornyi@marvell.com,
tariqt@nvidia.com, saeedm@nvidia.com, idosch@nvidia.com,
petrm@nvidia.com, vladimir.oltean@nxp.com,
claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com,
simon.horman@corigine.com, shannon.nelson@amd.com,
brett.creeley@amd.com
Subject: Re: [patch net-next 1/8] devlink: call devlink_port_register/unregister() on registered instance
Date: Tue, 6 Dec 2022 09:56:38 +0200 [thread overview]
Message-ID: <Y471ttoWlBCVMFJf@unreal> (raw)
In-Reply-To: <Y47yMItMuOfCrwiO@nanopsycho>
On Tue, Dec 06, 2022 at 08:41:36AM +0100, Jiri Pirko wrote:
> Tue, Dec 06, 2022 at 12:55:32AM CET, shnelson@amd.com wrote:
> >On 12/5/22 7:22 AM, Jiri Pirko wrote:
> >>
> >> From: Jiri Pirko <jiri@nvidia.com>
> >>
> >> Change the drivers that use devlink_port_register/unregister() to call
> >> these functions only in case devlink is registered.
> >>
> >> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
> >> ---
> >> RFC->v1:
> >> - shortened patch subject
> >> ---
> >> .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 29 ++++++++++---------
> >> .../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 7 +++--
> >> .../ethernet/fungible/funeth/funeth_main.c | 17 +++++++----
> >> drivers/net/ethernet/intel/ice/ice_main.c | 21 ++++++++------
> >> .../ethernet/marvell/prestera/prestera_main.c | 6 ++--
> >> drivers/net/ethernet/mscc/ocelot_vsc7514.c | 10 +++----
> >> .../ethernet/pensando/ionic/ionic_devlink.c | 6 ++--
> >> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 +++--
> >> 8 files changed, 60 insertions(+), 43 deletions(-)
> >>
<...>
> >I don't know about the rest of the drivers, but this seems to be the exact
> >opposite of what Leon did in this patch over a year ago:
> >https://lore.kernel.org/netdev/cover.1632565508.git.leonro@nvidia.com/
>
> This patch did move for all objects, even for those where no issue
> existed. Ports are such.
Yeah, I was focused to move devlink_register() without any checks if
other devlink_* calls can be after it. The reason for that was desire
to make sure that we have devl_lock() on all netlink devlink calls.
Now, all commands are locked and we don't have commands which unlock
devlink internally and it is safe to move some devlink_* calls to be
after devlink_register() as long as they take devl_lock() and don't
mess with static devlink object data.
Thanks
next prev parent reply other threads:[~2022-12-06 7:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 15:22 [patch net-next 0/8] devlink: make sure devlink port registers/unregisters only for registered instance Jiri Pirko
2022-12-05 15:22 ` [patch net-next 1/8] devlink: call devlink_port_register/unregister() on " Jiri Pirko
2022-12-05 23:55 ` Shannon Nelson
2022-12-06 7:41 ` Jiri Pirko
2022-12-06 7:56 ` Leon Romanovsky [this message]
2022-12-06 17:35 ` Shannon Nelson
2022-12-07 13:27 ` Jiri Pirko
2022-12-07 19:45 ` Shannon Nelson
2022-12-05 15:22 ` [patch net-next 2/8] netdevsim: call devl_port_register/unregister() " Jiri Pirko
2022-12-05 15:22 ` [patch net-next 3/8] mlxsw: " Jiri Pirko
2022-12-05 15:22 ` [patch net-next 4/8] nfp: " Jiri Pirko
2022-12-05 15:22 ` [patch net-next 5/8] mlx4: " Jiri Pirko
2022-12-05 15:22 ` [patch net-next 6/8] mlx5: " Jiri Pirko
2022-12-05 15:22 ` [patch net-next 7/8] devlink: assert if devl_port_register/unregister() is called on unregistered devlink instance Jiri Pirko
2022-12-05 15:22 ` [patch net-next 8/8] devlink: remove port notifications from devlink_register/unregister() Jiri Pirko
2022-12-06 1:08 ` [patch net-next 0/8] devlink: make sure devlink port registers/unregisters only for registered instance Jakub Kicinski
2022-12-06 7:44 ` Jiri Pirko
2022-12-06 20:12 ` Jakub Kicinski
2022-12-07 13:28 ` 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=Y471ttoWlBCVMFJf@unreal \
--to=leon@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=anthony.l.nguyen@intel.com \
--cc=brett.creeley@amd.com \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=dmichail@fungible.com \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=ioana.ciornei@nxp.com \
--cc=jesse.brandeburg@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=shannon.nelson@amd.com \
--cc=shnelson@amd.com \
--cc=simon.horman@corigine.com \
--cc=tariqt@nvidia.com \
--cc=tchornyi@marvell.com \
--cc=vladimir.oltean@nxp.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.