NDK_FN_CREATE_SRQ routine

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

Syntax


NDK_FN_CREATE_SRQ NdkCreateSrq;

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

Parameters

pNdkPd [in]

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

SrqDepth [in]

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

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

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

SrqNotification [in, optional]

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

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

Affinity [in, optional]

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

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

RequestContext [in, optional]

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 codeDescription
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

Minimum supported server

Windows Server 2012

Version

Supported in NDIS 6.30 and later.

Header

Ndkpi.h (include Ndkpi.h)

IRQL

<=DISPATCH_LEVEL

See also

GROUP_AFFINITY
NDK_ADAPTER_INFO
NDK_FN_CREATE_COMPLETION
NDK_FN_SRQ_NOTIFICATION_CALLBACK
NDK_PD
NDK_SRQ
NDKPI Object Lifetime Requirements

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft