From: David Miller <davem@davemloft.net>
To: zhangsha.zhang@huawei.com
Cc: jay.vosburgh@canonical.com, vfalico@gmail.com,
andy@greyhouse.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, yuehaibing@huawei.com,
hunongda@huawei.com, alex.chen@huawei.com
Subject: Re: [PATCH v3] bonding: force enable lacp port after link state recovery for 802.3ad
Date: Tue, 24 Sep 2019 15:56:50 +0200 (CEST) [thread overview]
Message-ID: <20190924.155650.2089667667300458495.davem@davemloft.net> (raw)
In-Reply-To: <20190918130620.8556-1-zhangsha.zhang@huawei.com>
From: <zhangsha.zhang@huawei.com>
Date: Wed, 18 Sep 2019 21:06:20 +0800
> From: Sha Zhang <zhangsha.zhang@huawei.com>
>
> After the commit 334031219a84 ("bonding/802.3ad: fix slave link
> initialization transition states") merged,
> the slave's link status will be changed to BOND_LINK_FAIL
> from BOND_LINK_DOWN in the following scenario:
> - Driver reports loss of carrier and
> bonding driver receives NETDEV_DOWN notifier
> - slave's duplex and speed is zerod and
> its port->is_enabled is cleard to 'false';
> - Driver reports link recovery and
> bonding driver receives NETDEV_UP notifier;
> - If speed/duplex getting failed here, the link status
> will be changed to BOND_LINK_FAIL;
> - The MII monotor later recover the slave's speed/duplex
> and set link status to BOND_LINK_UP, but remains
> the 'port->is_enabled' to 'false'.
>
> In this scenario, the lacp port will not be enabled even its speed
> and duplex are valid. The bond will not send LACPDU's, and its
> state is 'AD_STATE_DEFAULTED' forever. The simplest fix I think
> is to call bond_3ad_handle_link_change() in bond_miimon_commit,
> this function can enable lacp after port slave speed check.
> As enabled, the lacp port can run its state machine normally
> after link recovery.
>
> Signed-off-by: Sha Zhang <zhangsha.zhang@huawei.com>
Please work out with Jay and Aleksei how to properly fix this.
prev parent reply other threads:[~2019-09-24 13:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 13:06 [PATCH v3] bonding: force enable lacp port after link state recovery for 802.3ad zhangsha.zhang
2019-09-18 13:35 ` zhangsha (A)
2019-09-19 8:11 ` Jay Vosburgh
2019-09-19 12:46 ` zhangsha (A)
2019-09-24 13:56 ` David Miller [this message]
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=20190924.155650.2089667667300458495.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alex.chen@huawei.com \
--cc=andy@greyhouse.net \
--cc=hunongda@huawei.com \
--cc=jay.vosburgh@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
--cc=yuehaibing@huawei.com \
--cc=zhangsha.zhang@huawei.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;
as well as URLs for NNTP newsgroup(s).