Motr  M0
Collaboration diagram for Node helper:

Data Structures

struct  m0_net_test_nh
 

Enumerations

enum  m0_net_test_nh_msg_status { MS_SUCCESS, MS_FAILED, MS_BAD }
 
enum  m0_net_test_nh_msg_type { MT_MSG, MT_BULK, MT_TRANSFER }
 
enum  m0_net_test_nh_msg_direction { MD_SEND, MD_RECV, MD_BOTH }
 

Functions

void m0_net_test_nh_init (struct m0_net_test_nh *nh, const struct m0_net_test_cmd_init *icmd)
 
bool m0_net_test_nh__invariant (struct m0_net_test_nh *nh)
 
void m0_net_test_nh_fini (struct m0_net_test_nh *nh)
 
void m0_net_test_nh_sd_copy_locked (struct m0_net_test_nh *nh)
 
void m0_net_test_nh_sd_get_locked (struct m0_net_test_nh *nh, struct m0_net_test_cmd_status_data *sd)
 
void m0_net_test_nh_sd_update (struct m0_net_test_nh *nh, enum m0_net_test_nh_msg_type type, enum m0_net_test_nh_msg_status status, enum m0_net_test_nh_msg_direction direction)
 
void m0_net_test_nh_sd_update_rtt (struct m0_net_test_nh *nh, m0_time_t rtt)
 
bool m0_net_test_nh_transfer_next (struct m0_net_test_nh *nh)
 
void m0_net_test_nh_cmd_status (struct m0_net_test_nh *nh, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
 

Detailed Description

Naming in enum is without M0_xxx_xxx prefix because this file should be included in .c files only, and long prefixes will destroy usability of m0_net_test_nh_sd_update() function.

Enumeration Type Documentation

◆ m0_net_test_nh_msg_direction

Single test message transfer direction

Enumerator
MD_SEND 

message was sent

MD_RECV 

message was received

MD_BOTH 

test message transfer in both directions

Definition at line 55 of file node_helper.h.

◆ m0_net_test_nh_msg_status

Test message status

Enumerator
MS_SUCCESS 

message was successfully sent&received

MS_FAILED 

message transfer failed

MS_BAD 

received message contains invalid data

Definition at line 42 of file node_helper.h.

◆ m0_net_test_nh_msg_type

Enumerator
MT_MSG 

message with buffer descriptors

MT_BULK 

bulk test message

MT_TRANSFER 

Definition at line 48 of file node_helper.h.

Function Documentation

◆ m0_net_test_nh__invariant()

bool m0_net_test_nh__invariant ( struct m0_net_test_nh nh)

Invariant for m0_net_test_nh

Definition at line 51 of file node_helper.c.

Here is the caller graph for this function:

◆ m0_net_test_nh_cmd_status()

void m0_net_test_nh_cmd_status ( struct m0_net_test_nh nh,
const struct m0_net_test_cmd cmd,
struct m0_net_test_cmd reply 
)

M0_NET_TEST_CMD_STATUS handler

Definition at line 146 of file node_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_test_nh_fini()

void m0_net_test_nh_fini ( struct m0_net_test_nh nh)

Finalize node helper structure

Definition at line 56 of file node_helper.c.

Here is the call graph for this function:

◆ m0_net_test_nh_init()

void m0_net_test_nh_init ( struct m0_net_test_nh nh,
const struct m0_net_test_cmd_init icmd 
)

Initialize node helper structure. Take some information from icmd

Todo:
reset all stats

Definition at line 34 of file node_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_test_nh_sd_copy_locked()

void m0_net_test_nh_sd_copy_locked ( struct m0_net_test_nh nh)

nh->ntnh_sd_copy = nh->ntnh_sd while holding nh->ntnh_sd_copy_lock.

See also
m0_net_test_nh.ntnh_sd

Definition at line 63 of file node_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_test_nh_sd_get_locked()

void m0_net_test_nh_sd_get_locked ( struct m0_net_test_nh nh,
struct m0_net_test_cmd_status_data sd 
)

*sd = nh->ntnh_sd_copy while holding nh->ntnh_sd_copy_lock. Also set sd->ntcsd_time_now to the current time.

See also
m0_net_test_nh.ntnh_sd

Definition at line 72 of file node_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_test_nh_sd_update()

void m0_net_test_nh_sd_update ( struct m0_net_test_nh nh,
enum m0_net_test_nh_msg_type  type,
enum m0_net_test_nh_msg_status  status,
enum m0_net_test_nh_msg_direction  direction 
)

Update statistics for message numbers.

Definition at line 83 of file node_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_test_nh_sd_update_rtt()

void m0_net_test_nh_sd_update_rtt ( struct m0_net_test_nh nh,
m0_time_t  rtt 
)

Update round-trip statistics

Definition at line 129 of file node_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_net_test_nh_transfer_next()

bool m0_net_test_nh_transfer_next ( struct m0_net_test_nh nh)

Increase number of started transfers.

Returns
false if transfers limit reached
true otherwise

Definition at line 136 of file node_helper.c.

Here is the call graph for this function:
Here is the caller graph for this function: