dat_lmr_create - register a memory region with an IA
cc [ flag... ] file... -ldat [ library... ] #include <dat/udat.h> DAT_RETURN dat_lmr_create ( IN DAT_IA_HANDLE ia_handle, IN DAT_MEM_TYPE mem_type, IN DAT_REGION_DESCRIPTION region_description, IN DAT_VLEN length, IN DAT_PZ_HANDLE pz_handle, IN DAT_MEM_PRIV_FLAGS mem_privileges, OUT DAT_LMR_HANDLE *lmr_handle, OUT DAT_LMR_CONTEXT *lmr_context, OUT DAT_RMR_CONTEXT *rmr_context, OUT DAT_VLEN *registered_size, OUT DAT_VADDR *registered_address )
ia_handle
mem_type
DAT_MEM_TYPE_VIRTUAL
Region description: A pointer to a contiguous user virtual range.
Length: Length of the Memory Region.
DAT_MEM_TYPE_LMR
Region description: An LMR_handle.
Length: Length parameter is ignored.
DAT_MEM_TYPE_SHARED_VIRTUAL
Region description: A structure with 2 elements, where the first one is of type DAT_LMR_COOKIE and is a unique identifier of the shared memory region, and the second one is a pointer to a contiguous user virtual range.
Length: Length of the Memory Region
region_description
length
pz_handle
mem_privileges:
Local Read
0x01
Local Write
0x10
Remote Read
0x02
Remote Write
0x20
lmr_handle
lmr_context
registered_size
registered_address
The dat_lmr_create() function registers a memory region with an IA. The specified buffer must have been previously allocated and pinned by the uDAPL Consumer on the platform. The Provider must do memory pinning if needed, which includes whatever OS-dependent steps are required to ensure that the memory is available on demand for the Interface Adapter. uDAPL does not require that the memory never be swapped out; just that neither the hardware nor the Consumer ever has to deal with it not being there. The created lmr_context can be used for local buffers of DTOs and for binding RMRs, and lmr_handle can be used for creating other LMRs. For uDAPL the scope of the lmr_context is the address space of the DAT Consumer.
The return values of registered_size and registered_address indicate to the Consumer how much the contiguous region of Consumer virtual memory was registered by the Provider and where the region starts in the Consumer virtual address.
The mem_type parameter indicates to the Provider the kind of memory to be registered, and can take on any of the values defined in the table in the PARAMETERS section.
The pz_handle parameter allows Consumers to restrict local accesses to the registered LMR by DTOs.
DAT_LMR_COOKIE is a pointer to a unique identifier of the shared memory region of the DAT_MEM_TYPE_SHARED_VIRTUAL DAT memory type. The identifier is an array of 40 bytes allocated by the Consumer. The Provider must check the entire 40 bytes and shall not interpret it as a null-terminated string.
The return value of rmr_context can be transferred by the local Consumer to a Consumer on a remote host to be used for an RDMA DTO.
If mem_privileges does not specify remote Read and Write privileges, rmr_context is not generated and NULL is returned. No remote privileges are given for Memory Region unless explicitly asked for by the Consumer.
DAT_SUCCESS
DAT_UNSUFFICIENT_RESOURCES
DAT_INVALID_PARAMETER
DAT_INVALID_HANDLE
DAT_INVALID_STATE
DAT_MODEL_NOT_SUPPORTED
Consumers can create an LMR over the existing LMR memory with different Protection Zones and privileges using previously created IA translation table entries.
The Consumer should use rmr_context with caution. Once advertised to a remote peer, the rmr_context of the LMR cannot be invalidated. The only way to invalidate it is to destroy the LMR with dat_lmr_free(3DAT).
See attributes(5) for descriptions of the following attributes:
|
dat_lmr_free(3DAT), libdat(3LIB), attributes(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |