From 210903803f6e0c31f398b26fe337eb5a729ca72b Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Tue, 25 Apr 2017 14:30:49 +0800 Subject: [PATCH] net/bonding: fix updating slave link status We need to update dev->data->dev_link before handling LSC event. Otherwise it will still have the initial value after the startup of the program before interrupt callback was executed. Fixes: 414b202343ce ("bonding: fix initial link status of slave") Cc: stable@dpdk.org Signed-off-by: Wei Wang Acked-by: Declan Doherty --- drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c94071ffb2..82959abc31 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1435,9 +1435,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, } /* If lsc interrupt is set, check initial slave's link status */ - if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) + if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) { + slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0); bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id, RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id); + } return 0; } -- 2.20.1