net/liquidio: fix link state fetching during start
authorChuhong Yao <ych@panath.cn>
Tue, 22 May 2018 14:33:29 +0000 (22:33 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 22 May 2018 22:35:01 +0000 (00:35 +0200)
Clear link state information during device start for fetching new state
before function completion.

Fixes: 605164c8e79d ("net/liquidio: add API to validate VF MTU")
Cc: stable@dpdk.org
Signed-off-by: Chuhong Yao <ych@panath.cn>
Acked-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
drivers/net/liquidio/lio_ethdev.c

index 0e0b5d8..64b1b86 100644 (file)
@@ -1405,6 +1405,11 @@ lio_dev_start(struct rte_eth_dev *eth_dev)
        /* Configure RSS if device configured with multiple RX queues. */
        lio_dev_mq_rx_configure(eth_dev);
 
+       /* Before update the link info,
+        * must set linfo.link.link_status64 to 0.
+        */
+       lio_dev->linfo.link.link_status64 = 0;
+
        /* start polling for lsc */
        ret = rte_eal_alarm_set(LIO_LSC_TIMEOUT,
                                lio_sync_link_state_check,