Derecho  0.9
Distributed systems toolkit for RDMA
Classes | Namespaces | Macros | Functions | Variables
verbs.cpp File Reference

Contains the implementation of the IB Verbs adapter layer of SST. More...

#include <arpa/inet.h>
#include <byteswap.h>
#include <cstring>
#include <endian.h>
#include <errno.h>
#include <getopt.h>
#include <infiniband/verbs.h>
#include <inttypes.h>
#include <iostream>
#include <netdb.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <thread>
#include <unistd.h>
#include "derecho/connection_manager.h"
#include "derecho/derecho_ports.h"
#include "poll_utils.h"
#include "tcp/tcp.h"
#include "verbs.h"
Include dependency graph for verbs.cpp:

Go to the source code of this file.

Classes

struct  sst::global_resources
 Structure containing global system resources. More...
 

Namespaces

 sst
 

Macros

#define MSG   "SEND operation "
 
#define RDMAMSGR   "RDMA read operation "
 
#define RDMAMSGW   "RDMA write operation"
 
#define MSG_SIZE   (strlen(MSG) + 1)
 

Functions

void sst::polling_loop ()
 
std::pair< uint32_t, std::pair< int, int > > sst::verbs_poll_completion ()
 Polls for completion of a single posted remote write. More...
 
void sst::resources_init ()
 Allocates memory for global RDMA resources. More...
 
void sst::resources_create ()
 Creates global RDMA resources. More...
 
bool sst::add_node (uint32_t new_id, const std::string new_ip_addr)
 
bool sst::remove_node (uint32_t node_id)
 Removes a node from the SST TCP connections set. More...
 
bool sst::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. More...
 
void sst::verbs_initialize (const std::map< uint32_t, std::pair< ip_addr_t, uint16_t >> &ip_addrs_and_ports, uint32_t node_rank)
 
void sst::shutdown_polling_thread ()
 Shutdown the polling thread. More...
 
void sst::verbs_destroy ()
 Destroys the global verbs resources. More...
 

Variables

const char * sst::dev_name = NULL
 IB device name. More...
 
int sst::ib_port = 1
 Local IB port to work with. More...
 
int sst::gid_idx = 0
 GID index to use. More...
 
struct global_resources * sst::g_res
 The single instance of global_resources for the SST system. More...
 

Detailed Description

Contains the implementation of the IB Verbs adapter layer of SST.

Definition in file verbs.cpp.


Class Documentation

◆ sst::global_resources

struct sst::global_resources

Structure containing global system resources.

Definition at line 64 of file verbs.cpp.

Class Members
struct ibv_cq * cq Completion Queue handle.
struct ibv_device_attr device_attr RDMA device attributes.
struct ibv_context * ib_ctx Device handle.
struct ibv_pd * pd PD handle.
struct ibv_port_attr port_attr IB port attributes.

Macro Definition Documentation

◆ MSG

#define MSG   "SEND operation "

Definition at line 36 of file verbs.cpp.

◆ MSG_SIZE

#define MSG_SIZE   (strlen(MSG) + 1)

Definition at line 39 of file verbs.cpp.

◆ RDMAMSGR

#define RDMAMSGR   "RDMA read operation "

Definition at line 37 of file verbs.cpp.

◆ RDMAMSGW

#define RDMAMSGW   "RDMA write operation"

Definition at line 38 of file verbs.cpp.