From: Jia Yu Date: Fri, 7 Nov 2014 17:31:50 +0000 (-0800) Subject: ethdev: update link status after start X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=99610782edaaa88f6c442ff11662780aa161be85;p=dpdk.git ethdev: update link status after start Since LSR interrupt is disabled by pmd drivers, link status in rte_eth_device is always down. Bond slave_configure() enables LSR interrupt on devices to get notification if link status changes. However, the LSC interrupt at device start time is still lost. In this fix, call link_update to read link status from hardware register at device start time. Signed-off-by: Jia Yu Acked-by: Helin Zhang --- diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index ea3a1fbfd9..8993b35ffb 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -911,6 +911,10 @@ rte_eth_dev_start(uint8_t port_id) rte_eth_dev_config_restore(port_id); + if (dev->data->dev_conf.intr_conf.lsc != 0) { + FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP); + (*dev->dev_ops->link_update)(dev, 0); + } return 0; }