From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by dpdk.org (Postfix) with ESMTP id 5A1362BEF for ; Mon, 20 Nov 2017 08:15:50 +0100 (CET) Received: from 172.30.72.54 (EHLO dggeml406-hub.china.huawei.com) ([172.30.72.54]) by dggrg02-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id AZA14440; Mon, 20 Nov 2017 15:15:49 +0800 (CST) Received: from DGGEML509-MBX.china.huawei.com ([169.254.1.5]) by dggeml406-hub.china.huawei.com ([10.3.17.50]) with mapi id 14.03.0361.001; Mon, 20 Nov 2017 15:15:42 +0800 From: "Lilijun (Jerry)" To: "dev@dpdk.org" , "tomaszx.kulasek@intel.com" CC: "Zhang, Jerry" , Wanghanlin Thread-Topic: [dpdk-dev] [PATCH] net/bonding: fix bond 8023ad mode enable using wrong index Thread-Index: AdNhz0mHoFvSw0WoT/aXDV+wmLJQ4g== Date: Mon, 20 Nov 2017 07:15:41 +0000 Message-ID: <40280F65B1B0B44E8089ED31C01616EBA357ADA1@dggeml509-mbx.china.huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.20.134] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.5A128125.01BA, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.1.5, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 4ae8808ce38beb94eb7bd6bbc2300a83 Subject: [dpdk-dev] [PATCH] net/bonding: fix bond 8023ad mode enable using wrong index 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: , X-List-Received-Date: Mon, 20 Nov 2017 07:15:52 -0000 Hi all, In the function bond_mode_8023ad_enable(), the var i is to used to as the s= econd parameter to pass the slave dev's dpdk port id to the function bond_m= ode_8023ad_activate_slave().=20 I think this variable is only a index for array internals->active_slaves. S= o its need to be fixed and change i to internals->active_slaves[i]. [Patch] net/bonding: fix bond 8023ad mode enable using wrong index. Signed-off-by: Lilijun diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bondin= g/rte_eth_bond_8023ad.c index a2313b3..20a08dc 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -1159,7 +1159,7 @@ uint8_t i; for (i =3D 0; i < internals->active_slave_count; i++) - bond_mode_8023ad_activate_slave(bond_dev, i); + bond_mode_8023ad_activate_slave(bond_dev, internals->active= _slaves[i]); return 0; }