#
322612 |
|
17-Aug-2017 |
sephe |
MFC 322488 hyperv: Update copyright for the files changed in 2017
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11982
|
#
322489 |
|
14-Aug-2017 |
sephe |
MFC 322299
hyperv/hn: Implement transparent mode network VF.
How network VF works with hn(4) on Hyper-V in transparent mode:
- Each network VF has a cooresponding hn(4). - The network VF and the it's cooresponding hn(4) have the same hardware address. - Once the network VF is attached, the cooresponding hn(4) waits several seconds to make sure that the network VF attach routing completes, then: o Set the intersection of the network VF's if_capabilities and the cooresponding hn(4)'s if_capabilities to the cooresponding hn(4)'s if_capabilities. And adjust the cooresponding hn(4) if_capable and if_hwassist accordingly. (*) o Make sure that the cooresponding hn(4)'s TSO parameters meet the constraints posed by both the network VF and the cooresponding hn(4). (*) o The network VF's if_input is overridden. The overriding if_input changes the input packet's rcvif to the cooreponding hn(4). The network layers are tricked into thinking that all packets are neceived by the cooresponding hn(4). o If the cooresponding hn(4) was brought up, bring up the network VF. The transmission dispatched to the cooresponding hn(4) are redispatched to the network VF. o Bringing down the cooresponding hn(4) also brings down the network VF. o All IOCTLs issued to the cooresponding hn(4) are pass-through'ed to the network VF; the cooresponding hn(4) changes its internal state if necessary. o The media status of the cooresponding hn(4) solely relies on the network VF. o If there are multicast filters on the cooresponding hn(4), allmulti will be enabled on the network VF. (**) - Once the network VF is detached. Undo all damages did to the cooresponding hn(4) in the above item.
NOTE: No operation should be issued directly to the network VF, if the network VF transparent mode is enabled. The network VF transparent mode can be enabled by setting tunable hw.hn.vf_transparent to 1. The network VF transparent mode is _not_ enabled by default, as of this commit.
The benefit of the network VF transparent mode is that the network VF attachment and detachment are transparent to all network layers; e.g. live migration detaches and reattaches the network VF.
The major drawbacks of the network VF transparent mode: - The netmap(4) support is lost, even if the VF supports it. - ALTQ does not work, since if_start method cannot be properly supported.
(*) These decisions were made so that things will not be messed up too much during the transition period.
(**) This does _not_ need to go through the fancy multicast filter management stuffs like what vlan(4) has, at least currently: - As of this write, multicast does not work in Azure. - As of this write, multicast packets go through the cooresponding hn(4).
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11803
|
#
314091 |
|
22-Feb-2017 |
dexuan |
MFC 312688
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
|
#
308518 |
|
11-Nov-2016 |
sephe |
MFC 307710-307712,307714
307710 hyperv/hn: Always query RSS capabilities.
- This avoid distributing NDIS version check. - Only NDIS 6.20 required (earlier NDIS uses different indirect table format).
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8291
307711 hyperv/hn: Check NVS version for HASHVAL pktinfo on sending path.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8293
307712 hyperv/hn: Add network change support.
Currently the network change is simulated by link status changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8295
307714 hyperv/hn: Function renaming; consistent w/ hardware capabilities query.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8296
|
#
307502 |
|
17-Oct-2016 |
sephe |
MFC 305578-305581
305578 hyperv/hn: Pull vmbus channel open up.
While I'm here, pull up the channel callback related code too.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7805
305579 hyperv/hn: Push RXBUF size adjustment down.
It is not used in other places.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7806
305580 hyperv/hn: Factor out function to do NVS initialization.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7807
305581 hyperv/hn: Pass MTU around.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7808
|
#
307500 |
|
17-Oct-2016 |
sephe |
MFC 305454,305455,305521,305524-305526
305454 hyperv/hn: Fix VLAN tag setup for outgoing VLAN packets.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7785
305455 hyperv/hn: Avoid bit fields for LSOv2 setup.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7786
305521 hyperv/hn: Avoid bit fields for TXCSUM setup.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7792
305524 hyperv/hn: Cleanup RNDIS packet message encapsulation.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7793
305525 hyperv/hn: Simplify per-packet-info construction.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7794
305526 hyperv/hn: Nuke unused bits
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7795
|
#
307495 |
|
17-Oct-2016 |
sephe |
MFC 305175,305176,305179,305182,305268,305270,305276
305175 net/rndis: Define per-packet-info for RNDIS packet message
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7708
305176 hyperv/hn: Stringent per-packet-info verification.
While I'm here, minor style changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7709
305179 hyperv/hn: Fix VLAN tag construction.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7716
305182 net/rndis: Define types for RNDIS pktinfo rm_type field.
They are defined by NDIS spec, so the NDIS prefix.
Reviewed by: hps Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7717
305268 hyperv/hn: Rework RXCSUM related bits
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7735
305270 hyperv/hn: Simplify RX hash related bits.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7736
305276 hyperv/hn: Use the per-packet-info types defined by net/rndis.h
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7737
|
#
307476 |
|
17-Oct-2016 |
sephe |
MFC 304204-304206,304252-304256
304204 hyperv/hn: Factor out hn_nvs_send/hn_nvs_send_sglist
Avoid unnecessary message type setting and centralize the send context to transaction id cast.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7500
304205 hyperv/hn: Simplify RNDIS NVS message sending.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7501
304206 hyperv/hn: Simplify RNDIS message checks on RX path.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7502
304252 hyperv/hn: Ignore the useless TX table.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7514
304253 hyperv/hn: Simplify RNDIS RX packets acknowledgement.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7515
304254 hyperv/hn: Remove reference to nvsp_msg
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7516
304255 hyperv/hn: Remove reference to nvsp_status
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7517
304256 hyperv/hn: Get rid of unused bits
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7518
|
#
307475 |
|
16-Oct-2016 |
sephe |
MFC 303945,303947-303949,303989,303992,303998,304001,304002,304109,304111
303945 hyperv/vmbus: Add macro to get channel packet data length.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7455
303947 hyperv/vmbus: Add APIs for various types of transactions.
Reviewed by: Jun Su <junsu microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7456
303948 hyperv/hn: Switch to vmbus xact APIs for NVS initialization
Reviewed by: Jun Su <junsu microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7457
303949 hyperv/vmbus: Use xact APIs to implement post message Hypercall APIs
Avoid code duplication.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7458
303989 hyperv/hn: Simplify NDIS configuration.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7466
303992 hyperv/hn: Simplify NDIS initialization.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7467
303998 hyperv/hn: Switch to vmbus xact APIs for NVS RXBUF connection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7469
304001 hyperv/hn: Switch to vmbus xact APIs for NVS chimney buffer connection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7470
304002 hyperv/hn: Simplify RXBUF disconnection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7472
304109 hyperv/hn: Simplify chimney sending buffer disconnection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7479
304111 hyperv/hn: Switch to vmbus xact APIs for sub-channel alloc request.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7480
|