All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port
@ 2018-11-22  8:15 Hangbin Liu
  2018-11-24  1:18 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Hangbin Liu @ 2018-11-22  8:15 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Jiri Pirko, Xin Long, Hangbin Liu

team_notify_peers() will send ARP and NA to notify peers. team_mcast_rejoin()
will send multicast join group message to notify peers. We should do this when
enabling/changed to a new port. But it doesn't make sense to do it when a port
is disabled.

On the other hand, when we set mcast_rejoin_count to 2, and do a failover,
team_port_disable() will increase mcast_rejoin.count_pending to 2 and then
team_port_enable() will increase mcast_rejoin.count_pending to 4. We will send
4 mcast rejoin messages at latest, which will make user confused. The same
with notify_peers.count.

Fix it by deleting team_notify_peers() and team_mcast_rejoin() in
team_port_disable().

Reported-by: Liang Li <liali@redhat.com>
Fixes: fc423ff00df3a ("team: add peer notification")
Fixes: 492b200efdd20 ("team: add support for sending multicast rejoins")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 drivers/net/team/team.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index db633ae..364f514 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -985,8 +985,6 @@ static void team_port_disable(struct team *team,
 	team->en_port_count--;
 	team_queue_override_port_del(team, port);
 	team_adjust_ops(team);
-	team_notify_peers(team);
-	team_mcast_rejoin(team);
 	team_lower_state_changed(port);
 }
 
-- 
2.5.5

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

* Re: [PATCH net] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port
  2018-11-22  8:15 [PATCH net] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port Hangbin Liu
@ 2018-11-24  1:18 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-11-24  1:18 UTC (permalink / raw)
  To: liuhangbin; +Cc: netdev, jiri, lucien.xin

From: Hangbin Liu <liuhangbin@gmail.com>
Date: Thu, 22 Nov 2018 16:15:28 +0800

> team_notify_peers() will send ARP and NA to notify peers. team_mcast_rejoin()
> will send multicast join group message to notify peers. We should do this when
> enabling/changed to a new port. But it doesn't make sense to do it when a port
> is disabled.
> 
> On the other hand, when we set mcast_rejoin_count to 2, and do a failover,
> team_port_disable() will increase mcast_rejoin.count_pending to 2 and then
> team_port_enable() will increase mcast_rejoin.count_pending to 4. We will send
> 4 mcast rejoin messages at latest, which will make user confused. The same
> with notify_peers.count.
> 
> Fix it by deleting team_notify_peers() and team_mcast_rejoin() in
> team_port_disable().
> 
> Reported-by: Liang Li <liali@redhat.com>
> Fixes: fc423ff00df3a ("team: add peer notification")
> Fixes: 492b200efdd20 ("team: add support for sending multicast rejoins")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Applied.

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

end of thread, other threads:[~2018-11-24 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-22  8:15 [PATCH net] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port Hangbin Liu
2018-11-24  1:18 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.