Thread (19 messages) flat view 19 messages, 4 authors, 2012-08-04

Re: [PATCH 1/2] net: Allow to create links with given ifindex

From: Eric W. Biederman <hidden>
Date: 2012-07-30 10:56:53

ebiederm@xmission.com (Eric W. Biederman) writes:
Pavel Emelyanov [off-list ref] writes:
quoted
Currently the RTM_NEWLINK results in -EOPNOTSUPP if the ifinfomsg->ifi_index
is not zero. I propose to allow requesting ifindices on link creation. This
is required by the checkpoint-restore to correctly restore a net namespace
(i.e. -- a container). The question what to do with pre-created devices such
as lo or sit fbdev is open, but for manually created devices this can be 
solved by this patch.
Have you walked through and found the locations where we still rely on
ifindex being globally unique?

Last time I was working in this area there were serveral places where
things were indexed by just the interface index.
If it is really safe to make ifindex per network namespace at this
point you can make dev_new_ifindex have a per network namespace base
counter, and that will fix your problems with the loopback device.

Unless you have done the work to root out the last of dependencies on
ifindex being globally unique I think you will run into some operational
problems.

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help