From: Jerry Lilijun Date: Mon, 20 Nov 2017 07:15:41 +0000 (+0000) Subject: net/bonding: fix activated slave in 8023ad mode X-Git-Tag: spdx-start~569 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7a25826fc14b2b012f734a215bdef4acadac1f7a;p=dpdk.git net/bonding: fix activated slave in 8023ad mode In the function bond_mode_8023ad_enable(), the var i is used as slave port id to the function bond_mode_8023ad_activate_slave(). 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]. Fixes: 46fb43683679 ("bond: add mode 4") Cc: stable@dpdk.org Signed-off-by: Jerry Lilijun Tested-by: Kyle Larose Acked-by: Declan Doherty --- diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index a1b8dbfbcd..c452318ff6 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -1144,7 +1144,8 @@ bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev) 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; }