From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE2FFA0093; Tue, 19 May 2020 09:53:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 652AC1D5C5; Tue, 19 May 2020 09:53:33 +0200 (CEST) Received: from huawei.com (szxga08-in.huawei.com [45.249.212.255]) by dpdk.org (Postfix) with ESMTP id A68771D5C4 for ; Tue, 19 May 2020 09:53:31 +0200 (CEST) Received: from dggemi402-hub.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 48C941C5EC89A7B33B88; Tue, 19 May 2020 15:53:30 +0800 (CST) Received: from DGGEMI423-HUB.china.huawei.com (10.1.199.152) by dggemi402-hub.china.huawei.com (10.3.17.135) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 19 May 2020 15:53:29 +0800 Received: from DGGEMI525-MBX.china.huawei.com ([169.254.5.115]) by dggemi423-hub.china.huawei.com ([10.1.199.152]) with mapi id 14.03.0487.000; Tue, 19 May 2020 15:53:21 +0800 From: luyicai To: "dev@dpdk.org" CC: "chas3@att.com" , "zhangliang@bigo.sg" , "Zhoujingbin (Robin, Russell Lab)" , chenchanghu , "Lilijun (Jerry)" Thread-Topic: [PATCH] drivers/net/bonding: fix bug for lacp negotiation failed Thread-Index: AdYtp5gBHJQ/njV9Tk6+FxQaqCNUrw== Date: Tue, 19 May 2020 07:53:20 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.251.12] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] drivers/net/bonding: fix bug for lacp negotiation failed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When two host is connected directly without any devices like switch, and also enable dedicated tx/rx queues on bonding devices slaves, rx_machine_update would recieving partner lacp negotiation packets, which partner's port mac filled with zeros. So in this situation, it would never go rx_machine branch with correct mac! Thus bond mode 4 will negotiation failed. Signed-off-by: Lu Yicai --- drivers/net/bonding/rte_eth_bond_8023ad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bondin= g/rte_eth_bond_8023ad.c index b77a37ddb..2002ec04a 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -798,7 +798,8 @@ rx_machine_update(struct bond_dev_private *internals, u= int16_t slave_id, RTE_ASSERT(lacp->lacpdu.subtype =3D=3D SLOW_SUBTYPE_LACP); partner =3D &lacp->lacpdu.partner; - if (rte_is_same_ether_addr(&partner->port_params.system, + if (rte_is_zero_ether_addr(&partner->port_params.system) || + rte_is_same_ether_addr(&partner->port_params.system= , &internals->mode4.mac_addr)) { /* This LACP frame is sending to the bonding port * so pass it to rx_machine. -- 2.19.1