lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e333c8d2f3624a898a378eb1073f5f29@huawei.com>
Date:   Wed, 18 Sep 2019 13:35:40 +0000
From:   "zhangsha (A)" <zhangsha.zhang@...wei.com>
To:     "jay.vosburgh@...onical.com" <jay.vosburgh@...onical.com>,
        "vfalico@...il.com" <vfalico@...il.com>,
        "andy@...yhouse.net" <andy@...yhouse.net>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        yuehaibing <yuehaibing@...wei.com>,
        hunongda <hunongda@...wei.com>,
        "Chenzhendong (alex)" <alex.chen@...wei.com>
Subject: RE: [PATCH v3] bonding: force enable lacp port after link state
 recovery for 802.3ad



> -----Original Message-----
> From: zhangsha (A)
> Sent: 2019年9月18日 21:06
> To: jay.vosburgh@...onical.com; vfalico@...il.com; andy@...yhouse.net;
> davem@...emloft.net; netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> yuehaibing <yuehaibing@...wei.com>; hunongda <hunongda@...wei.com>;
> Chenzhendong (alex) <alex.chen@...wei.com>; zhangsha (A)
> <zhangsha.zhang@...wei.com>
> Subject: [PATCH v3] bonding: force enable lacp port after link state recovery for
> 802.3ad
> 
> From: Sha Zhang <zhangsha.zhang@...wei.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@...wei.com>
> ---
>  drivers/net/bonding/bond_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bonding/bond_main.c
> b/drivers/net/bonding/bond_main.c index 931d9d9..76324a5 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -2206,7 +2206,8 @@ static void bond_miimon_commit(struct bonding
> *bond)
>  			 */
>  			if (BOND_MODE(bond) == BOND_MODE_8023AD &&
>  			    slave->link == BOND_LINK_UP)
> -
> 	bond_3ad_adapter_speed_duplex_changed(slave);
> +				bond_3ad_handle_link_change(slave,
> +							    BOND_LINK_UP);
>  			continue;
> 
>  		case BOND_LINK_UP:

Hi, David,
I have replied your email for a while,  I guess you may miss my email, so I resend it.
The following link address is the last email, please review the new one again, thank you.
https://patchwork.ozlabs.org/patch/1151915/

Last time, you doubted this is a driver specific problem,
I prefer to believe it's not because I find the commit 4d2c0cda,
its log says " Some NIC drivers don't have correct speed/duplex 
settings at the time they send NETDEV_UP notification ...".

Anyway, I think the lacp status should be fixed correctly,
since link-monitoring (miimon) set SPEED/DUPLEX right here.

> --
> 1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ