hv_netvsc: do not use VF device if link is down
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 4 Aug 2020 16:54:15 +0000 (09:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Aug 2020 23:15:16 +0000 (16:15 -0700)
commit7c9864bbccc23e1812ac82966555d68c13ea4006
tree0de13b60ef54f18313812bc3c9e675fbae69d979
parent02afa9c66bb954c6959877c70d9e128dcf0adce7
hv_netvsc: do not use VF device if link is down

If the accelerated networking SRIOV VF device has lost carrier
use the synthetic network device which is available as backup
path. This is a rare case since if VF link goes down, normally
the VMBus device will also loose external connectivity as well.
But if the communication is between two VM's on the same host
the VMBus device will still work.

Reported-by: "Shah, Ashish N" <ashish.n.shah@intel.com>
Fixes: 0c195567a8f6 ("netvsc: transparent VF management")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c