From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 680F52030 for ; Tue, 12 Dec 2017 16:58:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2017 07:58:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,395,1508828400"; d="scan'208";a="15374789" Received: from dwdohert-mobl.ger.corp.intel.com (HELO [10.252.1.105]) ([10.252.1.105]) by orsmga001.jf.intel.com with ESMTP; 12 Dec 2017 07:58:55 -0800 To: "Lilijun (Jerry)" , "dev@dpdk.org" , "tomaszx.kulasek@intel.com" Cc: "Zhang, Jerry" , Wanghanlin References: <40280F65B1B0B44E8089ED31C01616EBA357ADA1@dggeml509-mbx.china.huawei.com> From: "Doherty, Declan" Message-ID: <884f321f-6aac-2bf2-9388-09a5b75f6c50@intel.com> Date: Tue, 12 Dec 2017 15:58:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <40280F65B1B0B44E8089ED31C01616EBA357ADA1@dggeml509-mbx.china.huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Tue, 12 Dec 2017 15:58:58 -0000 On 20/11/2017 7:15 AM, Lilijun (Jerry) wrote: > Hi all, > > 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]. > > > [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/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; > > for (i = 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; > } > > Acked-by: Declan Doherty