From: Martin Habets <habetsm.xilinx@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Jiri Pirko <jiri@resnulli.us>,
"Lucero Palau, Alejandro" <alejandro.lucero-palau@amd.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-net-drivers (AMD-Xilinx)" <linux-net-drivers@amd.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"edumazet@google.com" <edumazet@google.com>,
"ecree.xilinx@gmail.com" <ecree.xilinx@gmail.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"jiri@nvidia.com" <jiri@nvidia.com>
Subject: Re: [PATCH v4 net-next 1/8] sfc: add devlink support for ef100
Date: Thu, 2 Feb 2023 09:24:56 +0000 [thread overview]
Message-ID: <Y9uA8Vk430k+ezTt@gmail.com> (raw)
In-Reply-To: <20230201110148.0ddd3a0b@kernel.org>
On Wed, Feb 01, 2023 at 11:01:48AM -0800, Jakub Kicinski wrote:
> On Wed, 1 Feb 2023 10:07:33 +0100 Jiri Pirko wrote:
> > >This is due to the recommended/required devlink lock/unlock during
> > >driver initialization/removal.
> > >
> > >I think it is better to keep the lock/unlock inside the specific driver
> > >devlink code, and the functions naming reflects a time window when
> > >devlink related/dependent processing is being done.
> > >
> > >I'm not against changing this, maybe adding the lock/unlock suffix would
> > >be preferable?:
> > >
> > >int efx_probe_devlink_and_lock(struct efx_nic *efx);
> > >void efx_probe_devlink_unlock(struct efx_nic *efx);
> > >void efx_fini_devlink_lock(struct efx_nic *efx);
> > >void efx_fini_devlink_and_unlock(struct efx_nic *efx);
> >
> > Sounds better. Thanks!
>
> FWIW I'd just take the devl lock in the main driver code.
> devlink should be viewed as a layer between bus and driver rather
> than as another subsystem the driver registers with. Otherwise reloads
> and port creation get awkward.
I see it a bit differently. For me devlink is another subsystem, it even is
an optional subsystem.
At the moment we don't support devlink port for VFs. If needed we'll add that
at some point, but likely only for newer NICs.
Do you think vDPA and RDMA devices will ever register with devlink?
At the moment I don't see devlink port ever applying to our older hardware,
like our sfn8000 or X2 cards. I do think devlink info and other commands
could apply more generally.
There definitely is a need to evolve to another layer between bus and
devices, and devlink can be used to administer that. But that does not
imply the reverse, that all devices register as devlink devices.
For security we would want to limit some operations (such as port creation)
to specific devlink instance(s). For example, normally we would not want a
tennant VM to flash new firmware that applies to the whole NIC.
I hope this makes sense.
Martin
next prev parent reply other threads:[~2023-02-02 9:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 14:58 [PATCH v4 net-next 0/8] sfc: devlink support for ef100 alejandro.lucero-palau
2023-01-31 14:58 ` [PATCH v4 net-next 1/8] sfc: add " alejandro.lucero-palau
2023-01-31 16:00 ` Jiri Pirko
2023-02-01 8:49 ` Lucero Palau, Alejandro
2023-02-01 9:07 ` Jiri Pirko
2023-02-01 19:01 ` Jakub Kicinski
2023-02-02 6:41 ` Lucero Palau, Alejandro
2023-02-02 9:24 ` Martin Habets [this message]
2023-02-02 17:43 ` Jakub Kicinski
2023-01-31 14:58 ` [PATCH v4 net-next 2/8] sfc: add devlink info " alejandro.lucero-palau
2023-01-31 16:03 ` Jiri Pirko
2023-02-01 9:09 ` Lucero Palau, Alejandro
2023-02-01 12:03 ` Jiri Pirko
2023-01-31 14:58 ` [PATCH v4 net-next 3/8] sfc: enumerate mports in ef100 alejandro.lucero-palau
2023-02-01 11:12 ` kernel test robot
2023-01-31 14:58 ` [PATCH v4 net-next 4/8] sfc: add mport lookup based on driver's mport data alejandro.lucero-palau
2023-01-31 14:58 ` [PATCH v4 net-next 5/8] sfc: add devlink port support for ef100 alejandro.lucero-palau
2023-01-31 16:12 ` Jiri Pirko
2023-02-01 9:03 ` Lucero Palau, Alejandro
2023-02-01 9:08 ` Jiri Pirko
2023-02-01 14:57 ` kernel test robot
2023-01-31 14:58 ` [PATCH v4 net-next 6/8] sfc: obtain device mac address based on firmware handle " alejandro.lucero-palau
2023-01-31 14:58 ` [PATCH v4 net-next 7/8] sfc: add support for devlink port_function_hw_addr_get in ef100 alejandro.lucero-palau
2023-02-01 19:15 ` kernel test robot
2023-01-31 14:58 ` [PATCH v4 net-next 8/8] sfc: add support for devlink port_function_hw_addr_set " alejandro.lucero-palau
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=Y9uA8Vk430k+ezTt@gmail.com \
--to=habetsm.xilinx@gmail.com \
--cc=alejandro.lucero-palau@amd.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).