From fe242d514d1ae8e7c73b6f3a14bf2578ebe55091 Mon Sep 17 00:00:00 2001 From: Chuhong Yao Date: Tue, 22 May 2018 22:33:29 +0800 Subject: [PATCH] net/liquidio: fix link state fetching during start 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 Acked-by: Shijith Thotton --- drivers/net/liquidio/lio_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index 0e0b5d84de..64b1b86ca5 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -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, -- 2.20.1