Muokkaa

Jaa


Hyper-V Extensible Switch Send and Receive Flags

Note  This page assumes that you are familiar with the information and diagrams in Overview of the Hyper-V Extensible Switch and Hybrid Forwarding.

Packet traffic that moves over the Hyper-V extensible switch data path is obtained by extensions in the following way:

The following flags may be set in the SendFlags parameter of FilterSendNetBufferLists or NdisFSendNetBufferLists:

NDIS_SEND_FLAGS_SWITCH_SINGLE_SOURCE
If this flag is set, all packets in a linked list of NET_BUFFER_LIST structures originated from the same Hyper-V extensible switch source port.

When NDIS calls FilterSendNetBufferLists, it will set this flag if the extensible switch extensible interface has grouped multiple packets from the same source port. For the best performance, the extensions should keep this grouping in place and set this flag when it calls NdisFSendNetBufferLists. The extension can also add any originated or cloned packets to the linked list of NET_BUFFER_LIST structures if the extension uses the same source port as the other packets in the list.

Note  If each packet in the linked list of NET_BUFFER_LIST structures uses the same source port, the extension should set the NDIS_SEND_COMPLETE_FLAGS_SWITCH_SINGLE_SOURCE flag in the SendCompleteFlags parameter of NdisFSendNetBufferListsComplete when it completes the send request.

NDIS_SEND_FLAGS_SWITCH_DESTINATION_GROUP
If this flag is set, all packets in a linked list of NET_BUFFER_LIST structures are to be forwarded to the same extensible switch destination port.

A forwarding extension can use this flag for a linked list of NET_BUFFER_LIST structures that it forwards on the ingress data path after it determines each packet's destination ports. This flag is consumed and removed by the underlying miniport edge of the extensible switch before it forwards the packets up the egress data path.

Capturing and filtering extensions cannot use this flag.

Note  The forwarding extension only determines the packet's destination ports for non-NVGRE packets. If the packet is an NVGRE packet, the Hyper-V Network Virtualization (HNV) component determines the packet's destination ports and forwards the packet. For more information, see Hybrid Forwarding.

For the best performance, forwarding extensions should set this flag if all packets in the linked list are to be forwarded to the same destination port. By setting this flag, the extension is acknowledging that all packets in the linked list have the same destination port elements in the extensible switch forwarding context.

Note  The forwarding extension must not set this flag for a linked list of packets that have multiple destination ports.

The following flags may be set in the ReceiveFlags parameter of FilterReceiveNetBufferLists or NdisFIndicateReceiveNetBufferLists:

NDIS_RECEIVE_FLAGS_SWITCH_SINGLE_SOURCE
If this flag is set, all packets in a linked list of NET_BUFFER_LIST structures originated from the same Hyper-V extensible switch source port.

When NDIS calls FilterReceiveNetBufferLists, it will set this flag if the extensible switch has grouped multiple packets from the same source port. For the best performance, the extensions should keep this grouping in place and set this flag when it calls NdisMIndicateReceiveNetBufferLists. The extensions should also add any originated or cloned packets to the linked list of NET_BUFFER_LIST structures if the packet has the same source port as the other packets in the list.

Note  If each packet in the linked list of NET_BUFFER_LIST structures use the same source port, the extension should set the NDIS_RETURN_FLAGS_SWITCH_SINGLE_SOURCE flag in the ReturnFlags parameter of FilterReturnNetBufferLists when the receive request completes. The extension must set this flag in the ReturnFlags parameter if it calls NdisFReturnNetBufferLists to return packets that it did not originate or clone.

NDIS_RECEIVE_FLAGS_SWITCH_DESTINATION_GROUP
If this flag is set, all packets in a linked list of NET_BUFFER_LIST structures are to be forwarded to the same extensible switch destination port.

When NDIS calls FilterReceiveNetBufferLists, it will set this flag if the extensible switch has grouped multiple packets that have the same destination ports. For the best performance, the extensions should keep this grouping in place and set this flag when it calls NdisMIndicateReceiveNetBufferLists. The extensions should also add any originated or cloned packets to the linked list of NET_BUFFER_LIST structures if the packet has the same destination ports as the other packets in the list.

Note  When an extension calls NdisFIndicateReceiveNetBufferLists, it must not set the NDIS_RECEIVE_FLAGS_RESOURCES flag in the ReceiveFlags parameter. The extensible switch interface ignores this flag and will complete the receive indication by calling FilterReturnNetBufferLists.