OpenVZ Forum


Home » Mailing lists » Devel » [PATCH][NETNS] Make ifindex generation per-namespace
Re: [PATCH][NETNS] Make ifindex generation per-namespace [message #21487 is a reply to message #21458] Tue, 09 October 2007 20:12 Go to previous messageGo to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Pavel Emelyanov <xemul@openvz.org>
Date: Tue, 09 Oct 2007 16:19:25 +0400

> Currently indexes for netdevices come sequentially one by
> one, and the same stays true even for devices that are 
> created for namespaces.
> 
> Side effects of this are:
>  * lo device has not 1 index in a namespace. This may break
>    some userspace that relies on it (and AFAIR something
>    really broke in OpenVZ VEs without this);
>  * after some time namespaces will have devices with indexes
>    like 1000000 os similar. This might be confusing for a
>    human (tools will not mind).
> 
> So move the (currently "global" and static) ifindex variable
> on the struct net, making the indexes allocation look more
> like on a standalone machine.
> 
> Moreover - when we have indexes intersect between namespaces,
> we may catch more BUGs in the future related to "wrong device 
> was found for a given index".
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Based upon Eric's and other's comments, I'm holding off on
this for now.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 5/5] make netlink user -> kernel interface synchronious
Next Topic: [PATCH 1/5] net: Modify all rtnetlink methods to only work in the initial namespace
Goto Forum:
  


Current Time: Wed Sep 18 05:51:52 GMT 2024

Total time taken to generate the page: 0.08950 seconds