aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorGaurav Kohli <[email protected]>2022-10-06 05:52:59 +0000
committerDavid S. Miller <[email protected]>2022-10-07 07:43:58 +0000
commit365e1ececb2905f94cc10a5817c5b644a32a3ae2 (patch)
tree7b397b41e30b0e5d4a9c6323acbb192552caf08c /drivers/net/hyperv/hyperv_net.h
parentnet: ieee802154: return -EINVAL for unknown addr type (diff)
downloadkernel-365e1ececb2905f94cc10a5817c5b644a32a3ae2.tar.gz
kernel-365e1ececb2905f94cc10a5817c5b644a32a3ae2.zip
hv_netvsc: Fix race between VF offering and VF association message from host
During vm boot, there might be possibility that vf registration call comes before the vf association from host to vm. And this might break netvsc vf path, To prevent the same block vf registration until vf bind message comes from host. Cc: [email protected] Fixes: 00d7ddba11436 ("hv_netvsc: pair VF based on serial number") Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: Gaurav Kohli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r--drivers/net/hyperv/hyperv_net.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 25b38a374e3c..dd5919ec408b 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -1051,7 +1051,8 @@ struct net_device_context {
u32 vf_alloc;
/* Serial number of the VF to team with */
u32 vf_serial;
-
+ /* completion variable to confirm vf association */
+ struct completion vf_add;
/* Is the current data path through the VF NIC? */
bool data_path_is_vf;