NDK_FN_CREATE_QP callback function (ndkpi.h)

The NdkCreateQp (NDK_FN_CREATE_QP) function creates an NDK queue pair (QP) object.

Syntax

NDK_FN_CREATE_QP NdkFnCreateQp;

NTSTATUS NdkFnCreateQp(
  [in]           NDK_PD *pNdkPd,
  [in]           NDK_CQ *pReceiveCq,
  [in]           NDK_CQ *pInitiatorCq,
  [in, optional] PVOID QPContext,
  [in]           ULONG ReceiveQueueDepth,
  [in]           ULONG InitiatorQueueDepth,
  [in]           ULONG MaxReceiveRequestSge,
  [in]           ULONG MaxInitiatorRequestSge,
  [in]           ULONG InlineDataSize,
  [in]           NDK_FN_CREATE_COMPLETION CreateCompletion,
  [in, optional] PVOID RequestContext,
                 NDK_QP **ppNdkQp
)
{...}

Parameters

[in] pNdkPd

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

[in] pReceiveCq

A pointer to a completion queue (CQ) to use for receive request completions (NDK_CQ).

[in] pInitiatorCq

A pointer to a CQ to use for initiator request completions.

[in, optional] QPContext

A context value to be returned in the QPContext member of the NDK_RESULT structure for all requests that are posted over this QP.

[in] ReceiveQueueDepth

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

[in] InitiatorQueueDepth

The maximum number of initiator requests that can be outstanding over the QP. This value must be less than or equal to the value in the MaxInitiatorQueueDepth member of the NDK_ADAPTER_INFO structure.

[in] MaxReceiveRequestSge

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

[in] MaxInitiatorRequestSge

The maximum number of SGEs that can be supported in a single initiator request. This value must be less than or equal to the value in the MaxInitiatorRequestSge member of the NDK_ADAPTER_INFO structure.

[in] InlineDataSize

The maximum amount of inline data in bytes that can be sent in a single send or write request. This value must be less than or equal to the value in the MaxInlineDataSize member of the NDK_ADAPTER_INFO structure.

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

ppNdkQp

A pointer to a created QP object (NDK_QP) 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 NdkCreateQp function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The QP object was created successfully and returned with the *ppNdkQp 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 ReceiveQueueDepth, InitiatorQueueDepth, MaxReceiveRequestSge, MaxInitiatorRequestSge, or InlineDataSize are 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 NdkCreateQp function creates an NDK queue pair (QP) object. A QP consists of a receive queue and an initiator queue. The receive queue is used to post receive requests. An initiator queue is used for initiating send, bind, fast-register, read, write, and invalidate requests.

If the function returns STATUS_SUCCESS, the created object is returned in the ppNdkQp parameter. If NdkCreateQp 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

NDKPI Object Lifetime Requirements

NDK_ADAPTER_INFO

NDK_CQ

NDK_FN_CREATE_COMPLETION

NDK_PD

NDK_QP

NDK_RESULT