[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190812181100.1cfd8b9d@cakuba.netronome.com>
Date: Mon, 12 Aug 2019 18:11:00 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: David Ahern <dsahern@...il.com>
Cc: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org,
davem@...emloft.net, stephen@...workplumber.org, mlxsw@...lanox.com
Subject: Re: [patch net-next v3 0/3] net: devlink: Finish network namespace
support
On Mon, 12 Aug 2019 18:24:41 -0600, David Ahern wrote:
> On 8/12/19 7:47 AM, Jiri Pirko wrote:
> > From: Jiri Pirko <jiri@...lanox.com>
> >
> > Devlink from the beginning counts with network namespaces, but the
> > instances has been fixed to init_net. The first patch allows user
> > to move existing devlink instances into namespaces:
> >
> > $ devlink dev
> > netdevsim/netdevsim1
> > $ ip netns add ns1
> > $ devlink dev set netdevsim/netdevsim1 netns ns1
> > $ devlink -N ns1 dev
> > netdevsim/netdevsim1
> >
> > The last patch allows user to create new netdevsim instance directly
> > inside network namespace of a caller.
>
> The namespace behavior seems odd to me. If devlink instance is created
> in a namespace and never moved, it should die with the namespace. With
> this patch set, devlink instance and its ports are moved to init_net on
> namespace delete.
If the devlink instance just disappeared - that'd be a very very strange
thing. Only software objects disappear with the namespace.
Netdevices without ->rtnl_link_ops go back to init_net.
Powered by blists - more mailing lists