From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757297Ab1IALxy (ORCPT ); Thu, 1 Sep 2011 07:53:54 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:56561 "EHLO mail7.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753055Ab1IALxv (ORCPT ); Thu, 1 Sep 2011 07:53:51 -0400 X-AuditID: b753bd60-a0a78ba0000050a4-89-4e5f724c774c X-AuditID: b753bd60-a0a78ba0000050a4-89-4e5f724c774c Message-ID: <4E5F7249.8020408@hitachi.com> Date: Thu, 01 Sep 2011 20:53:45 +0900 From: HAYASAKA Mitsuo User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Eric Dumazet Cc: Herbert Xu , Stephen Hemminger , Patrick McHardy , "David S. Miller" , =?UTF-8?B?TWljaGHFgk1pcm9zxYJhdw==?= , Tom Herbert , Jesse Gross , 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 References: <20110826060257.5304.62723.stgit@ltc219.sdl.hitachi.co.jp> <20110825230859.11b2b132@nehalam.ftrdhcpuser.net> <20110826064553.GA5874@gondor.apana.org.au> <4E5A40A9.2000404@hitachi.com> <1314540589.3036.12.camel@edumazet-laptop> <1314783118.2801.13.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> In-Reply-To: <1314783118.2801.13.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 (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 > Signed-off-by: Eric Dumazet > Cc: Herbert Xu > Cc: Patrick McHardy > Cc: "Michał Mirosław" > Cc: Tom Herbert > Cc: Stephen Hemminger > Cc: Jesse Gross > --- > 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/ >