tools: hv: set allow-hotplug for VF on Ubuntu
authorsixiao@microsoft.com <sixiao@microsoft.com>
Wed, 31 May 2017 17:28:13 +0000 (10:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Jun 2017 18:16:15 +0000 (14:16 -0400)
On HyperV, the VF interface can be offered by a host at any time.
Mark the VF interface as hotplug, to make sure it will be brought up
automatically when it is registered.

Signed-off-by: Simon Xiao <sixiao@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/hv/bondvf.sh

index 112deba8c4e900bc2cfd6d02684b77c9edbade56..8abd46e007dc8a6158005b52f9295296048afb50 100755 (executable)
@@ -134,7 +134,6 @@ function create_eth_cfg_ubuntu {
        local fn=$cfgdir/interfaces
 
        del_eth_cfg_ubuntu $1
-
        echo $'\n'auto $1 >>$fn
        echo iface $1 inet manual >>$fn
        echo bond-master $2 >>$fn
@@ -143,7 +142,10 @@ function create_eth_cfg_ubuntu {
 function create_eth_cfg_pri_ubuntu {
        local fn=$cfgdir/interfaces
 
-       create_eth_cfg_ubuntu $1 $2
+       del_eth_cfg_ubuntu $1
+       echo $'\n'allow-hotplug $1 >>$fn
+       echo iface $1 inet manual >>$fn
+       echo bond-master $2 >>$fn
        echo bond-primary $1 >>$fn
 }