NDK_FN_CREATE_SRQ callback function (ndkpi.h)

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

Syntax

NDK_FN_CREATE_SRQ NdkFnCreateSrq;

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

Parameters

[in] pNdkPd

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

[in] 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.

[in] 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.

[in] NotifyThreshold

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

[in, optional] 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.

[in, optional] SrqNotificationContext

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

[in, optional] 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.

[in] CreateCompletion

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

[in, optional] 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

Requirement Value
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