WDF_DMA_ENABLER_CONFIG_FLAGS enumeration

[Applies to KMDF only]

The WDF_DMA_ENABLER_CONFIG_FLAGS enumeration type defines flags that are used in a driver's WDF_DMA_ENABLER_CONFIG structure.

Syntax


typedef enum _WDF_DMA_ENABLER_CONFIG_FLAGS { 
  WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION  = 1,
  WDF_DMA_ENABLER_CONFIG_REQUIRE_SINGLE_TRANSFER  = 2
} WDF_DMA_ENABLER_CONFIG_FLAGS;

Constants

WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION

The WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION flag applies only to the following DMA profiles:

  • WdfDmaProfileScatterGather
  • WdfDmaProfileScatterGather64
  • WdfDmaProfileScatterGatherDuplex
  • WdfDmaProfileScatterGather64Duplex

By default, when WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION is not set and the WDF_DMA_PROFILE is one of those in the previous list, WDF creates a lookaside list of scatter/gather lists that is used by this DMA adapter's transaction objects. The list entries are initialized to allow the maximum specified transfer length. When the transaction is executed, WDF calls the BuildScatterGatherList entry function. Forward progress drivers must not set this flag and must use one of the four profiles shown previously.

When WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION is set and the WDF_DMA_PROFILE is one of those in the previous list, WDF does not create a lookaside list. When the transaction is executed, WDF calls GetScatterGatherList.

Setting WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION can result in reduced memory usage, particularly when the maximum transfer length is large. However, setting this flag may cause failure to perform DMA operations in low memory conditions. To guarantee forward progress when WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION is set, a driver might use a separate DMA enabler, or bounce transfers through a common buffer.

WDF_DMA_ENABLER_CONFIG_REQUIRE_SINGLE_TRANSFER

The WDF_DMA_ENABLER_CONFIG_REQUIRE_SINGLE_TRANSFER flag is available starting in version 1.19 of KMDF. This flag also requires DMA version 3. To select DMA version 3, set the WdmDmaVersionOverride member of WDF_DMA_ENABLER_CONFIG to 3.

This flag applies to all DMA profiles. When it is set, WDF does not fragment any WDFDMATRANSACTION created with this enabler into multiple DMA transfers. If this is not possible, attempts to initialize or execute the transaction fail. This option is intended for devices that need to receive all data in a single DMA operation.

Drivers also have the option of specifying this on a per-transaction level with WdfDmaTransactionSetSingleTransferRequirement.

For more info, see Using Single Transfer DMA.

Remarks

You can specify a valid bitwise OR of the values on this page for the Flags member of the WDF_DMA_ENABLER_CONFIG structure.

Requirements

Minimum KMDF version

1.11

Header

Wdfdmaenabler.h (include Wdf.h)

See also

WDF_DMA_PROFILE
WDF_DMA_ENABLER_CONFIG
WdfDmaTransactionSetSingleTransferRequirement

 

 

Send comments about this topic to Microsoft

Show: