All of lore.kernel.org
 help / color / mirror / Atom feed
From: HAYASAKA Mitsuo <mitsuo.hayasaka.hu@hitachi.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Herbert Xu" <herbert@gondor.hengli.com.au>,
	"Stephen Hemminger" <shemminger@vyatta.com>,
	"Patrick McHardy" <kaber@trash.net>,
	"David S. Miller" <davem@davemloft.net>,
	MichałMirosław <mirq-linux@rere.qmqm.pl>,
	"Tom Herbert" <therbert@google.com>,
	"Jesse Gross" <jesse@nicira.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH net-next] net: linkwatch: allow vlans to get carrier changes faster
Date: Thu, 01 Sep 2011 20:53:45 +0900	[thread overview]
Message-ID: <4E5F7249.8020408@hitachi.com> (raw)
In-Reply-To: <1314783118.2801.13.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

Hi Eric,

I checked this patch solves the time-lag of IFF_RUNNING flag consistency
between vlan and real devices. 

Cheers.

Tested-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>


(2011/08/31 18:31), Eric Dumazet wrote:
> There is a time-lag of IFF_RUNNING flag consistency between vlan and
> real devices when the real devices are in problem such as link or cable
> broken.
> 
> This leads to a degradation of Availability such as a delay of failover
> in HA systems using vlan since the detection of the problem at real
> device is delayed.
> 
> We can avoid the linkwatch delay (~1 sec) for devices linked to another
> ones, since delay is already done for the realdev.
> 
> Based on a previous patch from Mitsuo Hayasaka
> 
> Reported-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
> Cc: Tom Herbert <therbert@google.com>
> Cc: Stephen Hemminger <shemminger@vyatta.com>
> Cc: Jesse Gross <jesse@nicira.com>
> ---
>  net/core/link_watch.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/net/core/link_watch.c b/net/core/link_watch.c
> index 357bd4e..c3519c6 100644
> --- a/net/core/link_watch.c
> +++ b/net/core/link_watch.c
> @@ -78,8 +78,13 @@ static void rfc2863_policy(struct net_device *dev)
>  
>  static bool linkwatch_urgent_event(struct net_device *dev)
>  {
> -	return netif_running(dev) && netif_carrier_ok(dev) &&
> -		qdisc_tx_changing(dev);
> +	if (!netif_running(dev))
> +		return false;
> +
> +	if (dev->ifindex != dev->iflink)
> +		return true;
> +
> +	return netif_carrier_ok(dev) &&	qdisc_tx_changing(dev);
>  }
>  
>  
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


WARNING: multiple messages have this Message-ID (diff)
From: HAYASAKA Mitsuo <mitsuo.hayasaka.hu@hitachi.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Herbert Xu" <herbert@gondor.apana.org.au>,
	"Stephen Hemminger" <shemminger@vyatta.com>,
	"Patrick McHardy" <kaber@trash.net>,
	"David S. Miller" <davem@davemloft.net>,
	MichałMirosław <mirq-linux@rere.qmqm.pl>,
	"Tom Herbert" <therbert@google.com>,
	"Jesse Gross" <jesse@nicira.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH net-next] net: linkwatch: allow vlans to get carrier changes faster
Date: Thu, 01 Sep 2011 20:53:45 +0900	[thread overview]
Message-ID: <4E5F7249.8020408@hitachi.com> (raw)
In-Reply-To: <1314783118.2801.13.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

Hi Eric,

I checked this patch solves the time-lag of IFF_RUNNING flag consistency
between vlan and real devices. 

Cheers.

Tested-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>


(2011/08/31 18:31), Eric Dumazet wrote:
> There is a time-lag of IFF_RUNNING flag consistency between vlan and
> real devices when the real devices are in problem such as link or cable
> broken.
> 
> This leads to a degradation of Availability such as a delay of failover
> in HA systems using vlan since the detection of the problem at real
> device is delayed.
> 
> We can avoid the linkwatch delay (~1 sec) for devices linked to another
> ones, since delay is already done for the realdev.
> 
> Based on a previous patch from Mitsuo Hayasaka
> 
> Reported-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
> Cc: Tom Herbert <therbert@google.com>
> Cc: Stephen Hemminger <shemminger@vyatta.com>
> Cc: Jesse Gross <jesse@nicira.com>
> ---
>  net/core/link_watch.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/net/core/link_watch.c b/net/core/link_watch.c
> index 357bd4e..c3519c6 100644
> --- a/net/core/link_watch.c
> +++ b/net/core/link_watch.c
> @@ -78,8 +78,13 @@ static void rfc2863_policy(struct net_device *dev)
>  
>  static bool linkwatch_urgent_event(struct net_device *dev)
>  {
> -	return netif_running(dev) && netif_carrier_ok(dev) &&
> -		qdisc_tx_changing(dev);
> +	if (!netif_running(dev))
> +		return false;
> +
> +	if (dev->ifindex != dev->iflink)
> +		return true;
> +
> +	return netif_carrier_ok(dev) &&	qdisc_tx_changing(dev);
>  }
>  
>  
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

  reply	other threads:[~2011-09-01 11:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26  6:02 [PATCH net-next ] Fix time-lag of IFF_RUNNING flag consistency between vlan and real devices Mitsuo Hayasaka
2011-08-26  6:02 ` Mitsuo Hayasaka
2011-08-26  6:08 ` Stephen Hemminger
2011-08-26  6:08   ` Stephen Hemminger
2011-08-26  6:45   ` Herbert Xu
2011-08-26  6:45     ` Herbert Xu
2011-08-28 13:20     ` HAYASAKA Mitsuo
2011-08-28 13:20       ` HAYASAKA Mitsuo
2011-08-28 14:09       ` Eric Dumazet
2011-08-28 14:09         ` Eric Dumazet
2011-08-29  6:06         ` Stephen Hemminger
2011-08-29  6:06           ` Stephen Hemminger
2011-08-29  6:23           ` Eric Dumazet
2011-08-29  6:23             ` Eric Dumazet
2011-08-29  6:34           ` David Miller
2011-08-31  9:31         ` [PATCH net-next] net: linkwatch: allow vlans to get carrier changes faster Eric Dumazet
2011-08-31  9:31           ` Eric Dumazet
2011-09-01 11:53           ` HAYASAKA Mitsuo [this message]
2011-09-01 11:53             ` HAYASAKA Mitsuo
2011-09-15 19:44           ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E5F7249.8020408@hitachi.com \
    --to=mitsuo.hayasaka.hu@hitachi.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=jesse@nicira.com \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=therbert@google.com \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.