Skip to contentSkip to conversation

net: link_watch: mark bonding link events urgent

PATCH Applied Roopa Prabhu 4 participants 4 messages Jan 22, 2018 – Jan 24, 2018

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

PATCH v2 1/1 net: link_watch: mark bonding link events urgent

From: Roopa Prabhu <[email protected]>

It takes 1sec for bond link down notification to hit user-space when all slaves of the bond go down. 1sec is too long for protocol daemons in user-space relying on bond notification to recover (eg: multichassis lag implementations in user-space). Since the link event code already marks team device port link events
as urgent, this patch moves the code to cover all lag ports and master.

---
v2: use netif_is_lag_* api's as suggested by jiri

 net/core/link_watch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/link_watch.c +1 -1
index 9828616..e38e641 100644
@@ -92,7 +92,7 @@ static bool linkwatch_urgent_event(struct net_device *dev)
 	if (dev->ifindex != dev_get_iflink(dev))
 		return true;
 
-	if (dev->priv_flags & IFF_TEAM_PORT)
+	if (netif_is_lag_port(dev) || netif_is_lag_master(dev))
 		return true;
 
 	return netif_carrier_ok(dev) &&	qdisc_tx_changing(dev);
Signature · 1 line
2.1.4
Acked-by on v2 1/1
#1 lore raw
Quoted 10 lines · Mon, Jan 22, 2018 at 05:07:19PM CET, [email protected] wrote:

From: Roopa Prabhu <[email protected]>

It takes 1sec for bond link down notification to hit user-space when all slaves of the bond go down. 1sec is too long for protocol daemons in user-space relying on bond notification to recover (eg: multichassis lag implementations in user-space). Since the link event code already marks team device port link events as urgent, this patch moves the code to cover all lag ports and master.

Reviewed-by on v2 1/1
#2 lore raw
In reply to Roopa Prabhu
Quoted 22 lines · Roopa Prabhu

From: Roopa Prabhu <[email protected]>

It takes 1sec for bond link down notification to hit user-space when all slaves of the bond go down. 1sec is too long for protocol daemons in user-space relying on bond notification to recover (eg: multichassis lag implementations in user-space). Since the link event code already marks team device port link events
as urgent, this patch moves the code to cover all lag ports and master.

---
v2: use netif_is_lag_* api's as suggested by jiri

 net/core/link_watch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/link_watch.c +0 -0
index 9828616..e38e641 100644

net/core/link_watch.c static bool linkwatch_urgent_event(struct net_device *dev) · line 98

Quoted 8 lines
net/core/link_watch.c +1 -1
@@ -92,7 +92,7 @@ static bool linkwatch_urgent_event(struct net_device *dev)
 	if (dev->ifindex != dev_get_iflink(dev))
 		return true;
 
-	if (dev->priv_flags & IFF_TEAM_PORT)
+	if (netif_is_lag_port(dev) || netif_is_lag_master(dev))
 		return true;
 
 	return netif_carrier_ok(dev) &&	qdisc_tx_changing(dev);
maintainer Applied
#3 lore raw
In reply to Roopa Prabhu

From: Roopa Prabhu <[email protected]>
Date: Mon, 22 Jan 2018 08:07:19 -0800

Quoted 9 lines

From: Roopa Prabhu <[email protected]>

It takes 1sec for bond link down notification to hit user-space when all slaves of the bond go down. 1sec is too long for protocol daemons in user-space relying on bond notification to recover (eg: multichassis lag implementations in user-space). Since the link event code already marks team device port link events
as urgent, this patch moves the code to cover all lag ports and master.

Quoted 3 lines

---
v2: use netif_is_lag_* api's as suggested by jiri

Applied, thanks Roopa.