NDK_FN_CREATE_SRQ callback function

The NdkCreateSrq (NDK_FN_CREATE_SRQ) function creates an NDK shared receive queue (SRQ) object.

Syntax

NDK_FN_CREATE_SRQ NdkFnCreateSrq;

NTSTATUS NdkFnCreateSrq(
  NDK_PD *pNdkPd,
  ULONG SrqDepth,
  ULONG MaxReceiveRequestSge,
  ULONG NotifyThreshold,
  NDK_FN_SRQ_NOTIFICATION_CALLBACK SrqNotification,
  PVOID SrqNotificationContext,
  GROUP_AFFINITY *Affinity,
  NDK_FN_CREATE_COMPLETION CreateCompletion,
  PVOID RequestContext,
  NDK_SRQ **ppNdkSrq
)
{...}

Parameters

*pNdkPd

A pointer to an NDK protection domain (PD) object (NDK_PD).

SrqDepth

The maximum number of receive requests that can be outstanding over the SRQ. This value must be less than or equal to the value in the MaxSrqDepth member that is specified in the NDK_ADAPTER_INFO structure.

MaxReceiveRequestSge

The maximum number of SGEs that are supported in a single receive request. This value must be less than or equal to the value in the MaxReceiveRequestSge member that is specified in the NDK_ADAPTER_INFO structure.

NotifyThreshold

The minimum number of queued receive requests for triggering SRQ notification callbacks.

SrqNotification

An optional NdkSrqNotificationCallback function(NDK_FN_SRQ_NOTIFICATION_CALLBACK) which the provider calls if the queued receive request count falls below the threshold that is specified in the NotifyThreshold parameter.

SrqNotificationContext

A context value that the NDK provider passes back to the NdkSrqNotificationCallback function that is specified in the SrqNotification parameter.

*Affinity

An affinity mask (GROUP_AFFINITY) that specifies preferred processors that the consumer would choose to run the NdkSrqNotificationCallback callbacks. Providers should honor the processor preferences if their underlying hardware allows it, but consumers cannot assume that NdkSrqNotificationCallback callbacks will occur only on the preferred processors. Set Affinity to NULL if there are no preferred processors.

CreateCompletion

A pointer to an NdkCreateCompletion (NDK_FN_CREATE_COMPLETION) function that completes the creation of an NDK object.

RequestContext

A context value that the NDK provider passes back to the NdkCreateCompletion function that is specified in the CreateCompletion parameter.

**ppNdkSrq

A pointer to a created SRQ object (NDK_SRQ) is returned in this location if the request succeeds without returning STATUS_PENDING. If the request returns STATUS_PENDING then this parameter is ignored and the created object is returned with the callback that is specified in the CreateCompletion parameter.

Return Value

The NdkCreateSrq function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The SRQ object was created successfully and returned with the *ppNdkSrq parameter.
STATUS_PENDING
The operation is pending and will be completed later. The provider will call the function specified in the CreateCompletion parameter (NDK_FN_CREATE_COMPLETION) to complete the pending operation.
STATUS_INVALID_PARAMETER
The request failed because the requested SrqDepth or MaxReceiveRequestSge is not within the limits that are specified in the NDK_ADAPTER_INFO structure.
STATUS_INSUFFICIENT_RESOURCES
The request failed due to insufficient resources.
Important  The request can fail inline as well as asynchronously with this status code.
 
Other status codes
An error occurred.

Remarks

The NdkCreateSrq function creates an NDK shared receive queue (SRQ) object. If the function returns STATUS_SUCCESS, the created object is returned in the ppNdkSrq parameter. If NdkCreateSrq returns STATUS_PENDING, the created object is returned by the NdkCreateCompletion (NDK_FN_CREATE_COMPLETION) function that is specified in the CreateCompletion parameter.

Requirements

   
Minimum supported client None supported,Supported in NDIS 6.30 and later.
Minimum supported server Windows Server 2012
Target Platform Windows
Header ndkpi.h (include Ndkpi.h)
IRQL "<=DISPATCH_LEVEL"

See Also

GROUP_AFFINITY

NDKPI Object Lifetime Requirements

NDK_ADAPTER_INFO

NDK_FN_CREATE_COMPLETION

NDK_FN_SRQ_NOTIFICATION_CALLBACK

NDK_PD

NDK_SRQ