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

Classes

class  barrier_group
 
class  connection_broken
 
class  exception
 
class  group_busy
 
class  invalid_args
 
class  nonroot_sender
 
struct  receive_destination
 

Typedefs

typedef std::function< receive_destination(size_t size)> incoming_message_callback_t
 
typedef std::function< void(char *buffer, size_t size)> completion_callback_t
 
typedef std::function< void(std::optional< uint32_t > suspected_victim)> failure_callback_t
 

Enumerations

enum  send_algorithm { BINOMIAL_SEND = 1, CHAIN_SEND = 2, SEQUENTIAL_SEND = 3, TREE_SEND = 4 }
 

Functions

bool initialize (const std::map< uint32_t, std::pair< ip_addr_t, uint16_t >> &addresses, uint32_t node_rank) __attribute__((warn_unused_result))
 
void add_address (uint32_t index, const std::pair< ip_addr_t, uint16_t > &address)
 
void shutdown ()
 
bool create_group (uint16_t group_number, std::vector< uint32_t > members, size_t block_size, send_algorithm algorithm, incoming_message_callback_t incoming_receive, completion_callback_t send_callback, failure_callback_t failure_callback) __attribute__((warn_unused_result))
 Creates a new RDMC group. More...
 
void destroy_group (uint16_t group_number)
 
bool send (uint16_t group_number, std::shared_ptr< rdma::memory_region > mr, size_t offset, size_t length) __attribute__((warn_unused_result))
 
bool send (uint16_t group_number, shared_ptr< memory_region > mr, size_t offset, size_t length)
 

Variables

map< uint16_t, shared_ptr< group > > groups
 
mutex groups_lock
 
uint32_t node_rank
 
atomic< bool > shutdown_flag
 

Class Documentation

◆ rdmc::receive_destination

struct rdmc::receive_destination

Definition at line 35 of file rdmc.hpp.

Class Members
shared_ptr< memory_region > mr
size_t offset

Typedef Documentation

◆ completion_callback_t

typedef std::function<void(char* buffer, size_t size)> rdmc::completion_callback_t

Definition at line 42 of file rdmc.hpp.

◆ failure_callback_t

typedef std::function<void(std::optional<uint32_t> suspected_victim)> rdmc::failure_callback_t

Definition at line 44 of file rdmc.hpp.

◆ incoming_message_callback_t

typedef std::function<receive_destination(size_t size)> rdmc::incoming_message_callback_t

Definition at line 41 of file rdmc.hpp.

Enumeration Type Documentation

◆ send_algorithm

Enumerator
BINOMIAL_SEND 
CHAIN_SEND 
SEQUENTIAL_SEND 
TREE_SEND 

Definition at line 28 of file rdmc.hpp.

Function Documentation

◆ add_address()

void rdmc::add_address ( uint32_t  index,
const std::pair< ip_addr_t, uint16_t > &  address 
)

Definition at line 52 of file rdmc.cpp.

◆ create_group()

bool rdmc::create_group ( uint16_t  group_number,
std::vector< uint32_t >  members,
size_t  block_size,
send_algorithm  algorithm,
incoming_message_callback_t  incoming_receive,
completion_callback_t  send_callback,
failure_callback_t  failure_callback 
)

Creates a new RDMC group.

Parameters
group_numberThe group's unique identifier.
membersA vector of node IDs representing the members of this group. The order of this vector will be used as the rank order of the members.
block_sizeThe size, in bytes, of blocks to use when sending in this group.
algorithmWhich RDMC send algorithm to use in this group.
incoming_receiveThe function to call when there is a new incoming message in this group; it must provide a destination to receive the message into.
send_callbackThe function to call when RDMC completes receiving a message in this group
failure_callbackThe function to call when RDMC detects a failure in this group. It will be called with the suspected failed node's ID.
Returns
True if group creation succeeds, false if it fails.

Definition at line 60 of file rdmc.cpp.

◆ destroy_group()

void rdmc::destroy_group ( uint16_t  group_number)

Definition at line 91 of file rdmc.cpp.

◆ initialize()

bool rdmc::initialize ( const std::map< uint32_t, std::pair< ip_addr_t, uint16_t >> &  addresses,
uint32_t  node_rank 
)

Definition at line 37 of file rdmc.cpp.

◆ send() [1/2]

bool rdmc::send ( uint16_t  group_number,
std::shared_ptr< rdma::memory_region mr,
size_t  offset,
size_t  length 
)

◆ send() [2/2]

bool rdmc::send ( uint16_t  group_number,
shared_ptr< memory_region mr,
size_t  offset,
size_t  length 
)

Definition at line 99 of file rdmc.cpp.

◆ shutdown()

void rdmc::shutdown ( )

Definition at line 98 of file rdmc.cpp.

Variable Documentation

◆ groups

map< uint16_t, shared_ptr< group > > rdmc::groups

Definition at line 34 of file rdmc.cpp.

◆ groups_lock

mutex rdmc::groups_lock

Definition at line 35 of file rdmc.cpp.

◆ node_rank

uint32_t rdmc::node_rank

Definition at line 30 of file rdmc.cpp.

◆ shutdown_flag

atomic<bool> rdmc::shutdown_flag

Definition at line 31 of file rdmc.cpp.