[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ae44a2ea-6565-8931-8a15-f4fd42a1be88@6wind.com>
Date: Tue, 23 Jan 2018 17:37:11 +0100
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Jiri Benc <jbenc@...hat.com>,
Christian Brauner <christian.brauner@...onical.com>
Cc: Christian Brauner <christian.brauner@...ntu.com>,
davem@...emloft.net, dsahern@...il.com, fw@...len.de,
daniel@...earbox.net, lucien.xin@...il.com,
mschiffer@...verse-factory.net, jakub.kicinski@...ronome.com,
vyasevich@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, stephen@...workplumber.org
Subject: Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd
Le 22/01/2018 à 23:06, Jiri Benc a écrit :
[snip]
> Btw, we have one missing piece here: when an interface is moved to a
> name space that does not have netnsid attached, we want to find out
> where the interface was moved to. But there's currently no reliable way
> to do it. For veth, the other end can be used to get the netnsid (note
> that RTM_GETLINK will return the correct link netnsid even when the
> queried veth interface is in a different name space), for openvswitch,
> we can now use genetlink, etc., but using different ways for different
> interface types is not the best API ever and for standalone interfaces
> we have nothing. I'd like to see something added to uAPI to cover this
> in a generic way.
When a virtual interface moves to another netns, the netlink RTM_DELLINK message
contains the attribute IFLA_NEW_NETNSID, which identifies where the interface
moves. The nsid may be allocated if needed.
I don't know if it's acceptable to also allocate an nsid in case of a physical
interface.
Regards,
Nicolas
Powered by blists - more mailing lists