Logo
  • TE: User Guide
  • Test Suite
    • Network topology model
    • Test API
      • Configuring the test bed
      • DPDK
      • Devices and services
      • Network environment and topology
      • Running programs on an agent
      • Sockets and I/O
      • Test API to interact with RDMA links
        • struct tapi_rdma_link_stat
        • struct tapi_rdma_link_stats
      • Traffic generation and capture
      • Writing a test scenario
      • Remote calls on an agent
    • Test scenarios from the sources
    • Test scenarios in markdown
  • Test Engine
  • Test Agents
  • Common tools API
  • Contributing to TE
  • Terminology
  • Global Namespace
Test Environment
  • Test Suite
  • Test API
  • Test API to interact with RDMA links
  • View page source

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.

Previous Next

© Copyright 2019, OKTET Labs.

Built with Sphinx using a theme provided by Read the Docs.