Bagikan melalui


NDIS_TASK_OFFLOAD_HEADER (Compact 2013)

3/26/2014

This structure contains the encapsulation format for the send and receive packets on which a miniport can perform tasks that are offloaded from the TCP/IP transport.

Syntax

typedef struct _NDIS_TASK_OFFLOAD_HEADER {
  ULONG Version;
  ULONG Size;
  ULONG Reserved;
  ULONG OffsetFirstTask;
  NDIS_ENCAPSULATION_FORMAT EncapsulationFormat;
} NDIS_TASK_OFFLOAD_HEADER, *PNDIS_TASK_OFFLOAD_HEADER;

Members

  • Version
    Specifies the task-offload version supported by the TCP/IP transport. This value is always set to NDIS_TASK_OFFLOAD_VERSION.
  • Size
    Specifies, in bytes, the size of the NDIS_TASK_OFFLOAD_HEADER structure. Size is set to sizeof(NDIS_TASK_OFFLOAD_HEADER) and is used to determine the version of the NDIS_TASK_OFFLOAD_HEADER structure.
  • Reserved
    Reserved.
  • OffsetFirstTask
    Specifies, in bytes, the offset from the beginning of the enclosing buffer to the first NDIS_TASK_OFFLOAD structure. The miniport is responsible for setting this value when responding to a query of OID_TCP_TASK_OFFLOAD. The TCP/IP transport is responsible for setting this value when it sets OID_TCP_TASK_OFFLOAD. If no NDIS_TASK_OFFLOAD structures are in the buffer, OffsetFirstTask is set to zero.
  • EncapsulationFormat
    Specifies the encapsulation format for both send and receive packets that are passed to or from the TCP/IP transport through the miniport's network adapter. This information is formatted as an NDIS_ENCAPSULATION_FORMAT structure.

Remarks

When the TCP/IP transport queries OID_TCP_TASK_OFFLOAD, it initializes and passes an NDIS_TASK_OFFLOAD_HEADER structure in the information buffer pointed to by the InformationBuffer member of the NDIS_REQUEST structure associated with the query. The miniport that receives this query examines the NDIS_TASK_OFFLOAD_HEADER structure to determine the encapsulation format for send and receive packets processed by the TCP/IP transport. The miniport or its network adapter uses the encapsulation information to determine the format of the encapsulation header, and the start of the first IP header, in such packets so that the network adapter can perform offload tasks on these packets.

The miniport responds to the OID_TCP_TASK_OFFLOAD query by appending one or more NDIS_TASK_OFFLOAD structures to the NDIS_TASK_OFFLOAD_HEADER structure in the information buffer. Each NDIS_TASK_OFFLOAD structure represents an offload task supported by the miniport's network adapter. The miniport sets the OffsetFirstTask member of the NDIS_TASK_OFFLOAD_HEADER structure to the offset, in bytes, from the start of the information buffer to the first NDIS_TASK_OFFLOAD structure. The miniport does not alter any other values in the NDIS_TASK_OFFLOAD_HEADER structure. If the Version, Size, or EncapsulationFormat value that is specified in the NDIS_TASK_OFFLOAD_HEADER structure are unacceptable to the miniport, the miniport should fail the OID_TCP_TASK_OFFLOAD query.

To support task offloads for a particular frame type, a miniport's network adapter must support the appropriate encapsulation types. The following table indicates which encapsulation types a miniport must support to be able to offload tasks for a given frame type.

Frame type

Encapsulation type

Ethernet

IEEE_802_3_Encapsulation

Token Ring

IEEE_802_5_Encapsulation

ATM (CLIP)

LLC_SNAP_ROUTED_Encapsulation

Other

UNSPECIFIED_Encapsulation

A network adapter does not have to support the same set of offload tasks for each encapsulation type. For example, an Ethernet network adapter can support checksum and Ipsec offloads for the IEEE_802_3_Encapsulation type (Ethernet DIX) but only checksum offloads for the LLC_SNAP_ROUTED_Encapsulation type.

A network adapter can offload the segmentation of large TCP packets only if one of the following is true:

  • It supports the encapsulation format specified by the TCP/IP protocol in the NDIS_TASK_OFFLOAD_HEADER structure.
  • The specified encapsulation type is UNSPECIFIED_Encapsulation and Encapsulation
  • HeaderSize is set to the size of the encapsulation header for the media supported by the miniport and its network adapter.

The encapsulation format specified by the TCP/IP transport in the NDIS_TASK_OFFLOAD_HEADER structure applies to both send and receive packets that are passed to or from the TCP/IP transport through the network adapter. Only one encapsulation format is supported per network adapter at any time.

To disable all a network adapter's task-offload capabilities, the TCP/IP transport sets OID_TCP_TASK_OFFLOAD, passing only NDIS_TASK_OFFLOAD_HEADER in the information buffer. In this case, the TCP/IP transport sets the OffsetFirstTask member of NDIS_TASK_OFFLOAD_HEADER to zero.

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Structures
NDIS_ENCAPSULATION_FORMAT
NDIS_TASK_OFFLOAD
NDIS_REQUEST
NDIS_TASK_TCP_LARGE_SEND
NDIS_TASK_TCP_IP_CHECKSUM
OID_TCP_TASK_OFFLOAD
NDIS 5.x Legacy Reference