NDK_FN_CREATE_QP routine

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

Syntax


NDK_FN_CREATE_QP NdkCreateQp;

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

Parameters

pNdkPd [in]

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

pReceiveCq [in]

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

pInitiatorCq [in]

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

QPContext [in, optional]

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

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

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

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

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

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

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

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

NDK_ADAPTER_INFO
NDK_CQ
NDK_PD
NDK_QP
NDK_RESULT
NDK_FN_CREATE_COMPLETION
NDKPI Object Lifetime Requirements

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft