Determining the NVGRE Task Offload Capabilities of a Network Adapter
A miniport driver that supports Network Virtualization using Generic Routing Encapsulation (NVGRE) Task Offload reports this capability by means of the NDIS_OFFLOAD structure that its MiniportInitializeEx function passes to NdisMSetMiniportAttributes.
In the NDIS_OFFLOAD structure, the Header member must be set as follows:
- The Revision member must be set to NDIS_OFFLOAD_REVISION_3.
- The Size member must be set to NDIS_SIZEOF_NDIS_OFFLOAD_REVISION_3.
To report its support for NVGRE task offload, a miniport driver sets the following members in the NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD structure, which is stored in the EncapsulatedPacketTaskOffloadGre member of the NDIS_OFFLOAD structure that the miniport driver's MiniportInitializeEx function passes to NdisMSetMiniportAttributes:
Set the MaxHeaderSizeSupported member to the maximum header size from the beginning of the packet to the beginning of the inner TCP or UDP payload (the last byte of TCP or UDP inner header) that the NIC must support for all of these task offloads. The protocol driver is expected to not offload processing of a packet whose combined encapsulation headers exceed this size.
Note 256 bytes is a good default value that should cover all possible cases.
Set the other members to indicate which types of task offload the miniport driver supports for encapsulated packets. For a list of the flags that can be set for these members, see the Remarks section of NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD.
To determine whether a miniport driver supports NVGRE task offload, protocol and filter drivers can issue the OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES OID request, which returns the NDIS_OFFLOAD structure.
Note To determine whether the miniport driver's NVGRE capability is currently enabled, use the OID_TCP_OFFLOAD_CURRENT_CONFIG OID request as described in Querying and Changing NVGRE Task Offload State.