From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] veth: report NEWLINK event when moving the peer device in a new namespace
Date: Fri, 31 Aug 2018 18:54:44 +0200 [thread overview]
Message-ID: <20180831165444.GE6236@localhost.localdomain> (raw)
In-Reply-To: <b3d8a5f8-4824-b450-2236-ea32aa52da83@gmail.com>
> On 8/31/18 10:19 AM, Lorenzo Bianconi wrote:
> >> On 8/31/18 5:43 AM, Lorenzo Bianconi wrote:
> >>> When moving a veth device to another namespace, userspace receives a
> >>> RTM_DELLINK message indicating the device has been removed from current
> >>> netns. However, the other peer does not receive a netlink event
> >>> containing new values for IFLA_LINK_NETNSID and IFLA_LINK veth
> >>> attributes.
> >>> Fix that behaviour sending to userspace a RTM_NEWLINK message in the peer
> >>> namespace to report new IFLA_LINK_NETNSID/IFLA_LINK values
> >>>
> >>
> >> A newlink message is generated in the new namespace. What information is
> >> missing from that message?
> >>
> >
> > Hi David,
> >
> > let's assume we have two veth paired devices (veth0 and veth1) on inet
> > namespace. When moving a veth1 to another namespace, userspace is notified
> > with RTM_DELLINK event on inet namespace to indicate that veth1 has been
> > moved to another namespace. However some userspace applications
> > (e.g. NetworkManager), listening for events on inet namespace, are interested
> > in veth1 ifindex in the new namespace. This patch sends a new RTM_NEWLINK event
> > in inet namespace to provide new values for IFLA_LINK_NETNSID/IFLA_LINK
>
> This is in init namespace
> $ ip li set veth2 netns foo
>
> $ ip monitor
> Deleted 20: veth2@veth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc
> noop state DOWN group default
> link/ether c6:d0:d6:c5:23:7d brd ff:ff:ff:ff:ff:ff new-netns foo
> new-ifindex 20
>
> It shows the new namespace in the delete message.
Ops, I have not noticed this info has been already introduced in
the commit 38e01b30563a ("dev: advertise the new ifindex when the netns
iface changes"). Thanks for the hint.
DaveM please drop this patch.
Regards,
Lorenzo
next prev parent reply other threads:[~2018-08-31 21:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1535712096.git.lorenzo.bianconi@redhat.com>
2018-08-31 11:43 ` [PATCH net-next] veth: report NEWLINK event when moving the peer device in a new namespace Lorenzo Bianconi
2018-08-31 15:24 ` David Ahern
2018-08-31 16:19 ` Lorenzo Bianconi
2018-08-31 16:21 ` David Ahern
2018-08-31 16:54 ` Lorenzo Bianconi [this message]
2018-09-01 9:05 ` Lorenzo Bianconi
2018-09-01 23:45 ` David Ahern
2018-09-03 9:10 ` Thomas Haller
2018-09-04 2:54 ` David Ahern
2018-09-07 18:52 ` Thomas Haller
2018-09-09 1:16 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180831165444.GE6236@localhost.localdomain \
--to=lorenzo.bianconi@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).