WdfDmaEnablerSetMaximumScatterGatherElements function (wdfdmaenabler.h)
[Applies to KMDF only]
The WdfDmaEnablerSetMaximumScatterGatherElements method sets the maximum number of scatter/gather elements that a device supports, for a specified DMA enabler object.
Syntax
void WdfDmaEnablerSetMaximumScatterGatherElements(
[in] WDFDMAENABLER DmaEnabler,
[in] size_t MaximumFragments
);
Parameters
[in] DmaEnabler
A handle to a DMA enabler object that the driver obtained from a previous call to WdfDmaEnablerCreate.
[in] MaximumFragments
The maximum number of scatter/gather elements that the driver and device can support.
Return value
None
Remarks
A bug check occurs if the driver supplies an invalid object handle.
If your driver calls WdfDmaEnablerSetMaximumScatterGatherElements, it must do so within the EvtDriverDeviceAdd or EvtDevicePrepareHardware callback function.
If your driver does not call WdfDmaEnablerSetMaximumScatterGatherElements, the framework uses a default value of WDF_DMA_ENABLER_UNLIMITED_FRAGMENTS, which means that there is no limit to the number of scatter/gather elements.
For more information about this method, see Enabling DMA Transactions.
Examples
The following code example sets the maximum number of scatter/gather elements for a specified DMA enabler object.
WdfDmaEnablerSetMaximumScatterGatherElements(
DmaEnabler,
NIC_MAX_PHYS_BUF_COUNT
);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Header | wdfdmaenabler.h (include Wdf.h) |
Library | Wdf01000.sys (see Framework Library Versioning.) |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf) |