Motr  M0
node_ping_ctx Struct Reference
Collaboration diagram for node_ping_ctx:
Collaboration graph

Data Fields

struct m0_net_test_nh npc_nh
 
struct m0_net_test_network_ctx npc_net
 
struct m0_net_test_servicenpc_svc
 
size_t npc_buf_nr
 
m0_bcount_t npc_buf_size
 
m0_time_t npc_buf_send_timeout
 
bool npc_test_initialized
 
struct m0_semaphore npc_buf_q_sem
 
struct m0_net_test_ringbuf npc_buf_rb
 
struct m0_semaphore npc_buf_rb_sem
 
bool npc_buf_rb_done
 
struct buf_statenpc_buf_state
 
struct m0_thread npc_thread
 
union {
   struct node_ping_client_ctx   npc__client
 
   struct node_ping_server_ctx   npc__server
 
}; 
 
struct node_ping_client_ctxnpc_client
 
struct node_ping_server_ctxnpc_server
 

Detailed Description

Ping node context

Definition at line 159 of file node_ping.c.

Field Documentation

◆ @414

union { ... }

◆ npc__client

struct node_ping_client_ctx npc__client

Definition at line 202 of file node_ping.c.

◆ npc__server

struct node_ping_server_ctx npc__server

Definition at line 203 of file node_ping.c.

◆ npc_buf_nr

size_t npc_buf_nr

Number of network buffers to send/receive test messages.

See also
m0_net_test_cmd_init.ntci_concurrency

Definition at line 170 of file node_ping.c.

◆ npc_buf_q_sem

struct m0_semaphore npc_buf_q_sem

Buffer enqueue semaphore.

  • initial value - number of buffers;
  • up() in network buffer callback;
  • (down() * number_of_buffers) in node_ping_cmd_stop();
  • down() after successful addition to network buffer queue;
  • trydown() before addition to queue. if failed - then don't add to queue;
  • up() after unsuccessful addition to queue.
Note
Problem with semaphore max value can be here.
See also
Problem Description

Definition at line 190 of file node_ping.c.

◆ npc_buf_rb

struct m0_net_test_ringbuf npc_buf_rb

Ringbuf of buffers that are not in network buffers queue

Definition at line 192 of file node_ping.c.

◆ npc_buf_rb_done

bool npc_buf_rb_done

Previous up() was from node_ping_cmd_stop()

Definition at line 196 of file node_ping.c.

◆ npc_buf_rb_sem

struct m0_semaphore npc_buf_rb_sem

up() after adding buffer to queue, down() before receiving

Definition at line 194 of file node_ping.c.

◆ npc_buf_send_timeout

m0_time_t npc_buf_send_timeout

Timeout for test message sending

Definition at line 174 of file node_ping.c.

◆ npc_buf_size

m0_bcount_t npc_buf_size

Size of network buffers.

Definition at line 172 of file node_ping.c.

◆ npc_buf_state

struct buf_state* npc_buf_state

Array of buffer states

Definition at line 198 of file node_ping.c.

◆ npc_client

struct node_ping_client_ctx* npc_client

Client context. Set to NULL on the test server, set to &node_ping_ctx.npc__client on the test client.

Definition at line 209 of file node_ping.c.

◆ npc_net

struct m0_net_test_network_ctx npc_net

Network context for testing

Definition at line 163 of file node_ping.c.

◆ npc_nh

struct m0_net_test_nh npc_nh

Node helper

Definition at line 161 of file node_ping.c.

◆ npc_server

struct node_ping_server_ctx* npc_server

Server context. See npc_client.

Definition at line 213 of file node_ping.c.

◆ npc_svc

struct m0_net_test_service* npc_svc

Test service. Used when changing service state.

Definition at line 165 of file node_ping.c.

◆ npc_test_initialized

bool npc_test_initialized

Test was initialized (successful node_ping_cmd_start())

Definition at line 176 of file node_ping.c.

◆ npc_thread

struct m0_thread npc_thread

Worker thread

Definition at line 200 of file node_ping.c.


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