From: Stephen Hemminger Date: Fri, 7 Feb 2020 18:08:16 +0000 (-0800) Subject: net/netvsc: initialize link state X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=047ad3787a2f5d99277e0d8d756580a1d5ea2891;p=dpdk.git net/netvsc: initialize link state If application is using link state interrupt, the correct link state needs to be filled in when device is started. This is similar to how virtio updates link information. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org Reported-by: Mohammed Gamal Signed-off-by: Stephen Hemminger Tested-by: Mohammed Gamal --- diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index c79f924379..564620748d 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -823,6 +823,10 @@ hn_dev_start(struct rte_eth_dev *dev) if (error) hn_rndis_set_rxfilter(hv, 0); + /* Initialize Link state */ + if (error == 0) + hn_dev_link_update(dev, 0); + return error; }