From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by dpdk.org (Postfix) with ESMTP id E32B22A5D for ; Thu, 23 Nov 2017 23:57:13 +0100 (CET) Received: from WTL-EXCHP-1.sandvine.com ([fe80::ac6b:cc1e:f2ff:93aa]) by wtl-exchp-2.sandvine.com ([::1]) with mapi id 14.03.0319.002; Thu, 23 Nov 2017 17:57:12 -0500 From: Kyle Larose To: "Lilijun (Jerry)" , "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+wmLJQ4gCuwOmw Date: Thu, 23 Nov 2017 22:57:12 +0000 Message-ID: References: <40280F65B1B0B44E8089ED31C01616EBA357ADA1@dggeml509-mbx.china.huawei.com> In-Reply-To: <40280F65B1B0B44E8089ED31C01616EBA357ADA1@dggeml509-mbx.china.huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.200.51] x-c2processedorg: b2f06e69-072f-40ee-90c5-80a34e700794 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Thu, 23 Nov 2017 22:57:14 -0000 Hello, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lilijun (Jerry) > Sent: Monday, November 20, 2017 2:16 AM > To: dev@dpdk.org; tomaszx.kulasek@intel.com > Cc: Zhang, Jerry; Wanghanlin > Subject: [dpdk-dev] [PATCH] net/bonding: fix bond 8023ad mode enable > using wrong index >=20 > Hi all, >=20 > In the function bond_mode_8023ad_enable(), the var i is to used to > as the second parameter to pass the slave dev's dpdk port id to the > function bond_mode_8023ad_activate_slave(). > I think this variable is only a index for array internals- > >active_slaves. So its need to be fixed and change i to internals- > >active_slaves[i]. >=20 >=20 > [Patch] net/bonding: fix bond 8023ad mode enable using wrong index. > Signed-off-by: Lilijun >=20 > diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c > b/drivers/net/bonding/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; >=20 > 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]); >=20 > return 0; > } >=20 I have tested this, and it alleviates some of the issues I was reporting ea= rlier with link aggregator selection. Tested-by: Kyle Larose Thanks, Kyle