From: Jiri Benc <jbenc@redhat.com>
To: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: Christian Brauner <christian.brauner@canonical.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
davem@davemloft.net, kuznet@ms2.inr.ac.ru,
yoshfuji@linux-ipv6.org, pombredanne@nexb.com,
kstewart@linuxfoundation.org, gregkh@linuxfoundation.org,
dsahern@gmail.com, fw@strlen.de, lucien.xin@gmail.com,
jakub.kicinski@netronome.com, nicolas.dichtel@6wind.com
Subject: Re: [PATCH net-next 0/5] rtnetlink: add IFA_IF_NETNSID for RTM_GETADDR
Date: Mon, 3 Sep 2018 15:50:20 +0200 [thread overview]
Message-ID: <20180903155020.6112f773@redhat.com> (raw)
In-Reply-To: <2319a029-7aca-b7aa-2e8f-4dfdeedcb6df@virtuozzo.com>
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
next prev parent reply other threads:[~2018-09-03 13:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 23:18 [PATCH net-next 0/5] rtnetlink: add IFA_IF_NETNSID for RTM_GETADDR Christian Brauner
2018-08-28 23:18 ` [PATCH net-next 1/5] rtnetlink: add rtnl_get_net_ns_capable() Christian Brauner
2018-08-28 23:18 ` [PATCH net-next 2/5] if_addr: add IFA_IF_NETNSID Christian Brauner
2018-08-28 23:18 ` [PATCH net-next 3/5] ipv4: enable IFA_IF_NETNSID for RTM_GETADDR Christian Brauner
2018-08-28 23:18 ` [PATCH net-next 4/5] ipv6: " Christian Brauner
2018-08-30 18:41 ` kbuild test robot
2018-09-03 1:18 ` Christian Brauner
2018-08-28 23:18 ` [PATCH net-next 5/5] rtnetlink: move type calculation out of loop Christian Brauner
2018-08-29 8:30 ` [PATCH net-next 0/5] rtnetlink: add IFA_IF_NETNSID for RTM_GETADDR Kirill Tkhai
2018-08-29 18:13 ` Christian Brauner
2018-08-30 8:49 ` Kirill Tkhai
2018-08-30 14:45 ` Christian Brauner
2018-08-30 15:49 ` Nicolas Dichtel
2018-09-01 0:58 ` David Miller
2018-09-01 18:47 ` Christian Brauner
2018-09-02 9:58 ` Jiri Benc
2018-09-03 7:50 ` Nicolas Dichtel
2018-09-03 9:32 ` Christian Brauner
2018-09-01 1:34 ` Christian Brauner
2018-09-03 13:41 ` Kirill Tkhai
2018-09-03 13:50 ` Jiri Benc [this message]
2018-09-03 14:53 ` Kirill Tkhai
2018-09-03 14:22 ` Christian Brauner
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=20180903155020.6112f773@redhat.com \
--to=jbenc@redhat.com \
--cc=christian.brauner@canonical.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=fw@strlen.de \
--cc=gregkh@linuxfoundation.org \
--cc=jakub.kicinski@netronome.com \
--cc=kstewart@linuxfoundation.org \
--cc=ktkhai@virtuozzo.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pombredanne@nexb.com \
--cc=yoshfuji@linux-ipv6.org \
/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).