Derecho  0.9
Distributed systems toolkit for RDMA
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
sst Namespace Reference

Namespaces

 util
 

Classes

class  _resources
 Represents the set of RDMA resources needed to maintain a two-way connection to a single remote node. More...
 
class  _SSTField
 Internal helper class, never exposed to the client. More...
 
struct  cm_con_data_t
 Structure to exchange the data needed to connect the Queue Pairs. More...
 
struct  global_resources
 Structure containing global system resources. More...
 
class  lf_ctxt
 Global States. More...
 
struct  lf_sender_ctxt
 
class  multicast_group
 
class  multicast_sst
 
class  P2PConnections
 
struct  P2PParams
 
class  Predicates
 
class  resources
 A public-facing version of the internal _resources class that extends it with more convenient functions. More...
 
class  resources_two_sided
 A public-facing version of the internal _resources class that extends it with functions that support two-sided sends and receives. More...
 
class  SST
 
class  SSTField
 Clients should use instances of this class with the appropriate template parameter to declare fields in their SST; for example, SSTField<int> is the type of an integer-valued SST field. More...
 
class  SSTFieldVector
 Clients should use instances of this class to declare vector-like fields in their SST; the template parameter is the type of the vector's elements, just like with std::vector. More...
 
struct  SSTParams
 Constructor parameter pack for SST. More...
 
struct  verbs_sender_ctxt
 

Typedefs

typedef std::function< void(uint32_t)> failure_upcall_t
 

Enumerations

enum  REQUEST_TYPE { P2P_REPLY = 0, P2P_REQUEST, RPC_REPLY }
 
enum  PredicateType { PredicateType::ONE_TIME, PredicateType::RECURRENT, PredicateType::TRANSITION }
 Enumeration defining the kinds of predicates an SST can handle. More...
 
enum  NextOnFailure { REPORT_ON_FAILURE = 0, CRASH_ON_FAILURE = 1 }
 

Functions

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

Variables

struct sst::verbs_sender_ctxt __attribute__
 
const int alignTo = sizeof(long)
 
std::thread polling_thread
 
tcp::tcp_connectionssst_connections
 
lf_ctxt g_ctxt
 
const char * dev_name = NULL
 IB device name. More...
 
int ib_port = 1
 Local IB port to work with. More...
 
int gid_idx = 0
 GID index to use. More...
 
struct global_resourcesg_res
 The single instance of global_resources for the SST system. More...
 

Class Documentation

◆ sst::cm_con_data_t

struct sst::cm_con_data_t

Structure to exchange the data needed to connect the Queue Pairs.

passive endpoint info to be exchanged.

Definition at line 17 of file verbs.hpp.

Class Members
uint64_t addr Buffer address.
uint8_t gid[16] GID.
uint16_t lid LID of the InfiniBand port.
uint64_t mr_key
char pep_addr[MAX_LF_ADDR_SIZE]
uint32_t pep_addr_len
uint32_t qp_num Queue Pair number.
uint32_t rkey Remote key.
uint64_t vaddr

◆ 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.

◆ sst::lf_sender_ctxt

struct sst::lf_sender_ctxt

Definition at line 22 of file lf.hpp.

Class Members
uint32_t ce_idx
uint32_t remote_id

◆ sst::P2PParams

struct sst::P2PParams

Definition at line 18 of file p2p_connections.hpp.

Collaboration diagram for sst::P2PParams:
Class Members
uint64_t max_p2p_reply_size
uint64_t max_p2p_request_size
uint64_t max_rpc_reply_size
vector< uint32_t > members
uint32_t my_node_id
uint32_t p2p_window_size
uint32_t rpc_window_size

◆ sst::verbs_sender_ctxt

struct sst::verbs_sender_ctxt

Definition at line 30 of file verbs.hpp.

Class Members
uint32_t ce_idx
uint32_t remote_id

Typedef Documentation

◆ failure_upcall_t

typedef std::function<void(uint32_t)> sst::failure_upcall_t

Definition at line 121 of file sst.hpp.

Enumeration Type Documentation

◆ NextOnFailure

Enumerator
REPORT_ON_FAILURE 
CRASH_ON_FAILURE 

Definition at line 114 of file lf.cpp.

◆ PredicateType

enum sst::PredicateType
strong

Enumeration defining the kinds of predicates an SST can handle.

Enumerator
ONE_TIME 

One-time predicates only fire once; they are deleted once they become true.

RECURRENT 

Recurrent predicates persist as long as the SST instance and fire their triggers every time they are true.

TRANSITION 

Transition predicates persist as long as the SST instance, but only fire their triggers when they transition from false to true.

Definition at line 16 of file predicates.hpp.

◆ REQUEST_TYPE

Enumerator
P2P_REPLY 
P2P_REQUEST 
RPC_REPLY 

Definition at line 28 of file p2p_connections.hpp.

Function Documentation

◆ __attribute__()

struct sst::cm_con_data_t sst::__attribute__ ( (packed)  )

◆ add_node() [1/2]

bool sst::add_node ( uint32_t  new_id,
const std::string  new_ip_addr 
)

Definition at line 628 of file verbs.cpp.

◆ add_node() [2/2]

bool sst::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.

Definition at line 557 of file lf.cpp.

◆ lf_destroy()

void sst::lf_destroy ( )

Destroys the global libfabric resources.

Definition at line 750 of file lf.cpp.

◆ lf_initialize()

void sst::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.

Must be called before creating or using any SST instance.

Parameters
ip_addrs_and_portsA map from rank to (IP address, port) pairs
node_rankrank of this node.

Definition at line 708 of file lf.cpp.

◆ lf_poll_completion()

std::pair< uint32_t, std::pair< int32_t, int32_t > > sst::lf_poll_completion ( )

Polls for completion of a single posted remote write.

This blocks until a single entry in the completion queue has completed It is exclusively used by the polling thread the thread can sleep while in this function, when it calls util::polling_data.wait_for_requests

Returns
pair(remote_id,result) The queue pair number associated with the completed request and the result (1 for successful, -1 for unsuccessful)

Definition at line 610 of file lf.cpp.

◆ padded_len()

constexpr size_t sst::padded_len ( const size_t &  len)

Definition at line 34 of file sst.hpp.

◆ polling_loop()

void sst::polling_loop ( )

Definition at line 570 of file lf.cpp.

◆ remove_node()

bool sst::remove_node ( uint32_t  node_id)

Removes a node from the SST TCP connections set.

Definition at line 561 of file lf.cpp.

◆ resources_create()

void sst::resources_create ( )

Creates global RDMA resources.

Definition at line 556 of file verbs.cpp.

◆ resources_init()

void sst::resources_init ( )

Allocates memory for global RDMA resources.

Definition at line 549 of file verbs.cpp.

◆ shutdown_polling_thread()

void sst::shutdown_polling_thread ( )

Shutdown the polling thread.

Definition at line 743 of file lf.cpp.

◆ sync()

bool sst::sync ( uint32_t  r_index)

Blocks the current thread until both this node and a remote node reach this function, which exchanges some trivial data over a TCP connection.

Parameters
r_id- ID of the node to exchange data with.
r_indexThe node rank of the node to exchange data with.

Definition at line 565 of file lf.cpp.

◆ verbs_destroy()

void sst::verbs_destroy ( )

Destroys the global verbs resources.

This cleans up all the global resources used by the SST system, so it should only be called once all SST instances have been destroyed.

Definition at line 664 of file verbs.cpp.

◆ verbs_initialize() [1/2]

void sst::verbs_initialize ( const std::map< uint32_t, std::string > &  ip_addrs,
uint32_t  node_rank 
)

Initializes the global verbs resources.

◆ verbs_initialize() [2/2]

void sst::verbs_initialize ( const std::map< uint32_t, std::pair< ip_addr_t, uint16_t >> &  ip_addrs_and_ports,
uint32_t  node_rank 
)

This must be called before creating or using any SST instance.

Definition at line 644 of file verbs.cpp.

◆ verbs_poll_completion()

std::pair< uint32_t, std::pair< int, int > > sst::verbs_poll_completion ( )

Polls for completion of a single posted remote write.

This blocks until a single entry in the completion queue has completed It is exclusively used by the polling thread the thread can sleep while in this function, when it calls util::polling_data.wait_for_requests

Returns
pair(qp_num,result) The queue pair number associated with the completed request and the result (1 for successful, -1 for unsuccessful)

Definition at line 515 of file verbs.cpp.

Variable Documentation

◆ __attribute__

class sst::lf_ctxt sst::__attribute__

◆ alignTo

const int sst::alignTo = sizeof(long)

Definition at line 32 of file sst.hpp.

◆ dev_name

const char* sst::dev_name = NULL

IB device name.

Definition at line 53 of file verbs.cpp.

◆ g_ctxt

lf_ctxt sst::g_ctxt

Definition at line 102 of file lf.cpp.

◆ g_res

struct global_resources* sst::g_res

The single instance of global_resources for the SST system.

Definition at line 77 of file verbs.cpp.

◆ gid_idx

int sst::gid_idx = 0

GID index to use.

Definition at line 57 of file verbs.cpp.

◆ ib_port

int sst::ib_port = 1

Local IB port to work with.

Definition at line 55 of file verbs.cpp.

◆ polling_thread

std::thread sst::polling_thread

Definition at line 99 of file lf.cpp.

◆ sst_connections

tcp::tcp_connections * sst::sst_connections

Definition at line 100 of file lf.cpp.