Partager via


OID_TCP_TASK_OFFLOAD

The TCP/IP transport queries OID_TCP_TASK_OFFLOAD to determine the task-offload capabilities of a miniport driver's NIC. After determining which task-offload capabilities a NIC supports, the TCP/IP transport protocol sets this object to enable the reported capabilities. The TCP/IP protocol can also disable all of a NIC's task-offload capabilities by setting this object. Only one protocol at a time can enable the task-offload capabilities of a particular NIC.

Querying a NIC's Task-Offload Capabilities

When the TCP/IP transport queries OID_TCP_TASK_OFFLOAD, it supplies in the InformationBuffer an NDIS_TASK_OFFLOAD_HEADER structure. This structure specifies the task-offload version supported by the TCP/IP transport, the encapsulation format for send and receives packets processed by the TCP/IP transport, and the size of the encapsulation header in such packets. With this information, the miniport driver or its NIC can locate the beginning of the first IP header in a transmit packet, which is a prerequisite for performing an offload task.

In response to a query of OID_TCP_TASK_OFFLOAD, a miniport driver returns, in the InformationBuffer, the NDIS_TASK_OFFLOAD_HEADER structure followed immediately by one or more NDIS_TASK_OFFLOAD structure describes a task-offload capability supported by the miniport driver's NIC. If the miniport driver's NIC supports multiple versions of a particular task-offload capability, it should return one NDIS_TASK_OFFLOAD structure for each version.

Each NDIS_TASK_OFFLOAD structure has a Task member that specifies the particular offload task to which the structure applies. Each NDIS_TASK_OFFLOAD structure also has a TaskBuffer that contains information pertinent to the specified offload task. The information in the TaskBuffer is formatted as one of the following structures:

  • NDIS_TASK_TCP_IP_CHECKSUM

    Specifies checksum offload capabilities

  • NDIS_TASK_IPSEC

    This structure is not supported.

  • NDIS_TASK_TCP_LARGE_SEND

    Specifies large-TCP-packet segmentation capabilities

    Note   If an intermediate driver modifies the contents of TCP packets that it forwards down to an underlying miniport driver such that TCP offload functions cannot be performed on the packets, the intermediate driver should respond to OID_TCP_TASK_OFFLOAD queries with a status of NDIS_STATUS_NOT_SUPPORTED instead of passing the request down to the underlying miniport.

Enabling a NIC's Task-Offload Capabilities

After querying a NIC's task-offload capabilities, the TCP/IP transport enables one or more of these capabilities by setting OID_TCP_TASK_OFFLOAD. When setting OID_TCP_TASK_OFFLOAD, the TCP/IP transport supplies in the InformationBuffer an NDIS_TASK_OFFLOAD_HEADER structure, followed immediately by an NDIS_TASK_OFFLOAD structure for each task-offload capability that the transport is enabling.

The Task in each NDIS_TASK_OFFLOAD structure indicates the offload task that the TCP/IP transport is enabling. The TCP/IP transport also enables capabilities for a particular offload task by setting members of the structure (NDIS_TASK_TCP_IP_CHECKSUM or NDIS_TASK_TCP_LARGE_SEND) in the TaskBuffer of each NDIS_TASK_OFFLOAD structure.

Changing a NIC's Task-Offload Capabilities

To change which task-offload capabilities are enabled for a NIC, the TCP/IP transport sets OID_TCP_TASK_OFFLOAD. The miniport driver must enable only those task-offload capabilities specified by the most recent set of OID_TCP_TASK_OFFLOAD. The miniport driver must disable all other task-offload capabilities.

Disabling a NIC's Task-Offload Capabilities

To disable all task-offload capabilities supported by a NIC, the TCP/IP transport sets OID_TCP_TASK_OFFLOAD, passing in the InformationBuffer only an NDIS_TASK_OFFLOAD_HEADER structure with the OffsetFirstTask member of this structure set to 0.

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.