Test API to interact with RDMA links
Overview
Generic API to interact with RDMA links. More…
// typedefs typedef struct tapi_rdma_link_stat tapi_rdma_link_stat_t; typedef struct tapi_rdma_link_stats tapi_rdma_link_stats_t; // structs struct tapi_rdma_link_stat; struct tapi_rdma_link_stats; // global functions te_errno tapi_rdma_link_get_stats(rcf_rpc_server* rpcs, const char* link, tapi_rdma_link_stats_t** stats); te_errno tapi_rdma_link_diff_stats(const tapi_rdma_link_stats_t* old_stats, const tapi_rdma_link_stats_t* new_stats, tapi_rdma_link_stats_t** diff_stats); void tapi_rdma_link_log_stats(tapi_rdma_link_stats_t* stats, const char* description, const char* pattern, bool non_empty, te_log_level log_level); void tapi_rdma_link_free_stats(tapi_rdma_link_stats_t* stats);
Detailed Documentation
Generic API to interact with RDMA links.
Global Functions
te_errno tapi_rdma_link_get_stats(rcf_rpc_server* rpcs, const char* link, tapi_rdma_link_stats_t** stats)
Collect statistics reported by an RDMA link.
Parameters:
rpcs |
RPC server. |
link |
Name of the RDMA link. |
stats |
Where to store the statistics array. |
Returns:
Status code.
te_errno tapi_rdma_link_diff_stats(const tapi_rdma_link_stats_t* old_stats, const tapi_rdma_link_stats_t* new_stats, tapi_rdma_link_stats_t** diff_stats)
Compare two sets of statistics.
Parameters:
old_stats |
Old statistics array. |
new_stats |
New statistics array. |
diff_stats |
Where to store the statistics diff array. |
Returns:
Status code.
void tapi_rdma_link_log_stats(tapi_rdma_link_stats_t* stats, const char* description, const char* pattern, bool non_empty, te_log_level log_level)
Log statistics whose name contains a given substring. Use the log level provided by the caller.
Parameters:
stats |
Statistics array. |
description |
Description line to be logged before the stats. |
pattern |
Substring that must be in the name. |
non_empty |
Only log if there is something to log. |
log_level |
Log level to use. |
void tapi_rdma_link_free_stats(tapi_rdma_link_stats_t* stats)
Free the memory occupied by an array of RDMA link statistics.
Parameters:
stats |
Statistics array. |