On 2014-09-10 13:32:00 +0400, Alexander Y. Fomichev wrote: > > I've reproduced the problem on another machine where it's perfectly > > reproducible (except being about mv-bond0). > > did you mean this is a macvlan which has bond as a real device?
Only on the other machine where I tried it. It's not dependent on that. Here's a reproducer running in a stock kernel: # ip netns add testns # ip link add link eth0 name eth0-mv1 netns testns type macvlan # readlink -f /sys/class/net/eth0/upper_eth0-mv1 /sys/devices/virtual/net/eth0-mv1 # ls -l /sys/devices/virtual/net/eth0-mv1 ls: cannot access /sys/devices/virtual/net/eth0-mv1: No such file or directory # ip netns exec testns readlink -f /sys/class/net/eth0-mv1/lower_eth0 /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0 # ip netns exec testns ls -l /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0 ls: cannot access /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0: No such file or directory # ip netns exec testns ip link delete eth0-mv1 # ip link add link eth0 name eth0-mv1 netns testns type macvlan RTNETLINK answers: File exists Afaics the behaviour with the broken symlinks is old, and the actual root cause for the bug. The new thing is that it causes re-adding the same interface to fail. Note that the issue is *not* reproducible when moving the interface into the namespace after creation. So I guess that's the problem. > hmm... current implementation of bonding unconditionally > refuses to switch ns due to NETIF_F_NETNS_LOCAL flag afaik, > macvlan steals flags from lowerdev so it should behave the same. > just to clarify: custom patches? No custom patches. And this really isn't related to bonding - the only reason bond0 was mentioned was because one of the machines I could reboot used bonding. As seen above it's independant of that. > btw, could i ask you to try attached patch? I'll try later. Thought it made sense to give you the above reproducer alone. Greetings, Andres Freund -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/