NDK_FN_CREATE_QP callback function

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

Syntax

NDK_FN_CREATE_QP NdkFnCreateQp;

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

Parameters

*pNdkPd

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

*pReceiveCq

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

*pInitiatorCq

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

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.

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.

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.

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.

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.

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.

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.

**ppNdkQp

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

   
Windows version None supported,Supported in NDIS 6.30 and later. 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