4 # If transparent VF is enabled, don't do anything.
7 sysctl -n hw.hn.vf_transparent > /dev/null 2>&1
10 # Old kernel; no transparent VF.
13 vf_transparent=`sysctl -n hw.hn.vf_transparent`
16 if [ $vf_transparent -ne 0 ]
18 # Transparent VF; done!
37 # Check to see whether $iface is a VF or not.
38 # If $iface is a VF, bring it up now.
44 sysctl -n hw.hn.vflist > /dev/null 2>&1
47 # Old kernel; nothing could be done properly.
50 vf_list=`sysctl -n hw.hn.vflist`
57 # Linger a little bit (at least 2 seconds) mainly to
58 # make sure that $iface is fully attached.
61 # In Azure hyperv_vf_delay should be configured to a
62 # large value, e.g. 120 seconds, to avoid racing cloud
65 test $hyperv_vf_delay -ge 2 > /dev/null 2>&1
72 # "(sleep ..; ifconfig .. up) > /dev/null 2>&1 &"
75 daemon -f /usr/libexec/hyperv/hyperv_vfattach \
76 $iface $hyperv_vf_delay