11 #include <rdma/fabric.h> 17 #define LF_VERSION FI_VERSION(1, 5) 39 void connect_endpoint(
bool is_lf_server);
45 int init_endpoint(
struct fi_info* fi);
58 int post_remote_send(
struct lf_sender_ctxt* ctxt,
const long long int offset,
const long long int size,
59 const int op,
const bool completion);
105 _resources(
int r_id,
char* write_addr,
char* read_addr,
int size_w,
106 int size_r,
int is_lf_server);
118 resources(
int r_id,
char* write_addr,
char* read_addr,
int size_w,
119 int size_r,
int is_lf_server) :
_resources(r_id, write_addr, read_addr, size_w, size_r, is_lf_server) {
128 void post_remote_read(
const long long int size);
130 void post_remote_read(
const long long int offset,
const long long int size);
132 void post_remote_write(
const long long int size);
134 void post_remote_write(
const long long int offset,
long long int size);
135 void post_remote_write_with_completion(
struct lf_sender_ctxt* ctxt,
const long long int size);
137 void post_remote_write_with_completion(
struct lf_sender_ctxt* ctxt,
const long long int offset,
const long long int size);
145 int post_receive(
struct lf_sender_ctxt* ctxt,
const long long int offset,
const long long int size);
150 int size_r,
int is_lf_server) :
_resources(r_id, write_addr, read_addr, size_w, size_r, is_lf_server) {
153 void post_two_sided_send(
const long long int size);
155 void post_two_sided_send(
const long long int offset,
long long int size);
156 void post_two_sided_send_with_completion(
struct lf_sender_ctxt* ctxt,
const long long int size);
158 void post_two_sided_send_with_completion(
struct lf_sender_ctxt* ctxt,
const long long int offset,
const long long int size);
159 void post_two_sided_receive(
struct lf_sender_ctxt* ctxt,
const long long int size);
160 void post_two_sided_receive(
struct lf_sender_ctxt* ctxt,
const long long int offset,
const long long int size);
166 bool add_node(uint32_t new_id,
const std::pair<ip_addr_t, uint16_t>& new_ip_addr_and_port);
176 bool sync(uint32_t r_id);
184 void lf_initialize(
const std::map<uint32_t, std::pair<ip_addr_t, uint16_t>>& ip_addrs_and_ports,
struct fid_mr * read_mr
memory region for remote writer
struct fid_mr * write_mr
memory region for remote writer
uint64_t mr_lrkey
key for local read buffer
bool add_node(uint32_t new_id, const std::pair< ip_addr_t, uint16_t > &new_ip_addr_and_port)
Adds a new node to the SST TPC connections set.
uint64_t mr_rwkey
key for remote write buffer
void shutdown_polling_thread()
Shutdown the polling thread.
A public-facing version of the internal _resources class that extends it with more convenient functio...
std::pair< uint32_t, std::pair< int32_t, int32_t > > lf_poll_completion()
Polls for completion of a single posted remote write.
bool remove_node(uint32_t node_id)
Removes a node from the SST TCP connections set.
char * write_buf
Pointer to the memory buffer used for local writes.
void lf_initialize(const std::map< uint32_t, std::pair< ip_addr_t, uint16_t >> &ip_addrs_and_ports, uint32_t node_rank)
Initializes the global libfabric resources.
bool sync(uint32_t r_id)
Blocks the current thread until both this node and a remote node reach this function, which exchanges some trivial data over a TCP connection.
uint64_t mr_lwkey
key for local write buffer
struct fid_ep * ep
tx/rx completion queue
struct fid_eq * eq
the event queue
void lf_destroy()
Destroys the global libfabric resources.
resources_two_sided(int r_id, char *write_addr, char *read_addr, int size_w, int size_r, int is_lf_server)
constructor: simply forwards to _resources::_resources
A public-facing version of the internal _resources class that extends it with functions that support ...
resources(int r_id, char *write_addr, char *read_addr, int size_w, int size_r, int is_lf_server)
Constructor: simply forwards to _resources::_resources.
Represents the set of RDMA resources needed to maintain a two-way connection to a single remote node...
fi_addr_t remote_fi_addr
remote write memory address
char * read_buf
Pointer to the memory buffer used for the results of RDMA remote reads.
int remote_id
ID of the remote node.