NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
storage Namespace Reference

Namespaces

 control
 

Data Structures

class  make_aligned
 
struct  binary_content
 
struct  compressed_block_header
 
struct  compressed_block_trailer
 
class  runtime_error
 
struct  rdma_conn_pair
 
struct  value_requirement
 
struct  value_multiplicity
 
class  io_message_view
 
class  ip_address
 
class  tcp_socket
 

Enumerations

enum class  io_message_type : uint32_t { result = 0 , read , write }
 

Functions

bool file_has_binary_content_header (std::string const &file_name)
 
storage::binary_content load_binary_content_from_file (std::string const &file_name)
 
void write_binary_content_to_file (std::string const &file_name, storage::binary_content const &sbc)
 
std::string bytes_to_hex_str (char const *bytes, size_t byte_count)
 
void bytes_to_hex_str (char const *bytes, size_t byte_count, std::string &str)
 
size_t aligned_size (size_t alignment, size_t size)
 
char * to_buffer (char *buffer, uint8_t value)
 
char * to_buffer (char *buffer, uint16_t value)
 
char * to_buffer (char *buffer, uint32_t value) noexcept
 
char * to_buffer (char *buffer, uint64_t value) noexcept
 
char * to_buffer (char *buffer, std::string const &value) noexcept
 
char * to_buffer (char *buffer, std::vector< uint8_t > const &value) noexcept
 
template<typename T >
char const * from_buffer (char const *buffer, T &value)
 
template<>
char const * from_buffer (char const *buffer, uint8_t &value)
 
template<>
char const * from_buffer (char const *buffer, uint16_t &value)
 
template<>
char const * from_buffer (char const *buffer, uint32_t &value)
 
template<>
char const * from_buffer (char const *buffer, uint64_t &value)
 
template<>
char const * from_buffer (char const *buffer, std::string &value)
 
template<>
char const * from_buffer (char const *buffer, std::vector< uint8_t > &value)
 
doca_dev * open_device (std::string const &identifier)
 
doca_dev_rep * open_representor (doca_dev *dev, std::string const &identifier)
 
doca_mmap * make_mmap (doca_dev *dev, char *memory_region, size_t memory_region_size, uint32_t permissions)
 
doca_mmap * make_mmap (doca_dev *dev, void const *mmap_export_blob, size_t mmap_export_blob_size)
 
doca_buf_inventory * make_buf_inventory (size_t num_elements)
 
doca_comch_consumer * make_comch_consumer (doca_comch_connection *conn, doca_mmap *mmap, doca_pe *pe, uint32_t task_pool_size, doca_data callback_user_data, doca_comch_consumer_task_post_recv_completion_cb_t task_cb, doca_comch_consumer_task_post_recv_completion_cb_t error_cb)
 
doca_comch_producer * make_comch_producer (doca_comch_connection *conn, doca_pe *pe, uint32_t task_pool_size, doca_data callback_user_data, doca_comch_producer_task_send_completion_cb_t task_cb, doca_comch_producer_task_send_completion_cb_t error_cb)
 
doca_rdma * make_rdma_context (doca_dev *dev, doca_pe *pe, doca_data ctx_user_data, uint32_t permissions)
 
bool is_ctx_running (doca_ctx *ctx) noexcept
 
doca_error_t stop_context (doca_ctx *ctx, doca_pe *pe) noexcept
 
doca_error_t stop_context (doca_ctx *ctx, doca_pe *pe, std::vector< doca_task * > &ctx_tasks) noexcept
 
void register_cli_argument (doca_argp_type type, char const *short_name, char const *long_name, char const *description, value_requirement requirement, value_multiplicity multiplicity, doca_argp_param_cb_t callback)
 
void create_doca_logger_backend (void) noexcept
 
doca_ec_matrix_type matrix_type_from_string (std::string const &matrix_type)
 
char * get_buffer_bytes (doca_buf *buf) noexcept
 
char const * get_buffer_bytes (doca_buf const *buf) noexcept
 
std::vector< uint8_t > load_file_bytes (std::string const &file_name)
 
static std::string to_string (storage::io_message_type e)
 
std::string io_message_to_string (char const *buf)
 
ip_address parse_ip_v4_address (char const *value)
 
void set_thread_affinity (std::thread &thread, uint32_t cpu_core_idx)
 
std::string strerror_r (int err) noexcept
 
uint32_t get_system_page_size (void)
 
void install_ctrl_c_handler (std::function< void(void)> callback)
 
void uninstall_ctrl_c_handler ()
 
void * aligned_alloc (size_t alignment, size_t size)
 
void aligned_free (void *memory)
 

Variables

constexpr uint32_t cache_line_size = 64
 
constexpr uint32_t max_concurrent_control_messages = 8
 
static constexpr value_requirement required_value {true}
 
static constexpr value_requirement optional_value {false}
 
static constexpr value_multiplicity single_value {false}
 
static constexpr value_multiplicity multiple_values {true}
 
constexpr size_t size_of_io_message = 64
 

Enumeration Type Documentation

◆ io_message_type

enum storage::io_message_type : uint32_t
strong
Enumerator
result 
read 
write 

Definition at line 44 of file io_message.hpp.

Function Documentation

◆ aligned_alloc()

void * storage::aligned_alloc ( size_t  alignment,
size_t  size 
)

Definition at line 126 of file os_utils.cpp.

◆ aligned_free()

void storage::aligned_free ( void *  memory)

Definition at line 131 of file os_utils.cpp.

◆ aligned_size()

size_t storage::aligned_size ( size_t  alignment,
size_t  size 
)

Definition at line 51 of file buffer_utils.cpp.

◆ bytes_to_hex_str() [1/2]

std::string storage::bytes_to_hex_str ( char const *  bytes,
size_t  byte_count 
)

Definition at line 30 of file buffer_utils.cpp.

◆ bytes_to_hex_str() [2/2]

void storage::bytes_to_hex_str ( char const *  bytes,
size_t  byte_count,
std::string &  str 
)

Definition at line 38 of file buffer_utils.cpp.

◆ create_doca_logger_backend()

void storage::create_doca_logger_backend ( void  )
noexcept

Definition at line 471 of file doca_utils.cpp.

◆ file_has_binary_content_header()

bool storage::file_has_binary_content_header ( std::string const &  file_name)

Definition at line 74 of file binary_content.cpp.

◆ from_buffer() [1/7]

template<>
char const* storage::from_buffer ( char const *  buffer,
std::string &  value 
)
inline

Definition at line 202 of file buffer_utils.hpp.

◆ from_buffer() [2/7]

template<>
char const* storage::from_buffer ( char const *  buffer,
std::vector< uint8_t > &  value 
)
inline

Definition at line 217 of file buffer_utils.hpp.

◆ from_buffer() [3/7]

template<typename T >
char const* storage::from_buffer ( char const *  buffer,
T &  value 
)
inline

◆ from_buffer() [4/7]

template<>
char const* storage::from_buffer ( char const *  buffer,
uint16_t &  value 
)
inline

Definition at line 160 of file buffer_utils.hpp.

◆ from_buffer() [5/7]

template<>
char const* storage::from_buffer ( char const *  buffer,
uint32_t &  value 
)
inline

Definition at line 174 of file buffer_utils.hpp.

◆ from_buffer() [6/7]

template<>
char const* storage::from_buffer ( char const *  buffer,
uint64_t &  value 
)
inline

Definition at line 188 of file buffer_utils.hpp.

◆ from_buffer() [7/7]

template<>
char const* storage::from_buffer ( char const *  buffer,
uint8_t &  value 
)
inline

Definition at line 147 of file buffer_utils.hpp.

◆ get_buffer_bytes() [1/2]

char* storage::get_buffer_bytes ( doca_buf *  buf)
inlinenoexcept

Definition at line 260 of file doca_utils.hpp.

◆ get_buffer_bytes() [2/2]

char const* storage::get_buffer_bytes ( doca_buf const *  buf)
inlinenoexcept

Definition at line 273 of file doca_utils.hpp.

◆ get_system_page_size()

uint32_t storage::get_system_page_size ( void  )

Definition at line 95 of file os_utils.cpp.

◆ install_ctrl_c_handler()

void storage::install_ctrl_c_handler ( std::function< void(void)>  callback)

Definition at line 106 of file os_utils.cpp.

◆ io_message_to_string()

std::string storage::io_message_to_string ( char const *  buf)

Definition at line 50 of file io_message.cpp.

◆ is_ctx_running()

bool storage::is_ctx_running ( doca_ctx *  ctx)
noexcept

Definition at line 362 of file doca_utils.cpp.

◆ load_binary_content_from_file()

storage::binary_content storage::load_binary_content_from_file ( std::string const &  file_name)

Definition at line 94 of file binary_content.cpp.

◆ load_file_bytes()

std::vector< uint8_t > storage::load_file_bytes ( std::string const &  file_name)

Definition at line 58 of file file_utils.cpp.

◆ make_buf_inventory()

doca_buf_inventory * storage::make_buf_inventory ( size_t  num_elements)

Definition at line 205 of file doca_utils.cpp.

◆ make_comch_consumer()

doca_comch_consumer * storage::make_comch_consumer ( doca_comch_connection *  conn,
doca_mmap *  mmap,
doca_pe *  pe,
uint32_t  task_pool_size,
doca_data  callback_user_data,
doca_comch_consumer_task_post_recv_completion_cb_t  task_cb,
doca_comch_consumer_task_post_recv_completion_cb_t  error_cb 
)

Definition at line 224 of file doca_utils.cpp.

◆ make_comch_producer()

doca_comch_producer * storage::make_comch_producer ( doca_comch_connection *  conn,
doca_pe *  pe,
uint32_t  task_pool_size,
doca_data  callback_user_data,
doca_comch_producer_task_send_completion_cb_t  task_cb,
doca_comch_producer_task_send_completion_cb_t  error_cb 
)

Definition at line 279 of file doca_utils.cpp.

◆ make_mmap() [1/2]

doca_mmap * storage::make_mmap ( doca_dev *  dev,
char *  memory_region,
size_t  memory_region_size,
uint32_t  permissions 
)

Definition at line 146 of file doca_utils.cpp.

◆ make_mmap() [2/2]

doca_mmap * storage::make_mmap ( doca_dev *  dev,
void const *  mmap_export_blob,
size_t  mmap_export_blob_size 
)

Definition at line 188 of file doca_utils.cpp.

◆ make_rdma_context()

doca_rdma * storage::make_rdma_context ( doca_dev *  dev,
doca_pe *  pe,
doca_data  ctx_user_data,
uint32_t  permissions 
)

Definition at line 331 of file doca_utils.cpp.

◆ matrix_type_from_string()

doca_ec_matrix_type storage::matrix_type_from_string ( std::string const &  matrix_type)

Definition at line 503 of file doca_utils.cpp.

◆ open_device()

doca_dev * storage::open_device ( std::string const &  identifier)

Definition at line 43 of file doca_utils.cpp.

◆ open_representor()

doca_dev_rep * storage::open_representor ( doca_dev *  dev,
std::string const &  identifier 
)

Definition at line 104 of file doca_utils.cpp.

◆ parse_ip_v4_address()

ip_address storage::parse_ip_v4_address ( char const *  value)

Definition at line 50 of file ip_address.cpp.

◆ register_cli_argument()

void storage::register_cli_argument ( doca_argp_type  type,
char const *  short_name,
char const *  long_name,
char const *  description,
value_requirement  requirement,
value_multiplicity  multiplicity,
doca_argp_param_cb_t  callback 
)

Definition at line 413 of file doca_utils.cpp.

◆ set_thread_affinity()

void storage::set_thread_affinity ( std::thread &  thread,
uint32_t  cpu_core_idx 
)

Definition at line 53 of file os_utils.cpp.

◆ stop_context() [1/2]

doca_error_t storage::stop_context ( doca_ctx *  ctx,
doca_pe *  pe 
)
noexcept

Definition at line 369 of file doca_utils.cpp.

◆ stop_context() [2/2]

doca_error_t storage::stop_context ( doca_ctx *  ctx,
doca_pe *  pe,
std::vector< doca_task * > &  ctx_tasks 
)
noexcept

Definition at line 375 of file doca_utils.cpp.

◆ strerror_r()

std::string storage::strerror_r ( int  err)
noexcept

Definition at line 89 of file os_utils.cpp.

◆ to_buffer() [1/6]

char* storage::to_buffer ( char *  buffer,
std::string const &  value 
)
inlinenoexcept

Definition at line 106 of file buffer_utils.hpp.

◆ to_buffer() [2/6]

char* storage::to_buffer ( char *  buffer,
std::vector< uint8_t > const &  value 
)
inlinenoexcept

Definition at line 121 of file buffer_utils.hpp.

◆ to_buffer() [3/6]

char* storage::to_buffer ( char *  buffer,
uint16_t  value 
)
inline

Definition at line 58 of file buffer_utils.hpp.

◆ to_buffer() [4/6]

char* storage::to_buffer ( char *  buffer,
uint32_t  value 
)
inlinenoexcept

Definition at line 74 of file buffer_utils.hpp.

◆ to_buffer() [5/6]

char* storage::to_buffer ( char *  buffer,
uint64_t  value 
)
inlinenoexcept

Definition at line 90 of file buffer_utils.hpp.

◆ to_buffer() [6/6]

char* storage::to_buffer ( char *  buffer,
uint8_t  value 
)
inline

Definition at line 45 of file buffer_utils.hpp.

◆ to_string()

static std::string storage::to_string ( storage::io_message_type  e)
static

Definition at line 36 of file io_message.cpp.

◆ uninstall_ctrl_c_handler()

void storage::uninstall_ctrl_c_handler ( )

Definition at line 121 of file os_utils.cpp.

◆ write_binary_content_to_file()

void storage::write_binary_content_to_file ( std::string const &  file_name,
storage::binary_content const &  sbc 
)

Definition at line 141 of file binary_content.cpp.

Variable Documentation

◆ cache_line_size

constexpr uint32_t storage::cache_line_size = 64
constexpr

Definition at line 40 of file definitions.hpp.

◆ max_concurrent_control_messages

constexpr uint32_t storage::max_concurrent_control_messages = 8
constexpr

Definition at line 45 of file definitions.hpp.

◆ multiple_values

constexpr value_multiplicity storage::multiple_values {true}
staticconstexpr

Definition at line 231 of file doca_utils.hpp.

◆ optional_value

constexpr value_requirement storage::optional_value {false}
staticconstexpr

Definition at line 228 of file doca_utils.hpp.

◆ required_value

constexpr value_requirement storage::required_value {true}
staticconstexpr

Definition at line 227 of file doca_utils.hpp.

◆ single_value

constexpr value_multiplicity storage::single_value {false}
staticconstexpr

Definition at line 230 of file doca_utils.hpp.

◆ size_of_io_message

constexpr size_t storage::size_of_io_message = 64
constexpr

Definition at line 53 of file io_message.hpp.