diff options
author | dexuan <dexuan@FreeBSD.org> | 2017-02-23 07:04:17 +0000 |
---|---|---|
committer | dexuan <dexuan@FreeBSD.org> | 2017-02-23 07:04:17 +0000 |
commit | eacb7ed261c8a649db8cba504d96d0f0aa0c7805 (patch) | |
tree | d653110b015e30846c3de0dd5b511e94d60e9bf9 /sys/dev/hyperv/netvsc/if_hnreg.h | |
parent | 801edb7982092c7fdc32ca79e679bc44e314d71f (diff) | |
download | FreeBSD-src-eacb7ed261c8a649db8cba504d96d0f0aa0c7805.zip FreeBSD-src-eacb7ed261c8a649db8cba504d96d0f0aa0c7805.tar.gz |
MFC: r312688
Approved by: sephe (mentor)
r312688
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)
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8964
Diffstat (limited to 'sys/dev/hyperv/netvsc/if_hnreg.h')
-rw-r--r-- | sys/dev/hyperv/netvsc/if_hnreg.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/hyperv/netvsc/if_hnreg.h b/sys/dev/hyperv/netvsc/if_hnreg.h index a3b2b8b..a964b4f 100644 --- a/sys/dev/hyperv/netvsc/if_hnreg.h +++ b/sys/dev/hyperv/netvsc/if_hnreg.h @@ -133,6 +133,17 @@ struct hn_nvs_ndis_init { } __packed; CTASSERT(sizeof(struct hn_nvs_ndis_init) >= HN_NVS_REQSIZE_MIN); +#define HN_NVS_DATAPATH_SYNTHETIC 0 +#define HN_NVS_DATAPATH_VF 1 + +/* No response */ +struct hn_nvs_datapath { + uint32_t nvs_type; /* HN_NVS_TYPE_SET_DATAPATH */ + uint32_t nvs_active_path;/* HN_NVS_DATAPATH_* */ + uint32_t nvs_rsvd[6]; +} __packed; +CTASSERT(sizeof(struct hn_nvs_datapath) >= HN_NVS_REQSIZE_MIN); + struct hn_nvs_rxbuf_conn { uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_CONN */ uint32_t nvs_gpadl; /* RXBUF vmbus GPADL */ |