]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
hyperv/hn: add the support for VF drivers (SR-IOV)
authorDexuan Cui <dexuan@FreeBSD.org>
Tue, 24 Jan 2017 09:24:14 +0000 (09:24 +0000)
committerDexuan Cui <dexuan@FreeBSD.org>
Tue, 24 Jan 2017 09:24:14 +0000 (09:24 +0000)
commit5bdfd3fd36524e05c97cffbc70cf07c894858786
treef79c902853ac991fb2cc79bcc5f914dda45895c0
parent92a6859b91b53e103eb1297ea95b11479de2b7a2
hyperv/hn: add the support for VF drivers (SR-IOV)

Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and
a VF NIC to work together (both NICs have the same MAC address), mainly to
support seamless live migration.

When the VF device becomes UP (or DOWN), the synthetic NIC driver needs
to switch the data path from the synthetic NIC to the VF (or the opposite).

Note: multicast/broadcast packets are still received through the synthetic
NIC and we need to inject the packets through the VF interface (if the VF is
UP), even if the synthetic NIC is DOWN (so we need to force the rxfilter
to be NDIS_PACKET_TYPE_PROMISCUOUS, when the VF is UP).

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 2 weeks
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8964
sys/dev/hyperv/netvsc/hn_nvs.c
sys/dev/hyperv/netvsc/hn_nvs.h
sys/dev/hyperv/netvsc/if_hn.c
sys/dev/hyperv/netvsc/if_hnreg.h
sys/dev/hyperv/netvsc/if_hnvar.h