RDMA
libevpl supports one-sided READ/WRITE RDMA operations, wherein the initiator reads from or writes to memory in a remote machine without software involvement on the remote system.
Backends
libevpl provides two backends for RDMA operations:
- Native RDMA (
EVPL_STREAM_RDMACM_RC) - Hardware-accelerated RDMA via RDMACM - TCP-RDMA (
EVPL_DATAGRAM_TCP_RDMA) - RDMA emulation over TCP for development and testing without RDMA hardware
Functions
evpl_rdma_read
void evpl_rdma_read(
struct evpl *evpl,
struct evpl_bind *bind,
uint32_t remote_key,
uint64_t remote_address,
struct evpl_iovec *iov,
int niov,
void (*callback)(int status, void *private_data),
void *private_data);
Read data from remote memory into local buffers.
Parameters:
evpl- Event loopbind- RDMA connectionremote_key- Memory key for remote bufferremote_address- Address of remote bufferiov- Local buffers to read intoniov- Number of local bufferscallback- Completion callbackprivate_data- User context
evpl_rdma_write
void evpl_rdma_write(
struct evpl *evpl,
struct evpl_bind *bind,
uint32_t remote_key,
uint64_t remote_address,
struct evpl_iovec *iov,
int niov,
unsigned int flags,
void (*callback)(int status, void *private_data),
void *private_data);
Write data from local buffers to remote memory.
Parameters:
evpl- Event loopbind- RDMA connectionremote_key- Memory key for remote bufferremote_address- Address of remote bufferiov- Local buffers containing data to writeniov- Number of local buffersflags- RDMA flags (see below)callback- Completion callbackprivate_data- User context
Flags:
EVPL_RDMA_FLAG_TAKE_REF- Transfer iovec ownership to libevpl
evpl_bind_is_rdma
int evpl_bind_is_rdma(struct evpl_bind *bind);
Check if a bind supports RDMA operations.
Parameters:
bind- Connection to check
Returns: Non-zero if RDMA operations are supported, 0 otherwise
See Also
- Binds & Connections API - RDMA connection setup
- Memory API - Buffer management
- Protocols - Available protocols including TCP-RDMA