NDK_FN_BIND callback function (ndkpi.h)
The NdkBind (NDK_FN_BIND) function binds a memory window to a specific sub-region of a memory region (MR).
Syntax
NDK_FN_BIND NdkFnBind;
NTSTATUS NdkFnBind(
[in] NDK_QP *pNdkQp,
[in, optional] PVOID RequestContext,
[in] NDK_MR *pMr,
[in] NDK_MW *pMw,
[in] PVOID VirtualAddress,
[in] SIZE_T Length,
[in] ULONG Flags
)
{...}
Parameters
[in] pNdkQp
A pointer to an NDK queue pair (QP) object (NDK_QP).
[in, optional] RequestContext
A context value to return in the RequestContext member of the NDK_RESULT structure for this request.
[in] pMr
A pointer to an NDK memory region (MR) object (NDK_MR).
[in] pMw
A pointer to an NDK memory window (MW) object (NDK_MW).
[in] VirtualAddress
A virtual address that must be greater than or equal to the virtual address of the MDL for the MR and less than the virtual address of the MDL for the MR plus the value in the Length parameter.
Use the MmGetMdlVirtualAddress macro to obtain the virtual address of the MDL for the MR.
[in] Length
The length of the MR to bind to the MW.
[in] Flags
A bitwise OR of flags which specifies the operations that are allowed. The following flags are supported:
Value | Meaning |
---|---|
|
Indicates the successful completion of this request does not generate a completion event in the outbound completion queue. However, requests that fail do generate a completion in the completion queue. |
|
Indicates that all prior read requests must be complete before the hardware begins processing this request. |
|
Enable read access to the memory window for any connected peer. To access the memory window, the connected peers must have a valid token. |
|
Enable write access to the memory window for any connected peer. To access the memory window, the connected peers must have a valid token. |
|
Indicates to the NDK provider that it may defer indicating the request to hardware for processing. For more information about this flag, see NDKPI Deferred Processing Scheme.
Note This flag is supported only in NDKPI 1.2 (Windows Server 2012 R2) and later. |
Return value
The NdkBind function returns one of the following NTSTATUS codes.
Return code | Description |
---|---|
|
The request was posted successfully. A completion entry will be queued to the CQ when the work request is completed. |
|
The queue pair (QP) is not connected. |
|
The memory region does not allow the type of access requested for the memory window. The NDK_OP_FLAG_ALLOW_WRITE flag requires a memory region that was registered with the NDK_MR_FLAG_ALLOW_LOCAL_WRITE flag. |
|
An error occurred. |
Remarks
NdkBind binds a memory window (MW) to a specific sub-region of a memory region (MR).
The address in the VirtualAddress parameter must be an address within the virtually contiguous region that is described by the MDL chain that was specified during memory registration. The address must be treated by the provider as an index into the memory region. The address must not be used by the provider as a valid virtual address for reading or writing buffer contents.
After this call returns, the remote token will be available with the NdkGetRemotetokenFromMw function (NDK_FN_GET_REMOTE_TOKEN_FROM_MW).
This function does not support a zero-based virtual address.
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 Deferred Processing Scheme
NDKPI Work Request Posting Requirements