From: Igor Romanov Date: Tue, 10 Sep 2019 08:25:41 +0000 (+0100) Subject: net/bonding: fix link speed update in broadcast mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=db3216e76609647ce8dc256d478c8cc7095a23d4;p=dpdk.git net/bonding: fix link speed update in broadcast mode Fix the issue that the link speed of the bond device was set to the link speed of the first active slave in broadcast mode. Set the link speed of the bond device to the minimum value across all of the slaves in that case. Fixes: deba8a2f8b0b ("net/bonding: fix link properties management") Cc: stable@dpdk.org Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko Acked-by: Chas Williams --- diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 5ff9fcbaf7..4c517e676d 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2395,8 +2395,8 @@ bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete) * packet loss will occur on this slave if transmission at rates * greater than this are attempted */ - for (idx = 1; idx < bond_ctx->active_slave_count; idx++) { - link_update(bond_ctx->active_slaves[0], &slave_link); + for (idx = 0; idx < bond_ctx->active_slave_count; idx++) { + link_update(bond_ctx->active_slaves[idx], &slave_link); if (slave_link.link_speed < ethdev->data->dev_link.link_speed)