Class RdmaEndpoint¶
Defined in File rdma_endpoint.h
Class Documentation¶
-
class
switchml::RdmaEndpoint¶ The RdmaEndpoint class contains all functions and configurations to setup the machine and the device/NIC.
It is mainly used by the RdmaConnection class.
Public Functions
-
RdmaEndpoint(std::string device_name, uint16_t device_port_id, uint16_t gid_index)¶ Initialize members and configure and open the ibverbs device port.
- Parameters
device_name – The name of the Infiniband device to use.
device_port_id – The specific port to use from the device.
gid_index – The GID index to use.
-
~RdmaEndpoint()¶
-
RdmaEndpoint(RdmaEndpoint const&) = delete¶
-
void
operator=(RdmaEndpoint const&) = delete¶
-
RdmaEndpoint(RdmaEndpoint&&) = default¶
-
RdmaEndpoint &
operator=(RdmaEndpoint&&) = default¶
-
ibv_mr *
AllocateAtAddress(void *requested_address, uint64_t size)¶ Allocates and registers a memory region at a specific address.
The call will fail if the allocation is not possible.
- Parameters
requested_address – The memory address wanted.
size – The size of the region in bytes.
- Returns
ibv_mr* A pointer to the allocated memory region struct.
-
void
free(ibv_mr *mr)¶ Free a memory region that was allocated and registered.
- Parameters
mr – The memory region to free.
-
ibv_cq *
CreateCompletionQueue()¶ Create a Completion Queue.
- Returns
ibv_cq* The created completion queue.
-
ibv_qp *
CreateQueuePair(ibv_cq *completion_queue)¶ Create a Queue Pair.
- Parameters
completion_queue – The completion queue to associate with this queue pair.
- Returns
ibv_qp* The created queue pair.
-
uint64_t
GetMac()¶ Get the MAC address corresponding to the chosen GID.
- Returns
uint64_t The MAC address.
-
uint32_t
GetIPv4()¶ Get the IPv4 address corresponding to the chosen GID.
- Returns
uint32_t The IPv4 address
-
ibv_port_attr
GetPortAttributes()¶
-
ibv_device *
GetDevice()¶
-