Skip to contentSkip to conversation

team: no need to do team_notify_peers or team_mcast_rejoin when disabling port

PATCH Applied Hangbin Liu 2 participants 2 messages Nov 22, 2018 – Nov 24, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 team: no need to do team_notify_peers or team_mcast_rejoin when disabling port

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().

Fixes fc423ff00df3a ("team: add peer notification")
Fixes 492b200efdd20 ("team: add support for sending multicast rejoins")
---
 drivers/net/team/team.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/team/team.c +0 -2
index db633ae..364f514 100644
@@ -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);
 }
 
Signature · 1 line
2.5.5
maintainer Applied
#1 lore raw

From: Hangbin Liu <[email protected]>
Date: Thu, 22 Nov 2018 16:15:28 +0800

Quoted 11 lines

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.

Quoted 7 lines

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

Fixes fc423ff00df3a ("team: add peer notification")
Fixes 492b200efdd20 ("team: add support for sending multicast rejoins")

Applied.