[PATCH] net: Resend IGMP memberships upon peer notification.

Subsystems: networking [general], the rest

STALE3436d

4 messages, 3 authors, 2017-03-14 · open the first message on its own page

[PATCH] net: Resend IGMP memberships upon peer notification.

From: Vladislav Yasevich <hidden>
Date: 2017-03-14 12:58:23

When we notify peers of potential changes,  it's also good to update
IGMP memberships.  For example, during VM migration, updating IGMP
memberships will redirect existing multicast streams to the VM at the
new location.

Signed-off-by: Vladislav Yasevich <redacted>
---
 net/core/dev.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/core/dev.c b/net/core/dev.c
index a229bf0..1ed927d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1272,6 +1272,7 @@ void netdev_notify_peers(struct net_device *dev)
 {
 	rtnl_lock();
 	call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev);
+	call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev);
 	rtnl_unlock();
 }
 EXPORT_SYMBOL(netdev_notify_peers);
-- 
2.7.4

Re: [PATCH] net: Resend IGMP memberships upon peer notification.

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2017-03-14 15:32:16

On Tue, Mar 14, 2017 at 08:58:08AM -0400, Vladislav Yasevich wrote:
When we notify peers of potential changes,  it's also good to update
IGMP memberships.  For example, during VM migration, updating IGMP
memberships will redirect existing multicast streams to the VM at the
new location.

Signed-off-by: Vladislav Yasevich <redacted>

what will happen on the source? will the snooping bridge remove
membership on port removal as appropriate?
quoted hunk
---
 net/core/dev.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/core/dev.c b/net/core/dev.c
index a229bf0..1ed927d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1272,6 +1272,7 @@ void netdev_notify_peers(struct net_device *dev)
 {
 	rtnl_lock();
 	call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev);
+	call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev);
 	rtnl_unlock();
 }
 EXPORT_SYMBOL(netdev_notify_peers);
-- 
2.7.4

Re: [PATCH] net: Resend IGMP memberships upon peer notification.

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2017-03-14 16:36:25

On Tue, Mar 14, 2017 at 08:58:08AM -0400, Vladislav Yasevich wrote:
When we notify peers of potential changes,  it's also good to update
IGMP memberships.  For example, during VM migration, updating IGMP
memberships will redirect existing multicast streams to the VM at the
new location.

Signed-off-by: Vladislav Yasevich <redacted>
Seems to make sense

Acked-by: Michael S. Tsirkin <mst@redhat.com>

but I also think there's another problem: source does not
leave the groups on migration. So I think we should add code on the
host - it's snooping IGMPs so it should be able to leave groups on the
source when VM is disconnected.


quoted hunk
---
 net/core/dev.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/core/dev.c b/net/core/dev.c
index a229bf0..1ed927d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1272,6 +1272,7 @@ void netdev_notify_peers(struct net_device *dev)
 {
 	rtnl_lock();
 	call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev);
+	call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev);
 	rtnl_unlock();
 }
 EXPORT_SYMBOL(netdev_notify_peers);
-- 
2.7.4

Re: [PATCH] net: Resend IGMP memberships upon peer notification.

From: David Miller <davem@davemloft.net>
Date: 2017-03-14 18:34:25

From: Vladislav Yasevich <redacted>
Date: Tue, 14 Mar 2017 08:58:08 -0400
When we notify peers of potential changes,  it's also good to update
IGMP memberships.  For example, during VM migration, updating IGMP
memberships will redirect existing multicast streams to the VM at the
new location.

Signed-off-by: Vladislav Yasevich <redacted>
Applied, thanks Vlad.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help