From: Jakub Kicinski <kuba@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, pabeni@redhat.com, davem@davemloft.net,
edumazet@google.com, moshe@nvidia.com, saeedm@nvidia.com,
shayd@nvidia.com, leon@kernel.org
Subject: Re: [patch net-next 0/4] net/mlx5: expose peer SF devlink instance
Date: Fri, 18 Aug 2023 14:20:07 -0700 [thread overview]
Message-ID: <20230818142007.206eeb13@kernel.org> (raw)
In-Reply-To: <ZN8eCeDGcQSCi1D6@nanopsycho>
On Fri, 18 Aug 2023 09:30:17 +0200 Jiri Pirko wrote:
> >The devlink instance of the SF stays in the same network namespace
> >as the PF?
>
> SF devlink instance is created in init_ns and can move to another one.
> So no.
>
> I was thinking about this, as with the devlink handles we are kind of in
> between sysfs and network. We have concept of network namespace in
> devlink, but mainly because of the related netdevices.
>
> There is no possibility of collision of devlink handles in between
> separate namespaces, the handle is ns-unaware. Therefore the linkage to
> instance in different ns is okay, I believe. Even more, It is handy as
> the user knows that there exists such linkage.
>
> What do you think?
The way I was thinking about it is that the placement of the dl
instance should correspond to the entity which will be configuring it.
Assume a typical container setup where app has net admin in its
netns and there is an orchestration daemon with root in init_net
which sets the containers up.
Will we ever want the app inside the netns to configure the interface
via the dl instance? Given that the SF is like giving the container
full access to the HW it seems to me that we should also delegate
the devlink control to the app, i.e. move it to the netns?
Same thing for devlink instances of VFs.
The orchestration daemon has access to the "PF" / main dl instance of
the device, and to the ports / port fns so it has other ways to control
the HW. While the app would otherwise have no devlink access.
So my intuition is that the devlink instance should follow the SF
netdev into a namespace.
And then the next question is - once the devlink instances are in
different namespaces - do we still show the "nested_devlink" attribute?
Probably yes but we need to add netns id / link as well?
next prev parent reply other threads:[~2023-08-18 21:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 14:51 [patch net-next 0/4] net/mlx5: expose peer SF devlink instance Jiri Pirko
2023-08-15 14:51 ` [patch net-next 1/4] net/mlx5: Disable eswitch as the first thing in mlx5_unload() Jiri Pirko
2023-08-15 14:51 ` [patch net-next 2/4] net/mlx5: Lift reload limitation when SFs are present Jiri Pirko
2023-08-15 14:51 ` [patch net-next 3/4] devlink: expose peer SF devlink instance Jiri Pirko
2023-08-15 14:51 ` [patch net-next 4/4] net/mlx5: SF, Implement peer devlink set for SF representor devlink port Jiri Pirko
2023-08-18 2:34 ` [patch net-next 0/4] net/mlx5: expose peer SF devlink instance Jakub Kicinski
2023-08-18 7:30 ` Jiri Pirko
2023-08-18 21:20 ` Jakub Kicinski [this message]
2023-08-21 10:49 ` Jiri Pirko
2023-08-21 20:19 ` Jakub Kicinski
2023-08-22 6:36 ` Jiri Pirko
2023-08-22 15:28 ` Jakub Kicinski
2023-08-22 17:40 ` Jiri Pirko
2023-08-23 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=20230818142007.206eeb13@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=leon@kernel.org \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=shayd@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.