From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f169.google.com (mail-ot0-f169.google.com [74.125.82.169]) by dpdk.org (Postfix) with ESMTP id 6EB07293B for ; Thu, 23 Nov 2017 23:56:20 +0100 (CET) Received: by mail-ot0-f169.google.com with SMTP id 18so17379874oty.9 for ; Thu, 23 Nov 2017 14:56:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Z74fQeI+MAXcBSxBX4+CuzFbTRH6fZ0GVV+yO1rzMcQ=; b=a6kRpycMgp8nQV4CfLNjgtsaOE2a9qKBUJRQ1iZ2JEuZsVv9gBBOC1NQMKJwMxQ3UH LPFssYMTJhXrJ6QUZmQ2vutOAlBnXDWKUPRbtNx0QMnXKuVqXdg2o5gfgRLeI1NEmiDq GF/3CGwdgZoaAfWEDRPqWCjp+aDKSGJsUAd30w88fnp/yx+gnQV+xrwbUbzQF0b8ayHH qgLDtXGoewH1qajoKM9wxPCBsmFez/SGMSqLtag2R58286tXY98nRYEWtBfalP31zRBr X9unIGu+jko62MiO/AAO5XCsgkAFy/gqGF0gSNlYjXEd5PxM4xFzpDz5IrH3XKfGE4/x S9DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Z74fQeI+MAXcBSxBX4+CuzFbTRH6fZ0GVV+yO1rzMcQ=; b=XOnBn2G//6ohMJRBVt0GQlb4szeUHjhKCyJvnLoJss2pD2r++z53oO/4P72bkwkoMd yRPF82naHgTyTkbCfqKJPu1cME4InKB9VB+UXxcQV8pY5DkKmfgFmd4sox1mTHFdhcLZ Q83yZY8ZSudDf8fV0Y7WxpqXwCs5R00oPlNkr7J6eblUYa1Glv8ZoRwyhsr4/HWM/6KJ uDjT3+Q/4OO04XE11b2otELW0V0ypBv2obkybJNCJsyDdxwKBmv2pswjKAYovB8qwPId wsA2JS0Hxq49t5+9BumeJQdmUk2c/ELDVzceUB4JJdRxLmai5H32DTYsxzBFkNIJuGnx andQ== X-Gm-Message-State: AJaThX7pGDrRErGMr4J/3jcql/kAeROVkLE38A5Iupx+0Cqq8KSWxcdl 01aTPbE1K9DQ0P6WFOBR0QGSQMtcGF6lZJWnlkE= X-Google-Smtp-Source: AGs4zMaqrB/P22wPhZWoaRIccH/A+LCIMO8pi+ECxeJQe361cxf0rYylEVy25qLDtFJaii+Ks8+sDCkervhXWTqhwKw= X-Received: by 10.157.39.15 with SMTP id r15mr18229072ota.400.1511477779789; Thu, 23 Nov 2017 14:56:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.49.53 with HTTP; Thu, 23 Nov 2017 14:56:19 -0800 (PST) In-Reply-To: References: <40280F65B1B0B44E8089ED31C01616EBA357ADA1@dggeml509-mbx.china.huawei.com> From: Kyle Larose Date: Thu, 23 Nov 2017 17:56:19 -0500 Message-ID: To: Kyle Larose Cc: "Lilijun (Jerry)" , "dev@dpdk.org" , "tomaszx.kulasek@intel.com" , "Zhang, Jerry" , Wanghanlin Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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:56:20 -0000 Sorry -- ignore my previous email. I was looking at it from the wrong perspective. I was thinking of what happens in active activate_slave, which calls bond_mode_8023ad_activate_slave *before* adding to the active_slaves[] array. In this case, the slaves are already active, since we're iterating over the active slave list. On Thu, Nov 23, 2017 at 11:53 AM, Kyle Larose wrote: > 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 > > > > ... > > > --- 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; > > } > > > > > I don't think active_slaves is correct here. The slave is not yet active, > so it may not be in that array yet. > Should we instead use internals->slaves[i].port_id? > > > >