NDK_FN_CREATE_QP_WITH_SRQ callback function (ndkpi.h)
The NdkCreateQpWithSrq (NDK_FN_CREATE_QP_WITH_SRQ) function create an NDK queue pair (QP) object with an NDK shared receive queue (SRQ) object.
Syntax
NDK_FN_CREATE_QP_WITH_SRQ NdkFnCreateQpWithSrq;
NTSTATUS NdkFnCreateQpWithSrq(
[in] NDK_PD *pNdkPd,
[in] NDK_CQ *pReceiveCq,
[in] NDK_CQ *pInitiatorCq,
[in] NDK_SRQ *pSrq,
[in, optional] PVOID QPContext,
[in] ULONG InitiatorQueueDepth,
[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] pSrq
A pointer to an NDK shared receive queue (SRQ) object (NDK_SRQ) to post receive requests.
[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] 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] 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 NdkCreateQpWithSrq function returns one of the following NTSTATUS codes.
Return code | Description |
---|---|
|
The QP object was created successfully and returned with the *ppNdkQp parameter. |
|
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. |
|
The request failed because the requested InitiatorQueueDepth, MaxInitiatorRequestSge or InlineDataSize is not within the limits that are specified in the NDK_ADAPTER_INFO structure. |
|
The request failed due to insufficient resources.
Important The request can fail inline as well as asynchronously with this status code.
|
|
An error occurred. |
Remarks
The NdkCreateQpWithSrq function creates an NDK queue pair (QP) object with a shared receive queue (SRQ). 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 NdkCreateQpWithSrq 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 |