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 <klar...@sandvine.com> wrote:

> Hello,
>
> > -----Original Message-----
> > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Lilijun (Jerry)
> > Sent: Monday, November 20, 2017 2:16 AM
> > To: dev@dpdk.org; tomaszx.kula...@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?
>
>
>
>

Reply via email to