NET_ADAPTER_RX_CAPABILITIES structure

Warning

Some information in this topic relates to prereleased product, which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

NetAdapterCx is preview only in Windows 10, version 1903.

The NET_ADAPTER_RX_CAPABILITIES structure describes the receive capabilities of a net adapter.

Syntax

typedef struct _NET_ADAPTER_RX_CAPABILITIES {
  ULONG                                  Size;
  NET_RX_FRAGMENT_BUFFER_ALLOCATION_MODE AllocationMode;
  NET_RX_FRAGMENT_BUFFER_ATTACHMENT_MODE AttachmentMode;
  UINT32                                 FragmentRingNumberOfElementsHint;
  SIZE_T                                 MaximumFrameSize;
  SIZE_T                                 MaximumNumberOfQueues;
  union {
    struct {
      PFN_NET_ADAPTER_RETURN_RX_BUFFER EvtAdapterReturnRxBuffer;
    } DUMMYSTRUCTNAME;
    struct {
      NET_MEMORY_MAPPING_REQUIREMENT MappingRequirement;
      SIZE_T                         FragmentBufferAlignment;
      NET_ADAPTER_DMA_CAPABILITIES   *DmaCapabilities;
    } DUMMYSTRUCTNAME2;
  } DUMMYUNIONNAME;
} NET_ADAPTER_RX_CAPABILITIES;

Members

Size

The size of this structure, in bytes.

AllocationMode

A NET_RX_FRAGMENT_BUFFER_ALLOCATION_MODE value that specifies how the operating system should allocate receive buffers.

AttachmentMode

A NET_RX_FRAGMENT_BUFFER_ATTACHMENT_MODE value that specifies how the operating system should pre-attach receive buffers.

FragmentRingNumberOfElementsHint

A hint indicating how many elements the adapter wants for each receive queue's ring buffer of NET_FRAGMENTs. This member must be a power of 2.

MaximumFrameSize

MaximumNumberOfQueues

The maximum number of receive queues that the adapter supports.

DUMMYUNIONNAME

A union that contains the following members:

DUMMYUNIONNAME.DUMMYSTRUCTNAME

DUMMYUNIONNAME.DUMMYSTRUCTNAME.EvtAdapterReturnRxBuffer

A pointer to the driver's EVT_NET_ADAPTER_RETURN_RX_BUFFER callback function. This member is required if the AllocationMode member is set to NetRxFragmentBufferAllocationModeDriver for the operating system to invoke once the system is finished with the receive buffer.

DUMMYUNIONNAME.DUMMYSTRUCTNAME2

DUMMYUNIONNAME.DUMMYSTRUCTNAME2.MappingRequirement

A NET_MEMORY_MAPPING_REQUIREMENT value that specifies how the operating system should map receive data buffers.

DUMMYUNIONNAME.DUMMYSTRUCTNAME2.FragmentBufferAlignment

The minimum alignment for packet fragments. This member must be a power of 2.

DUMMYUNIONNAME.DUMMYSTRUCTNAME2.DmaCapabilities

A pointer to a driver-allocated and initialized NET_DMA_CAPABILITIES structure that describes the adapter's DMA capabilities on the receive path. This member is ignored by NetAdapterCx if MappingRequirement is not set to NetMemoryMappingRequirementDmaMapped.

Remarks

Call one of the NET_ADAPTER_RX_CAPABILITIES_INIT_XXX methods to initialize this structure. For more info about each initialization method, see the links in the See Also section. An initialized NET_ADAPTER_RX_CAPABILITIES structure is passed as a parameter to NetAdapterSetDatapathCapabilities.

Typically, a client driver either performs both allocation and attachmment itself or specifies that the operating system perform both. In most cases, we recommend that the operating system allocates and attaches receive buffers.

If the client does specify driver-allocated and attached receive buffers, it must supply both a custom return context structure in the RxBufferReturnContext member of each NET_FRAGMENT during buffer allocation, as well as an EVT_NET_ADAPTER_RETURN_RX_BUFFER callback function in this NET_ADAPTER_RX_CAPABILITIES structure for the operating system to invoke once it has finished with the buffer.

Requirements

   
Minimum KMDF version 1.25
Header netadapter.h (include netadaptercx.h)

See Also

NET_ADAPTER_RX_CAPABILITIES_INIT_DRIVER_MANAGED

NET_ADAPTER_RX_CAPABILITIES_INIT_SYSTEM_MANAGED

NET_ADAPTER_RX_CAPABILITIES_INIT_SYSTEM_MANAGED_DMA

NetAdapterSetDatapathCapabilities