netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: link_watch: mark bonding link events urgent
@ 2018-01-22 16:07 Roopa Prabhu
  2018-01-22 16:33 ` Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Roopa Prabhu @ 2018-01-22 16:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, nikolay, dsa, jiri

From: Roopa Prabhu <roopa@cumulusnetworks.com>

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.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
v2: use netif_is_lag_* api's as suggested by jiri

 net/core/link_watch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/link_watch.c b/net/core/link_watch.c
index 9828616..e38e641 100644
--- a/net/core/link_watch.c
+++ b/net/core/link_watch.c
@@ -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);
-- 
2.1.4

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

* Re: [PATCH net-next v2] net: link_watch: mark bonding link events urgent
  2018-01-22 16:07 [PATCH net-next v2] net: link_watch: mark bonding link events urgent Roopa Prabhu
@ 2018-01-22 16:33 ` Jiri Pirko
  2018-01-23 10:19 ` Nikolay Aleksandrov
  2018-01-24  0:43 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2018-01-22 16:33 UTC (permalink / raw)
  To: Roopa Prabhu; +Cc: davem, netdev, nikolay, dsa

Mon, Jan 22, 2018 at 05:07:19PM CET, roopa@cumulusnetworks.com wrote:
>From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
>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.
>
>Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>

Acked-by: Jiri Pirko <jiri@mellanox.com>

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

* Re: [PATCH net-next v2] net: link_watch: mark bonding link events urgent
  2018-01-22 16:07 [PATCH net-next v2] net: link_watch: mark bonding link events urgent Roopa Prabhu
  2018-01-22 16:33 ` Jiri Pirko
@ 2018-01-23 10:19 ` Nikolay Aleksandrov
  2018-01-24  0:43 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2018-01-23 10:19 UTC (permalink / raw)
  To: Roopa Prabhu, davem; +Cc: netdev, dsa, jiri

On 22/01/18 18:07, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> 
> 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.
> 
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> ---
> v2: use netif_is_lag_* api's as suggested by jiri
> 
>  net/core/link_watch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/link_watch.c b/net/core/link_watch.c
> index 9828616..e38e641 100644
> --- a/net/core/link_watch.c
> +++ b/net/core/link_watch.c
> @@ -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);
> 

Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

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

* Re: [PATCH net-next v2] net: link_watch: mark bonding link events urgent
  2018-01-22 16:07 [PATCH net-next v2] net: link_watch: mark bonding link events urgent Roopa Prabhu
  2018-01-22 16:33 ` Jiri Pirko
  2018-01-23 10:19 ` Nikolay Aleksandrov
@ 2018-01-24  0:43 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-01-24  0:43 UTC (permalink / raw)
  To: roopa; +Cc: netdev, nikolay, dsa, jiri

From: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Mon, 22 Jan 2018 08:07:19 -0800

> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> 
> 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.
> 
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> ---
> v2: use netif_is_lag_* api's as suggested by jiri

Applied, thanks Roopa.

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

end of thread, other threads:[~2018-01-24  0:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-22 16:07 [PATCH net-next v2] net: link_watch: mark bonding link events urgent Roopa Prabhu
2018-01-22 16:33 ` Jiri Pirko
2018-01-23 10:19 ` Nikolay Aleksandrov
2018-01-24  0:43 ` David Miller

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