Determining the VMQ Capabilities of a Network Adapter

NDIS provides the interface to determine the VMQ capabilities of a network adapter, such as:

  • The generic filtering capabilities of a network adapter.

  • Supported VM queue capabilities.

  • Lookahead support to allow splitting of the networking data memory into two separate buffers.

    Note  Starting with NDIS 6.30, splitting packet data into separate lookahead buffers is no longer supported.

Miniport drivers provide the following information to NDIS during network adapter initialization:

  • The VMQ hardware capabilities that the network adapter can support.

  • The VMQ capabilities that are currently enabled.

  • The global receive filtering features that are enabled or disabled on a network adapter.

Overlying drivers and applications can use the following OID query requests to obtain the network adapter capabilities.

OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES

OID_RECEIVE_FILTER_CURRENT_CAPABILITIES

OID_RECEIVE_FILTER_GLOBAL_PARAMETERS

NDIS handles these OID query requests for miniport drivers. Therefore, the query is not requested for miniport drivers. NDIS reports the currently enabled receive VMQ capabilities of a network adapter during initialization. Therefore, overlying drivers do not have to query these OIDs.

The NDIS_RECEIVE_FILTER_CAPABILITIES structure specifies the filtering capabilities of a network adapter. This structure is used in the following ways:

The NDIS_RECEIVE_FILTER_CAPABILITIES structure includes the following information:

EnabledFilterTypes

The types of the supported receive filters. The NDIS_RECEIVE_FILTER_VMQ_FILTERS_ENABLED flag specifies that virtual machine queue (VMQ) filters are enabled.

EnabledQueueTypes

The types of supported receive queues. The NDIS_RECEIVE_FILTER_VM_QUEUES_ENABLED flag specifies that virtual machine (VM) queues are enabled.

NumQueues

The number of receive queues that the network adapter supports. To support VMQ, this number must be equal to or less than the number of unicast MAC addresses that the NIC supports. This number must not include the default queue.

Note  The number of unicast MAC addresses or VM queues that a network adapter supports does not include the MAC address of the associated NIC.

SupportedQueueProperties

The queue properties that the network adapter supports. The NDIS_RECEIVE_FILTER_VM_QUEUE_SUPPORTED flag specifies that the network adapter provides the minimum requirements to support VMQ filtering. A VMQ-capable NIC must provide an MSI-X table entry for each receive queue. Therefore, a VMQ miniport driver must set the NDIS_RECEIVE_FILTER_MSI_X_SUPPORTED flag.

SupportedFilterTests

The filter test operations that a miniport driver supports. For example, the network adapter supports testing the selected header field to determine whether it is equal to a given value. A VMQ miniport driver must set the NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED flag.

SupportedHeaders

The types of network packet headers that a miniport driver can inspect. For example, the network adapter can inspect the MAC header of a network packet. The MAC header includes the packet type, destination and source MAC addresses, the VLAN identifier, and the priority tag fields. A VMQ miniport driver must set the NDIS_RECEIVE_FILTER_MAC_HEADER_SUPPORTED flag.

SupportedMacHeaderFields

The types of MAC header fields that a miniport driver can inspect. A VMQ miniport driver must set the NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED flag.

MaxMacHeaderFilters

The maximum number of MAC header filters that the miniport driver supports. There should be at least as many header filters as there are VM queues.

MaxQueueGroups

This member is reserved for NDIS.

MaxQueuesPerQueueGroup

This member is reserved for NDIS.

MinLookaheadSplitSize

The minimum size, in bytes, that the network adapter supports for lookahead packet segments.

Note  Starting with NDIS 6.30, splitting packet data into separate lookahead buffers is no longer supported. Miniport drivers that support NDIS 6.30 or later versions must set this member to zero.

MaxLookaheadSplitSize

The maximum size, in bytes, that the network adapter supports for lookahead packet segments.

Note  Starting with NDIS 6.30, splitting packet data into separate lookahead buffers is no longer supported. Miniport drivers that support NDIS 6.30 or later versions must set this member to zero.

After a successful return from the OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES OID query, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_RECEIVE_FILTER_CAPABILITIES structure. These capabilities can include VMQ hardware capabilities that are currently disabled by INF file settings or through the Advanced properties page. For more information about VMQ INF files settings, see VMQ Standard INF Entries.

NDIS miniport drivers supply the receive-filtering hardware capabilities during initialization in the HardwareReceiveFilterCapabilities member of the NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES structure.

After a successful return from the OID_RECEIVE_FILTER_CURRENT_CAPABILITIES OID query, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_RECEIVE_FILTER_CAPABILITIES structure. These capabilities include the currently enabled VMQ capabilities.

NDIS miniport drivers supply the currently enabled receive filtering capabilities during initialization in the CurrentReceiveFilterCapabilities member of the NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES structure.

NDIS reports the currently enabled receive filtering capabilities of an underlying network adapter to overlying protocol drivers in the ReceiveFilterCapabilities member of the NDIS_BIND_PARAMETERS structure during the bind operation.

The NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS structure is used in the OID_RECEIVE_FILTER_GLOBAL_PARAMETERS query OID to obtain the current global receive filter settings.

NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS includes the following information:

EnabledFilterTypes

The types of enabled receive filters. The NDIS_RECEIVE_FILTER_VMQ_FILTERS_ENABLED flag specifies that virtual machine queue (VMQ) filters are enabled.

EnabledQueueTypes

The types of enabled receive queues. The NDIS_RECEIVE_FILTER_VM_QUEUES_ENABLED flag specifies that virtual machine (VM) queues are enabled.

After a successful return from the OID_RECEIVE_FILTER_GLOBAL_PARAMETERS OID query, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS structure. The NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS structure specifies the receive-filtering features that are enabled or disabled on a network adapter.

NDIS protocol drivers use OID_RECEIVE_FILTER_GLOBAL_PARAMETERS to query the current global configuration parameters for receive filtering on a network adapter. For example, protocol drivers can use this OID to determine whether types of receive filters or receive queues are enabled or disabled.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft