From 7a25826fc14b2b012f734a215bdef4acadac1f7a Mon Sep 17 00:00:00 2001 From: Jerry Lilijun Date: Mon, 20 Nov 2017 07:15:41 +0000 Subject: [PATCH] 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 --- drivers/net/bonding/rte_eth_bond_8023ad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.20.1