Redigera

Dela via


Reporting Packet Coalescing Capabilities

Miniport drivers register the following capabilities with NDIS during network adapter initialization:

  • The packet coalescing capabilities that the network adapter supports.

  • The packet coalescing capabilities that are currently enabled on the network adapter.

  • The packet coalescing receive filtering capabilities that are currently enabled on the network adapter.

Note A miniport driver's support for packet coalescing can be enabled or disabled through the *PacketCoalescing INF keyword setting. This setting is displayed in the Advanced property page for the network adapter. For more information about the packet coalescing INF file setting, see Standardized INF Keywords for Packet Coalescing.

The miniport driver reports the packet coalescing and filtering capabilities of the underlying network adapter through an NDIS_RECEIVE_FILTER_CAPABILITIES structure. If the *PacketCoalescing keyword setting in the registry has a value of one, packet coalescing is enabled and the miniport driver initializes the NDIS_RECEIVE_FILTER_CAPABILITIES structure in the following way:

  1. The miniport driver initializes the Header member. The driver sets the Type member of Header to NDIS_OBJECT_TYPE_DEFAULT.

    If the driver supports packet coalescing, it sets the Revision member of Header to the NDIS_RECEIVE_FILTER_CAPABILITIES_REVISION_2 and the Size member to NDIS_SIZEOF_RECEIVE_FILTER_CAPABILITIES_REVISION_2.

  2. The miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_SUPPORTED_ON_DEFAULT_QUEUE flag in the SupportedQueueProperties member.

    If this flag is set, the network adapter must support the filtering of received multicast packets in hardware. This filtering is based on the multicast addresses that NDIS offloaded to the network adapter by sending it OID_802_3_MULTICAST_LIST OID set requests.

    Note Protocol drivers can also change the contents of the multicast address list by sending OID_802_3_ADD_MULTICAST_ADDRESS and OID_802_3_DELETE_MULTICAST_ADDRESS requests. NDIS combines these requests into OID_802_3_MULTICAST_LIST OID set requests.

Note The adapter is required to reject any incoming multicast packet whose destination media access control (MAC) address does not match any of the multicast addresses specified by these OID set requests.

  1. The miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag in the EnabledFilterTypes member.

    Note If the driver sets this flag, it must also set the NDIS_RECEIVE_FILTER_PACKET_COALESCING_SUPPORTED_ON_DEFAULT_QUEUE flag in the SupportedQueueProperties member. Otherwise, NDIS will fail the call to NdisMSetMiniportAttributes by returning NDIS_STATUS_BAD_CHARACTERISTICS.

  2. If the miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the driver must support all receive filter test criteria. The driver advertises this support by setting the following flags in the SupportedFilterTests member:

    • NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED

    • NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_MASK_EQUAL_SUPPORTED

    • NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_NOT_EQUAL_SUPPORTED

    Note If the miniport driver does not set the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the driver must set the SupportedFilterTests member to zero.

  3. If the miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the miniport driver must support the filtering of data within various fields of the media access control (MAC), IP version 4 (IPv4), and IP version 6 (IPv6) headers. The driver advertises this support by setting the following flags in the SupportedHeaders member:

    • NDIS_RECEIVE_FILTER_MAC_HEADER_SUPPORTED

    • NDIS_RECEIVE_FILTER_ARP_HEADER_SUPPORTED

    • NDIS_RECEIVE_FILTER_IPV4_HEADER_SUPPORTED

    • NDIS_RECEIVE_FILTER_IPV6_HEADER_SUPPORTED

    • NDIS_RECEIVE_FILTER_UDP_HEADER_SUPPORTED

    Note If the miniport driver does not set the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the driver must set the SupportedHeaders member to zero.

  4. If the miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the miniport driver must support the filtering of data within the media access control (MAC) header of the received packet. The driver advertises this support by setting the following flags in the SupportedMacHeaderFields member:

    • NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED

    • NDIS_RECEIVE_FILTER_MAC_HEADER_PROTOCOL_SUPPORTED

    • NDIS_RECEIVE_FILTER_MAC_HEADER_PACKET_TYPE_SUPPORTED

    Note If the miniport driver does not set the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the driver must set the SupportedMacHeaderFields member to zero.

  5. If the miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the miniport driver must support the filtering of data within the header of a received Address Resolution Protocol (ARP) packet. The driver advertises this support by setting the following flags in the SupportedARPHeaderFields member:

    • NDIS_RECEIVE_FILTER_ARP_HEADER_OPERATION_SUPPORTED

    • NDIS_RECEIVE_FILTER_ARP_HEADER_SPA_SUPPORTED

    • NDIS_RECEIVE_FILTER_ARP_HEADER_TPA_SUPPORTED

    Note If the miniport driver does not set the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the driver must set the SupportedARPHeaderFields member to zero.

  6. If the miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the miniport driver must support the filtering of data within the Open Systems Interconnection (OSI) layer 3 (L3) header of a received IP version 4 (IPv4) packet. The driver advertises this support by setting the following flags in the SupportedIPv4HeaderFields member:

    • NDIS_RECEIVE_FILTER_IPV4_HEADER_PROTOCOL_SUPPORTED

    Note If the miniport driver does not set the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the driver must set the SupportedIPv4HeaderFields member to zero.

  7. If the miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the miniport driver must support the filtering of data within the L3 header of a received IP version 6 (IPv6) packet. The driver advertises this support by setting the following flags in the SupportedIPv6HeaderFields member:

    • NDIS_RECEIVE_FILTER_IPV6_HEADER_PROTOCOL_SUPPORTED

    Note If the miniport driver does not set the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the driver must set the SupportedIPv6HeaderFields member to zero.

  8. If the miniport driver sets the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the miniport driver must support the filtering of data within the OSI layer 4 (L4) header of a received User Datagram Protocol (UDP) packet. The driver advertises this support by setting the following flags in the SupportedIUdpHeaderFields member:

    • NDIS_RECEIVE_FILTER_UDP_HEADER_DEST_PORT_SUPPORTED

    Note If the received UDP packet contains IPv4 options or IPv6 extension headers, the network adapter can handle the packet as if it failed the UDP filter test. In this way, the adapter can automatically drop the received packet.

Note If the miniport driver does not set the NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED flag, the driver must set the SupportedIUdpHeaderFields member to zero.

  1. The miniport driver must report the maximum number of tests on packet header fields that can be specified for a single packet coalescing filter. The driver specifies this value in the MaxFieldTestsPerPacketCoalescingFilter member.

    Note Network adapters that support packet coalescing must support five or more packet header fields that can be specified for a single packet coalescing filter. If the adapter does not support packet coalescing, the miniport driver must set this value to zero.

  2. The miniport driver must report the maximum number of packet coalescing filters that are supported by the network adapter. The driver specifies this value in the MaxPacketCoalescingFilters member.

    Note Network adapters that support packet coalescing must support ten or more packet coalescing filters. If the adapter does not support packet coalescing, the miniport driver must set this value to zero.

When NDIS calls the miniport driver's MiniportInitializeEx function, the driver reports the packet coalescing and filtering capabilities of the underlying network adapter by following these steps:

The method that is used by miniport drivers to report the packet coalescing and filtering capabilities of the underlying network adapter is based on the NDIS 6.20 method for reporting power management capabilities. For more information about this method, see Reporting Power Management Capabilities.

For more information about the adapter initialization process, see Initializing a Miniport Adapter.