netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Ease to follow an interface that moves to another netns
@ 2018-01-25 14:01 Nicolas Dichtel
  2018-01-25 14:01 ` [PATCH net-next 1/2] dev: always advertise the new nsid when the netns iface changes Nicolas Dichtel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nicolas Dichtel @ 2018-01-25 14:01 UTC (permalink / raw)
  To: davem; +Cc: netdev, jbenc, christian.brauner


The goal of this series is to ease the user to follow an interface that
moves to another netns.

After this series, with a patched iproute2:

$ ip netns
bar
foo
$ ip monitor link &
$ ip link set dummy0 netns foo
Deleted 5: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default
    link/ether 6e:a7:82:35:96:46 brd ff:ff:ff:ff:ff:ff new-nsid 0 new-ifindex 6

=> new nsid: 0, new ifindex: 6 (was 5 in the previous netns)

$ ip link set eth1 netns bar
Deleted 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
    link/ether 52:54:01:12:34:57 brd ff:ff:ff:ff:ff:ff new-nsid 1 new-ifindex 3

=> new nsid: 1, new ifindex: 3 (same ifindex)

$ ip netns
bar (id: 1)
foo (id: 0)

 include/linux/rtnetlink.h    |  5 +++--
 include/uapi/linux/if_link.h |  1 +
 net/core/dev.c               | 22 ++++++++++++----------
 net/core/rtnetlink.c         | 31 ++++++++++++++++++++-----------
 4 files changed, 36 insertions(+), 23 deletions(-)

Comments are welcomed,
Regards,
Nicolas

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-29 17:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-25 14:01 [PATCH net-next 0/2] Ease to follow an interface that moves to another netns Nicolas Dichtel
2018-01-25 14:01 ` [PATCH net-next 1/2] dev: always advertise the new nsid when the netns iface changes Nicolas Dichtel
2018-01-25 22:32   ` Jiri Benc
2018-01-25 14:01 ` [PATCH net-next 2/2] dev: advertise the new ifindex " Nicolas Dichtel
2018-01-25 22:33   ` Jiri Benc
2018-01-29 17:36 ` [PATCH net-next 0/2] Ease to follow an interface that moves to another netns David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).