From: Eric Dumazet <eric.dumazet@gmail.com>
To: HAYASAKA Mitsuo <mitsuo.hayasaka.hu@hitachi.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: [PATCH net-next] net: linkwatch: allow vlans to get carrier changes faster
Date: Wed, 31 Aug 2011 11:31:58 +0200 [thread overview]
Message-ID: <1314783118.2801.13.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> (raw)
In-Reply-To: <1314540589.3036.12.camel@edumazet-laptop>
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);
}
next prev parent reply other threads:[~2011-08-31 9:31 UTC|newest]
Thread overview: 11+ 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:08 ` Stephen Hemminger
2011-08-26 6:45 ` Herbert Xu
2011-08-28 13:20 ` HAYASAKA Mitsuo
2011-08-28 14:09 ` Eric Dumazet
2011-08-29 6:06 ` Stephen Hemminger
2011-08-29 6:23 ` Eric Dumazet
2011-08-29 6:34 ` David Miller
2011-08-31 9:31 ` Eric Dumazet [this message]
2011-09-01 11:53 ` [PATCH net-next] net: linkwatch: allow vlans to get carrier changes faster 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=1314783118.2801.13.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jesse@nicira.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
--cc=mitsuo.hayasaka.hu@hitachi.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox