Motr  M0
m0_net_test_nh Struct Reference

#include <node_helper.h>

Collaboration diagram for m0_net_test_nh:
Collaboration graph

Data Fields

enum m0_net_test_role ntnh_role
 
enum m0_net_test_type ntnh_type
 
struct m0_net_test_cmd_status_data ntnh_sd
 
struct m0_net_test_cmd_status_data ntnh_sd_copy
 
struct m0_mutex ntnh_sd_copy_lock
 
bool ntnh_test_initialized
 
uint64_t ntnh_transfers_max_nr
 
uint64_t ntnh_transfers_started_nr
 

Detailed Description

Node helper

Definition at line 62 of file node_helper.h.

Field Documentation

◆ ntnh_role

enum m0_net_test_role ntnh_role

Node role

Definition at line 64 of file node_helper.h.

◆ ntnh_sd

Node stats. Usage pattern: use ntnh_sd as primary status data structure. All statistics should go directly to this structure in thread-safe manner (from one thread or using external lock). In some inner loop m0_net_test_nh_sd_copy_lock() should be called periodically to copy ntnh_sd to ntnh_sd_copy with ntnh_sd_copy_lock locked. When status data is requested (in other thread etc.) m0_net_test_nh_sd_get_lock() should be called. It will copy ntnh_sd_copy to provided structure while holding ntnh_sd_copy_lock. This pattern will eliminate locking when updating statistics in critical testing paths at cost of delayed live stats.

Todo:
XXX check grammar

Definition at line 82 of file node_helper.h.

◆ ntnh_sd_copy

struct m0_net_test_cmd_status_data ntnh_sd_copy

Copy of stats

Definition at line 84 of file node_helper.h.

◆ ntnh_sd_copy_lock

struct m0_mutex ntnh_sd_copy_lock

Lock for the copy of stats ntnh_sd_copy

Definition at line 86 of file node_helper.h.

◆ ntnh_test_initialized

bool ntnh_test_initialized

Test was initialized. Set to true in m0_net_test_nh_init()

Definition at line 88 of file node_helper.h.

◆ ntnh_transfers_max_nr

uint64_t ntnh_transfers_max_nr

Maximum number of message transfers (in both direction). Value UINT64_MAX means no limit.

Definition at line 93 of file node_helper.h.

◆ ntnh_transfers_started_nr

uint64_t ntnh_transfers_started_nr

Number of started transfers (including failed)

Definition at line 95 of file node_helper.h.

◆ ntnh_type

enum m0_net_test_type ntnh_type

Test type

Definition at line 66 of file node_helper.h.


The documentation for this struct was generated from the following file: