Thread (2 messages) 2 messages, 2 authors, 2014-10-03

Re: [RFC PATCH net-next v3 1/4] netns: add genl cmd to add and get peer netns ids

From: Nicolas Dichtel <hidden>
Date: 2014-10-03 12:22:35
Also in: linux-api, lkml

Le 02/10/2014 21:33, Eric W. Biederman a écrit :
Nicolas Dichtel [off-list ref] writes:
quoted
With this patch, a user can define an id for a peer netns by providing a FD or a
PID. These ids are local to netns (ie valid only into one netns).

This will be useful for netlink messages when a x-netns interface is
dumped.
You have a "id -> struct net *" table but you don't have a
"struct net * -> id" table which looks like it will impact the
performance of peernet2id at scale.
It is indirectly stores in 'struct idr'. It can be optimized later, with a
proper algorithm to find quickly this 'struct net *' (hash table? something
else?). A basic algorithm will not be more scalable than the current
idr_for_each().
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help