NDIS_TASK_OFFLOAD (Compact 2013)

3/26/2014

When a miniport supplies the structure in response to OID_TCP_TASK_OFFLOAD, this structure specifies a network adapter's capabilities for performing a particular kind of task offloaded from the TCP/IP transport. This structure specifies an offload task that the TCP/IP transport is enabling.

Syntax

typedef struct _NDIS_TASK_OFFLOAD {
  ULONG Version;
  ULONG Size;
  NDIS_TASK Task;
  ULONG OffsetNextTask;
  ULONG TaskBufferLength;
  UCHAR TaskBuffer[1];
} NDIS_TASK_OFFLOAD, *PNDIS_TASK_OFFLOAD;

Members

  • Version
    Version number of this task-offload capability. If the miniport's network adapter supports more than one version of a particular task-offload capability, each version of the capability should be indicated with a separate NDIS_TASK_OFFLOAD structure. The TCP/IP transport selects the most suitable version to enable.
  • Size
    Specifies the size, in bytes, of the NDIS_TASK_OFFLOAD structure. Size is set to sizeof(NDIS_TASK_OFFLOAD) and is used to determine the version of the NDIS_TASK_OFFLOAD structure.
  • Task
    Specifies the kind of offload task as one of the following values:

    Value

    Description

    TcpIpChecksumNdisTask

    Checksum offload. TaskBuffer contains an NDIS_TASK_TCP_IP_CHECKSUM structure.

    IpSecNdisTask

    Not supported.

    TcpLargeSendNdisTask

    Segmentation offload. TaskBuffer contains an NDIS_TASK_TCP_LARGE_SEND structure.

  • OffsetNextTask
    Specifies, in bytes, the offset from the beginning of this NDIS_TASK_OFFLOAD structure to the next NDIS_TASK_OFFLOAD structure. If this NDIS_TASK_OFFLOAD structure is the last one in the buffer, OffsetNextTask is set to 0.
  • TaskBufferLength
    Specifies the size, in bytes, of the structure at TaskBuffer.
  • TaskBuffer
    Specifies a variable-length array that contains information that is specific to the offload task indicated by Task. The contents of TaskBuffer vary according to the task type.

Remarks

If a network adapter has the appropriate capabilities, the Microsoft TCP/IP transport can offload one or more of the following tasks to a network adapter:

  • Calculation and validation of IP or TCP checksums
  • IPsec processing
  • Segmentation of large TCP packets into smaller TCP packets

The TCP/IP transport determines a network adapter's task-offload capabilities by querying OID_TCP_TASK_OFFLOAD. In response, a miniport returns in the InformationBuffer member of the NDIS_REQUEST structure an NDIS_TASK_OFFLOAD_HEADER structure followed by one or more NDIS_TASK_OFFLOAD structures. The TaskBuffer member of each NDIS_TASK_OFFLOAD structure contains a task-specific structure (NDIS_TASK_TCP_IP_CHECKSUM or NDIS_TASK_TCP_LARGE_SEND) that specifies a particular task-offload capability supported by the miniport's network adapter. If the miniport's network adapter supports multiple versions of a particular task-offload capability, it returns one NDIS_TASK_OFFLOAD structure for each version.

After querying a network adapter's task-offload capabilities, the TCP/IP transport enables a network adapter's task-offload capabilities by setting OID_TCP_TASK_OFFLOAD. In this set operation, the TCP/IP transport supplies in InformationBuffer an NDIS_TASK_OFFLOAD_HEADER structure followed by an NDIS_TASK_OFFLOAD structure for each offload task that it is enabling. The miniport must examine each NDIS_TASK_OFFLOAD structure to determine which offload tasks are being enabled. The miniport must also examine the task-specific structure in TaskBuffer of each NDIS_TASK_OFFLOAD structure to determine which specific capabilities for a particular offload task are being enabled.

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Structures
NDIS_TASK_OFFLOAD_HEADER
NDIS_REQUEST
NDIS_TASK_TCP_LARGE_SEND
NDIS_TASK_TCP_IP_CHECKSUM
OID_TCP_TASK_OFFLOAD
NDIS 5.x Legacy Reference