[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180903155020.6112f773@redhat.com>
Date: Mon, 3 Sep 2018 15:50:20 +0200
From: Jiri Benc <jbenc@...hat.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: Christian Brauner <christian.brauner@...onical.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
davem@...emloft.net, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
pombredanne@...b.com, kstewart@...uxfoundation.org,
gregkh@...uxfoundation.org, dsahern@...il.com, fw@...len.de,
lucien.xin@...il.com, jakub.kicinski@...ronome.com,
nicolas.dichtel@...nd.com
Subject: Re: [PATCH net-next 0/5] rtnetlink: add IFA_IF_NETNSID for
RTM_GETADDR
On Mon, 3 Sep 2018 16:41:45 +0300, Kirill Tkhai wrote:
> But this is a synthetic test, while I asked about real workflow.
> Is this real problem for lxd, and there is observed performance
> decrease?
It's actually not as much a performance problem but rather the only way
to get the data in some situations. Namely, when you have only netnsid.
This happens e.g. when you want to query a veth peer in another netns.
setns() requires a file descriptor which you don't have. Nor there is
a way to convert netnsid to a fd.
While developing the IFLA_IF_NETNSID patch, I was first thinking about
implementing an API doing the conversion. The problem is there's no
good place to put this into. It can't be done over netlink: netlink is
unreliable and you can't have the kernel open a fd for you and lose it.
There's no ioctl to use. So we'd be left with a procfs/sysfs or a
syscall.
Using netnsid to refer to the target netns seems to be a nice solution -
after all, netnsid is the identifier to use in netlink.
Jiri
Powered by blists - more mailing lists