diff options
| author | Pavel Emelyanov <[email protected]> | 2012-08-08 21:53:19 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2012-08-09 23:18:07 +0000 |
| commit | aa79e66eee5d525e2fcbd2a5fcb87ae3dd4aa9e9 (patch) | |
| tree | fd275880600683733adcb1d84477ea35a04dd901 /drivers/net/loopback.c | |
| parent | veth: Allow to create peer link with given ifindex (diff) | |
| download | kernel-aa79e66eee5d525e2fcbd2a5fcb87ae3dd4aa9e9.tar.gz kernel-aa79e66eee5d525e2fcbd2a5fcb87ae3dd4aa9e9.zip | |
net: Make ifindex generation per-net namespace
Strictly speaking this is only _really_ required for checkpoint-restore to
make loopback device always have the same index.
This change appears to be safe wrt "ifindex should be unique per-system"
concept, as all the ifindex usage is either already made per net namespace
of is explicitly limited with init_net only.
There are two cool side effects of this. The first one -- ifindices of
devices in container are always small, regardless of how many containers
we've started (and re-started) so far. The second one is -- we can speed
up the loopback ifidex access as shown in the next patch.
v2: Place ifindex right after dev_base_seq : avoid two holes and use the
same cache line, dirtied in list_netdevice()/unlist_netdevice()
Signed-off-by: Pavel Emelyanov <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/loopback.c')
0 files changed, 0 insertions, 0 deletions
