Motr  M0
Collaboration diagram for Ping Node:

Data Structures

struct  buf_state
 
struct  node_ping_client_ctx
 
struct  node_ping_server_ctx
 
struct  node_ping_ctx
 

Enumerations

enum  { TO_CHECK_INTERVAL = 10 }
 

Functions

 M0_TL_DESCR_DEFINE (buf_state, "buf_state", static, struct buf_state, bs_link, bs_link_magic, M0_NET_TEST_BS_LINK_MAGIC, M0_NET_TEST_BS_HEAD_MAGIC)
 
 M0_TL_DEFINE (buf_state, static, struct buf_state)
 
static void sd_update (struct node_ping_ctx *ctx, enum m0_net_test_nh_msg_type type, enum m0_net_test_nh_msg_status status, enum m0_net_test_nh_msg_direction direction)
 
static void node_ping_tm_event_cb (const struct m0_net_tm_event *ev)
 
static struct node_ping_ctxnode_ping_ctx_from_net_ctx (struct m0_net_test_network_ctx *net_ctx)
 
static m0_time_t node_ping_timestamp_put (struct m0_net_test_network_ctx *net_ctx, uint32_t buf_index, uint64_t seq)
 
static bool node_ping_timestamp_get (struct m0_net_test_network_ctx *net_ctx, uint32_t buf_index, struct m0_net_test_timestamp *ts)
 
static void node_ping_to_add (struct node_ping_ctx *ctx, size_t buf_index)
 
static void node_ping_to_del (struct node_ping_ctx *ctx, size_t buf_index)
 
static ssize_t node_ping_to_peek (struct node_ping_ctx *ctx)
 
static ssize_t node_ping_client_search_seq (struct node_ping_ctx *ctx, size_t server_index, uint64_t seq)
 
static void node_ping_buf_enqueue (struct node_ping_ctx *ctx, size_t buf_index, enum m0_net_queue_type q, struct m0_net_end_point *ep, size_t ep_index)
 
static void node_ping_buf_enqueue_recv (struct node_ping_ctx *ctx, size_t buf_index)
 
static void node_ping_client_send (struct node_ping_ctx *ctx, size_t buf_index)
 
static void node_ping_client_cb2 (struct node_ping_ctx *ctx, size_t buf_index)
 
static bool node_ping_client_recv_cb (struct node_ping_ctx *ctx, struct buf_state *bs, size_t buf_index)
 
static void node_ping_msg_cb (struct m0_net_test_network_ctx *net_ctx, uint32_t buf_index, enum m0_net_queue_type q, const struct m0_net_buffer_event *ev)
 
static void node_ping_cb_impossible (struct m0_net_test_network_ctx *ctx, const uint32_t buf_index, enum m0_net_queue_type q, const struct m0_net_buffer_event *ev)
 
static void node_ping_to_check (struct node_ping_ctx *ctx)
 
static void node_ping_client_handle (struct node_ping_ctx *ctx, struct buf_state *bs, size_t buf_index)
 
static void node_ping_server_handle (struct node_ping_ctx *ctx, struct buf_state *bs, size_t buf_index)
 
static void node_ping_worker (struct node_ping_ctx *ctx)
 
static void node_ping_rb_fill (struct node_ping_ctx *ctx)
 
static int node_ping_test_init_fini (struct node_ping_ctx *ctx, const struct m0_net_test_cmd *cmd)
 
static void * node_ping_initfini (void *ctx_, struct m0_net_test_service *svc)
 
static void * node_ping_init (struct m0_net_test_service *svc)
 
static void node_ping_fini (void *ctx_)
 
static int node_ping_step (void *ctx_)
 
static int node_ping_cmd_init (void *ctx_, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
 
static int node_ping_cmd_start (void *ctx_, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
 
static int node_ping_cmd_stop (void *ctx_, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
 
static int node_ping_cmd_status (void *ctx_, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
 

Variables

static const struct m0_net_tm_callbacks node_ping_tm_cb
 
static struct m0_net_test_network_buffer_callbacks node_ping_buf_cb
 
static struct m0_net_test_service_cmd_handler node_ping_cmd_handler []
 
struct m0_net_test_service_ops m0_net_test_node_ping_ops
 

Detailed Description

Ping node service m0_net_test_service_ops:

Todo:
nb_max_receive_msgs > 1 is not supported.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TO_CHECK_INTERVAL 

Timeout checking interval, ms

Definition at line 77 of file node_ping.c.

Function Documentation

◆ M0_TL_DEFINE()

M0_TL_DEFINE ( buf_state  ,
static  ,
struct buf_state   
)

◆ M0_TL_DESCR_DEFINE()

M0_TL_DESCR_DEFINE ( buf_state  ,
"buf_state"  ,
static  ,
struct buf_state  ,
bs_link  ,
bs_link_magic  ,
M0_NET_TEST_BS_LINK_MAGIC  ,
M0_NET_TEST_BS_HEAD_MAGIC   
)

◆ node_ping_buf_enqueue()

static void node_ping_buf_enqueue ( struct node_ping_ctx ctx,
size_t  buf_index,
enum m0_net_queue_type  q,
struct m0_net_end_point ep,
size_t  ep_index 
)
static

Definition at line 315 of file node_ping.c.

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

◆ node_ping_buf_enqueue_recv()

static void node_ping_buf_enqueue_recv ( struct node_ping_ctx ctx,
size_t  buf_index 
)
static

Definition at line 354 of file node_ping.c.

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

◆ node_ping_cb_impossible()

static void node_ping_cb_impossible ( struct m0_net_test_network_ctx ctx,
const uint32_t  buf_index,
enum m0_net_queue_type  q,
const struct m0_net_buffer_event ev 
)
static

Definition at line 504 of file node_ping.c.

◆ node_ping_client_cb2()

static void node_ping_client_cb2 ( struct node_ping_ctx ctx,
size_t  buf_index 
)
static

Definition at line 391 of file node_ping.c.

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

◆ node_ping_client_handle()

static void node_ping_client_handle ( struct node_ping_ctx ctx,
struct buf_state bs,
size_t  buf_index 
)
static

Definition at line 541 of file node_ping.c.

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

◆ node_ping_client_recv_cb()

static bool node_ping_client_recv_cb ( struct node_ping_ctx ctx,
struct buf_state bs,
size_t  buf_index 
)
static

Definition at line 409 of file node_ping.c.

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

◆ node_ping_client_search_seq()

static ssize_t node_ping_client_search_seq ( struct node_ping_ctx ctx,
size_t  server_index,
uint64_t  seq 
)
static

Definition at line 299 of file node_ping.c.

Here is the caller graph for this function:

◆ node_ping_client_send()

static void node_ping_client_send ( struct node_ping_ctx ctx,
size_t  buf_index 
)
static

Definition at line 360 of file node_ping.c.

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

◆ node_ping_cmd_init()

static int node_ping_cmd_init ( void *  ctx_,
const struct m0_net_test_cmd cmd,
struct m0_net_test_cmd reply 
)
static

Definition at line 791 of file node_ping.c.

Here is the call graph for this function:

◆ node_ping_cmd_start()

static int node_ping_cmd_start ( void *  ctx_,
const struct m0_net_test_cmd cmd,
struct m0_net_test_cmd reply 
)
static

Definition at line 856 of file node_ping.c.

Here is the call graph for this function:

◆ node_ping_cmd_status()

static int node_ping_cmd_status ( void *  ctx_,
const struct m0_net_test_cmd cmd,
struct m0_net_test_cmd reply 
)
static

Definition at line 920 of file node_ping.c.

Here is the call graph for this function:

◆ node_ping_cmd_stop()

static int node_ping_cmd_stop ( void *  ctx_,
const struct m0_net_test_cmd cmd,
struct m0_net_test_cmd reply 
)
static

Definition at line 894 of file node_ping.c.

Here is the call graph for this function:

◆ node_ping_ctx_from_net_ctx()

static struct node_ping_ctx* node_ping_ctx_from_net_ctx ( struct m0_net_test_network_ctx net_ctx)
static

Definition at line 235 of file node_ping.c.

Here is the caller graph for this function:

◆ node_ping_fini()

static void node_ping_fini ( void *  ctx_)
static

Definition at line 780 of file node_ping.c.

Here is the call graph for this function:

◆ node_ping_init()

static void* node_ping_init ( struct m0_net_test_service svc)
static

Definition at line 775 of file node_ping.c.

Here is the call graph for this function:

◆ node_ping_initfini()

static void* node_ping_initfini ( void *  ctx_,
struct m0_net_test_service svc 
)
static

Definition at line 753 of file node_ping.c.

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

◆ node_ping_msg_cb()

static void node_ping_msg_cb ( struct m0_net_test_network_ctx net_ctx,
uint32_t  buf_index,
enum m0_net_queue_type  q,
const struct m0_net_buffer_event ev 
)
static

Definition at line 465 of file node_ping.c.

Here is the call graph for this function:

◆ node_ping_rb_fill()

static void node_ping_rb_fill ( struct node_ping_ctx ctx)
static

Definition at line 661 of file node_ping.c.

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

◆ node_ping_server_handle()

static void node_ping_server_handle ( struct node_ping_ctx ctx,
struct buf_state bs,
size_t  buf_index 
)
static

Definition at line 570 of file node_ping.c.

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

◆ node_ping_step()

static int node_ping_step ( void *  ctx_)
static

Definition at line 786 of file node_ping.c.

◆ node_ping_test_init_fini()

static int node_ping_test_init_fini ( struct node_ping_ctx ctx,
const struct m0_net_test_cmd cmd 
)
static

Definition at line 680 of file node_ping.c.

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

◆ node_ping_timestamp_get()

static bool node_ping_timestamp_get ( struct m0_net_test_network_ctx net_ctx,
uint32_t  buf_index,
struct m0_net_test_timestamp ts 
)
static

Definition at line 255 of file node_ping.c.

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

◆ node_ping_timestamp_put()

static m0_time_t node_ping_timestamp_put ( struct m0_net_test_network_ctx net_ctx,
uint32_t  buf_index,
uint64_t  seq 
)
static

Definition at line 240 of file node_ping.c.

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

◆ node_ping_tm_event_cb()

static void node_ping_tm_event_cb ( const struct m0_net_tm_event ev)
static

Definition at line 225 of file node_ping.c.

◆ node_ping_to_add()

static void node_ping_to_add ( struct node_ping_ctx ctx,
size_t  buf_index 
)
static

Definition at line 271 of file node_ping.c.

Here is the caller graph for this function:

◆ node_ping_to_check()

static void node_ping_to_check ( struct node_ping_ctx ctx)
static

Definition at line 524 of file node_ping.c.

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

◆ node_ping_to_del()

static void node_ping_to_del ( struct node_ping_ctx ctx,
size_t  buf_index 
)
static

Definition at line 279 of file node_ping.c.

Here is the caller graph for this function:

◆ node_ping_to_peek()

static ssize_t node_ping_to_peek ( struct node_ping_ctx ctx)
static

Definition at line 286 of file node_ping.c.

Here is the caller graph for this function:

◆ node_ping_worker()

static void node_ping_worker ( struct node_ping_ctx ctx)
static

Definition at line 585 of file node_ping.c.

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

◆ sd_update()

static void sd_update ( struct node_ping_ctx ctx,
enum m0_net_test_nh_msg_type  type,
enum m0_net_test_nh_msg_status  status,
enum m0_net_test_nh_msg_direction  direction 
)
static

Wrapper for m0_net_test_nh_sd_update() with smaller name

Definition at line 217 of file node_ping.c.

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

Variable Documentation

◆ m0_net_test_node_ping_ops

struct m0_net_test_service_ops m0_net_test_node_ping_ops
Initial value:
= {
.ntso_init = node_ping_init,
.ntso_fini = node_ping_fini,
.ntso_step = node_ping_step,
.ntso_cmd_handler = node_ping_cmd_handler,
.ntso_cmd_handler_nr = ARRAY_SIZE(node_ping_cmd_handler),
}
static void * node_ping_init(struct m0_net_test_service *svc)
Definition: node_ping.c:775
static int node_ping_step(void *ctx_)
Definition: node_ping.c:786
static struct m0_net_test_service_cmd_handler node_ping_cmd_handler[]
Definition: node_ping.c:933
static void node_ping_fini(void *ctx_)
Definition: node_ping.c:780
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 952 of file node_ping.c.

◆ node_ping_buf_cb

struct m0_net_test_network_buffer_callbacks node_ping_buf_cb
static
Initial value:
= {
.ntnbc_cb = {
}
}
static void node_ping_cb_impossible(struct m0_net_test_network_ctx *ctx, const uint32_t buf_index, enum m0_net_queue_type q, const struct m0_net_buffer_event *ev)
Definition: node_ping.c:504
static void node_ping_msg_cb(struct m0_net_test_network_ctx *net_ctx, uint32_t buf_index, enum m0_net_queue_type q, const struct m0_net_buffer_event *ev)
Definition: node_ping.c:465

Definition at line 513 of file node_ping.c.

◆ node_ping_cmd_handler

struct m0_net_test_service_cmd_handler node_ping_cmd_handler[]
static
Initial value:
= {
{
.ntsch_type = M0_NET_TEST_CMD_INIT,
.ntsch_handler = node_ping_cmd_init,
},
{
.ntsch_type = M0_NET_TEST_CMD_START,
.ntsch_handler = node_ping_cmd_start,
},
{
.ntsch_type = M0_NET_TEST_CMD_STOP,
.ntsch_handler = node_ping_cmd_stop,
},
{
.ntsch_type = M0_NET_TEST_CMD_STATUS,
.ntsch_handler = node_ping_cmd_status,
},
}
static int node_ping_cmd_stop(void *ctx_, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
Definition: node_ping.c:894
static int node_ping_cmd_start(void *ctx_, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
Definition: node_ping.c:856
static int node_ping_cmd_init(void *ctx_, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
Definition: node_ping.c:791
static int node_ping_cmd_status(void *ctx_, const struct m0_net_test_cmd *cmd, struct m0_net_test_cmd *reply)
Definition: node_ping.c:920

Definition at line 933 of file node_ping.c.

◆ node_ping_tm_cb

const struct m0_net_tm_callbacks node_ping_tm_cb
static
Initial value:
= {
.ntc_event_cb = node_ping_tm_event_cb
}
static void node_ping_tm_event_cb(const struct m0_net_tm_event *ev)
Definition: node_ping.c:225

Definition at line 230 of file node_ping.c.