34 #define DEF_RESPONSE "active pong" 35 #define DEF_SEND "passive ping" 36 #define SEND_RESP " pong" 72 "%5s %6lu %6lu %6lu %6lu %13s %18lu %9lu\n";
74 "Queue #Add #Del #Succ #Fail Time in Queue Total Bytes " 76 "----- ------ ------ ------ ------ ------------- ------------------" 80 ctx->pc_ops->pf(
"%s statistics:\n",
ctx->pc_ident);
81 ctx->pc_ops->pf(
"%s", hfmt);
89 sprintf(tbuf,
"%02lu:%02lu:%02lu.%03lu",
90 (
long unsigned int) hr,
91 (
long unsigned int)
min,
92 (
long unsigned int) sec,
93 (
long unsigned int) msec);
102 #define PING_QSTATS_CLIENT_TOTAL(f) cqp->nqs_##f += qp->nqs_##f 109 #undef PING_QSTATS_CLIENT_TOTAL 114 if (
ctx->pc_sync_events) {
115 ctx->pc_ops->pf(
"%s Loops: Work=%lu Blocked=%lu\n",
117 (
unsigned long)
ctx->pc_worked_count,
118 (
unsigned long)
ctx->pc_blocked_count);
119 ctx->pc_ops->pf(
"%s Wakeups: WorkQ=%lu Net=%lu\n",
121 (
unsigned long)
ctx->pc_wq_signal_count,
122 (
unsigned long)
ctx->pc_net_signal_count);
124 ctx->pc_ops->pf(
"%s errors: %lu\n",
ctx->pc_ident,
126 ctx->pc_ops->pf(
"%s retries: %lu\n",
ctx->pc_ident,
144 is_client =
ctx->pc_ident[0] ==
'C';
173 const char *fmt2 =
"%lu%c";
174 const char *fmt1 =
"%lu";
181 if (sscanf(
s, fmt2, &len, &unit) == 2) {
184 else if (unit ==
'M')
186 else if (unit ==
'G')
188 else if (unit ==
'T')
189 mult = (uint64_t) 1 << 40;
191 M0_ASSERT(unit ==
'K' || unit ==
'M' || unit ==
'G' ||
194 sscanf(
s, fmt1, &len);
217 for (
i = 0;
i <
num; ++
i) {
247 for (
i = 0;
i <
ctx->pc_nr_bufs; ++
i)
254 if (
i ==
ctx->pc_nr_bufs)
257 nb = &
ctx->pc_nbs[
i];
268 int i = nb - &
ctx->pc_nbs[0];
302 unsigned passive_size,
311 *
bp = send_desc ?
's' :
'r';
322 bp += sprintf(
bp,
"%08u", passive_size);
389 i = sscanf(nine,
"%u", &len);
420 ctx->pc_ops->pf(
"%s: Available interfaces\n",
ctx->pc_ident);
421 for (
i = 0;
ctx->pc_interfaces[
i] !=
NULL; ++
i)
422 ctx->pc_ops->pf(
"\t%s\n",
ctx->pc_interfaces[
i]);
451 ctx->pc_ops->pf(
"%s: msg recv error: %d\n",
470 ctx->pc_ident, len + 1);
472 if (
ctx->pc_compare_buf !=
NULL) {
473 int l = strlen(
ctx->pc_compare_buf);
509 ctx->pc_ops->pf(
"%s: msg send error: %d\n",
555 ctx->pc_ops->pf(
"%s: passive recv error: %d\n",
573 ctx->pc_ident, len + 1);
577 for (
i = 0;
i < len - 1; ++
i) {
579 PING_ERR(
"%s: data diff @ offset %i: " 621 ctx->pc_ops->pf(
"%s: passive send error: %d\n",
661 const char *
s =
"unexpected";
668 PING_OUT(
ctx, 1,
"%s: Event CB state change to %s, status %d\n",
676 PING_OUT(
ctx, 0,
"%s: Event CB for diagnostic %d\n",
710 snprintf(
buf, len,
"%s (peer %s)", ident,
ep->nep_addr);
712 snprintf(
buf, len,
"%s", ident);
726 int bulk_delay =
ctx->pc_server_bulk_delay;
737 PING_OUT(
ctx, 1,
"%s: msg recv canceled on shutdown\n",
740 ctx->pc_ops->pf(
"%s: msg recv error: %d\n",
761 ctx->pc_ops->pf(
"%s: dropped msg, " 762 "no buffer available\n", idbuf);
769 ctx->pc_ops->pf(
"%s: dropped msg, bulk %s request " 770 "too large (%u)\n", idbuf,
req,
782 "active recv: sz=%u\n", idbuf,
791 if (bulk_delay != 0) {
798 "active send: sz=%u\n", idbuf,
817 bp[
i] =
"abcdefghi"[
i % 9];
826 if (bulk_delay != 0) {
855 if (
ctx->pc_sync_events)
886 PING_OUT(
ctx, 1,
"%s: msg send canceled\n", idbuf);
888 ctx->pc_ops->pf(
"%s: msg send error: %d\n",
929 PING_OUT(
ctx, 1,
"%s: active recv canceled\n", idbuf);
931 ctx->pc_ops->pf(
"%s: active recv error: %d\n",
953 for (
i = 0;
i < len - 1; ++
i) {
955 PING_ERR(
"%s: data diff @ offset %i: " 956 "%c != %c\n", idbuf,
i,
987 PING_OUT(
ctx, 1,
"%s: active send canceled\n", idbuf);
989 ctx->pc_ops->pf(
"%s: active send error: %d\n",
1020 ++
ctx->pc_wq_signal_count;
1028 ++
ctx->pc_net_signal_count;
1054 if (
ctx->pc_sync_events) {
1072 if (
ctx->pc_dom_debug > 0)
1077 PING_ERR(
"failed to load interface names: %d\n",
rc);
1082 if (
ctx->pc_interfaces[0] ==
NULL) {
1083 PING_ERR(
"no interfaces defined locally\n");
1090 ctx->pc_segments = bsz /
ctx->pc_seg_size +
1091 (bsz %
ctx->pc_seg_size != 0 ? 1 : 0);
1094 ctx->pc_seg_shift, &
ctx->pc_nbs);
1096 PING_ERR(
"buffer allocation %u X %lu([%u][%u]) failed: %d\n",
1097 ctx->pc_nr_bufs, (
unsigned long) bsz,
1098 ctx->pc_segments,
ctx->pc_seg_size,
rc);
1103 PING_ERR(
"buffer bitmap allocation failed: %d\n",
rc);
1107 for (
i = 0;
i <
ctx->pc_nr_bufs; ++
i) {
1110 PING_ERR(
"buffer register failed: %d\n",
rc);
1113 ctx->pc_nbs[
i].nb_callbacks =
ctx->pc_buf_callbacks;
1116 if (
ctx->pc_network ==
NULL) {
1117 ctx->pc_network =
ctx->pc_interfaces[0];
1118 for (
i = 0;
ctx->pc_interfaces[
i] !=
NULL; ++
i) {
1119 if (strstr(
ctx->pc_interfaces[
i],
"@lo") !=
NULL)
1121 ctx->pc_network =
ctx->pc_interfaces[
i];
1126 ctx->pc_rnetwork =
ctx->pc_network;
1128 if (
ctx->pc_tmid >= 0)
1130 ctx->pc_pid,
ctx->pc_portal,
ctx->pc_tmid);
1133 ctx->pc_pid,
ctx->pc_portal);
1138 PING_ERR(
"transfer machine init failed: %d\n",
rc);
1142 if (
ctx->pc_tm_debug > 0)
1145 if (
ctx->pc_sync_events) {
1154 PING_ERR(
"transfer machine start failed: %d\n",
rc);
1162 rc =
ctx->pc_status;
1165 PING_ERR(
"transfer machine start failed: %d\n",
rc);
1179 bool signalled =
false;
1181 if (
ctx->pc_sync_events) {
1186 }
while (!signalled);
1191 if (
ctx->pc_sync_events)
1224 (*
ctx->pc_ops->pqs)(
ctx,
false);
1230 for (
i = 0;
i <
ctx->pc_nr_bufs; ++
i) {
1240 if (
ctx->pc_interfaces !=
NULL)
1242 if (
ctx->pc_dom.nd_xprt !=
NULL)
1251 if (
ctx->pc_sync_events) {
1268 if (
ctx->pc_msg_timeout > 0) {
1269 PING_OUT(
ctx, 1,
"%s: setting msg nb_timeout to %ds\n",
1270 ctx->pc_ident,
ctx->pc_msg_timeout);
1280 if (
ctx->pc_bulk_timeout > 0) {
1281 PING_OUT(
ctx, 1,
"%s: setting bulk nb_timeout to %ds\n",
1282 ctx->pc_ident,
ctx->pc_bulk_timeout);
1318 ctx->pc_ops->pf(
"%s buffer_add(%d) failed %d\n",
1351 ++
ctx->pc_blocked_count;
1361 ++
ctx->pc_worked_count;
1388 unsigned int num_recv_bufs =
max32u(
ctx->pc_nr_bufs / 8, 2);
1394 ctx->pc_ident =
"Server";
1396 if (
ctx->pc_nr_recv_bufs >
ctx->pc_nr_bufs / 2)
1397 ctx->pc_nr_recv_bufs = num_recv_bufs;
1398 if (
ctx->pc_nr_recv_bufs < 2)
1399 ctx->pc_nr_recv_bufs = num_recv_bufs;
1400 num_recv_bufs =
ctx->pc_nr_recv_bufs;
1406 ctx->pc_ops->pf(
"Server end point: %s\n",
ctx->pc_tm.ntm_ep->nep_addr);
1409 if (
ctx->pc_max_recv_msgs > 0 &&
ctx->pc_min_recv_size <= 0)
1411 else if (
ctx->pc_min_recv_size > 0 &&
ctx->pc_max_recv_msgs <= 0)
1416 ctx->pc_max_recv_msgs < 1)
1417 ctx->pc_max_recv_msgs =
ctx->pc_min_recv_size = -1;
1419 if (
ctx->pc_min_recv_size <= 0 &&
ctx->pc_max_recv_msgs <= 0) {
1425 ctx->pc_ops->pf(
"%s buffer parameters:\n" 1426 "\t total buffers=%u\n" 1427 "\t buffer size=%u\n" 1428 "\treceive buffers=%u\n" 1429 "\t min_recv_size=%d\n" 1430 "\t max_recv_msgs=%d\n",
1432 ctx->pc_min_recv_size,
ctx->pc_max_recv_msgs);
1435 for (
i = 0;
i < num_recv_bufs; ++
i) {
1436 nb = &
ctx->pc_nbs[
i];
1448 ctx->pc_ready =
true;
1450 while (
ctx->pc_ready)
1453 if (
ctx->pc_sync_events)
1462 for (
i = 0;
i < num_recv_bufs; ++
i) {
1463 nb = &
ctx->pc_nbs[
i];
1474 while (!m0_net_tm_tlist_is_empty(&
ctx->pc_tm.ntm_q[
i])) {
1475 PING_OUT(
ctx, 1,
"waiting for queue %d to empty\n",
i);
1489 if (
ctx->pc_sync_events)
1509 while (!
sctx->pc_ready)
1511 sctx->pc_ready =
false;
1540 PING_OUT(
ctx, 1,
"%s: starting msg send/recv sequence\n",
1557 nb->
nb_ep = server_ep;
1580 ctx->pc_ops->pf(
"%s: send failed, " 1581 "no more retries\n",
1598 if (
ctx->pc_msg_timeout > 0)
1601 ctx->pc_msg_timeout, 0);
1611 ctx->pc_ops->pf(
"%s: Receive TIMED OUT\n",
1634 PING_OUT(
ctx, 1,
"%s: starting passive recv sequence\n",
ctx->pc_ident);
1639 nb->
nb_ep = server_ep;
1652 nb->
nb_ep = server_ep;
1673 ctx->pc_ops->pf(
"%s: send failed, " 1674 "no more retries\n",
1716 data =
"passive ping";
1717 PING_OUT(
ctx, 1,
"%s: starting passive send sequence\n",
ctx->pc_ident);
1724 nb->
nb_ep = server_ep;
1737 nb->
nb_ep = server_ep;
1758 ctx->pc_ops->pf(
"%s: send failed, " 1759 "no more retries\n",
1793 const char *
fmt =
"Client %s";
1799 sprintf(ident,
fmt,
"starting");
1800 ctx->pc_ident = ident;
1814 ctx->pc_rpid,
ctx->pc_rportal,
ctx->pc_rtmid);
1825 sprintf(ident,
fmt,
ctx->pc_tm.ntm_ep->nep_addr);
1843 char *send_msg =
NULL;
1854 cctx->pc_bulk_timeout =
params->bulk_timeout;
1867 cctx->pc_sync_events =
false;
1875 if (
params->client_id == 1)
1878 if (
params->bulk_size != 0) {
1882 bp[
i] =
"abcdefghi"[
i % 9];
1885 if (
params->send_msg_size > 0) {
1888 for (
i = 0;
i <
params->send_msg_size - 1; ++
i)
1889 send_msg[
i] =
"ABCDEFGHI"[
i % 9];
struct m0_net_buffer_callbacks sbuf_cb
static int nlx_ping_client_init(struct nlx_ping_ctx *ctx, struct m0_net_end_point **server_ep)
M0_INTERNAL void m0_net_lnet_dom_set_debug(struct m0_net_domain *dom, unsigned dbg)
#define M0_BUFVEC_INIT_BUF(addr_ptr, count_ptr)
static void m0_atomic64_inc(struct m0_atomic64 *a)
uint64_t nqs_num_f_events
static uint64_t num_adds[M0_NET_QT_NR]
struct m0_net_tm_callbacks stm_cb
M0_INTERNAL void m0_chan_wait(struct m0_clink *link)
void s_m_recv_cb(const struct m0_net_buffer_event *ev)
struct m0_net_transfer_mc * nb_tm
M0_INTERNAL void m0_list_add(struct m0_list *head, struct m0_list_link *new)
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL int m0_bitmap_init(struct m0_bitmap *map, size_t nr)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
void m0_net_domain_fini(struct m0_net_domain *dom)
m0_time_t nqs_time_in_queue
M0_INTERNAL int m0_net_tm_start(struct m0_net_transfer_mc *tm, const char *addr)
#define PING_OUT(ctx, num, fmt,...)
static struct m0_thread server_thread
uint64_t nqs_num_s_events
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
M0_INTERNAL void m0_bitmap_fini(struct m0_bitmap *map)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
static struct buffer * cur(struct m0_addb2_mach *mach, m0_bcount_t space)
struct m0_bufvec nb_buffer
void s_p_send_cb(const struct m0_net_buffer_event *ev)
M0_INTERNAL int m0_net_buffer_register(struct m0_net_buffer *buf, struct m0_net_domain *dom)
M0_INTERNAL void m0_list_init(struct m0_list *head)
const struct m0_net_xprt m0_net_lnet_xprt
const m0_time_t M0_TIME_NEVER
static struct io_request req
static void ping_sleep_secs(int secs)
int nlx_ping_print_qstats_total(const char *ident, const struct nlx_ping_ops *ops)
void s_m_send_cb(const struct m0_net_buffer_event *ev)
M0_INTERNAL int m0_net_tm_stats_get(struct m0_net_transfer_mc *tm, enum m0_net_queue_type qtype, struct m0_net_qstats *qs, bool reset)
uint64_t m0_time_nanoseconds(const m0_time_t time)
union ping_msg::@371 pm_u
static struct m0_mutex qstats_mutex
static m0_bcount_t segs[NR *IT]
M0_INTERNAL void m0_list_fini(struct m0_list *head)
static uint64_t ping_qs_total_errors
M0_INTERNAL void m0_list_del(struct m0_list_link *old)
static struct m0_rpc_client_ctx cctx
const struct nlx_ping_ops * pc_ops
static struct m0_net_qstats ping_qs_total[M0_NET_QT_NR]
static void ping_tm_wait(struct nlx_ping_ctx *ctx, struct m0_clink *cl)
static int nlx_ping_client_passive_recv(struct nlx_ping_ctx *ctx, struct m0_net_end_point *server_ep)
M0_INTERNAL void * m0_bufvec_cursor_addr(struct m0_bufvec_cursor *cur)
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
int encode_msg(struct m0_net_buffer *nb, const char *str)
M0_INTERNAL bool m0_net_buffer_del(struct m0_net_buffer *buf, struct m0_net_transfer_mc *tm)
m0_bcount_t nb_min_receive_size
#define container_of(ptr, type, member)
enum ping_msg_type pm_type
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
struct m0_net_buffer * nbe_buffer
m0_time_t m0_time(uint64_t secs, long ns)
struct m0_net_end_point * nbe_ep
void event_cb(const struct m0_net_tm_event *ev)
struct m0_net_buf_desc pm_desc
M0_INTERNAL void m0_cond_init(struct m0_cond *cond, struct m0_mutex *mutex)
static int nlx_ping_client_msg_send_recv(struct nlx_ping_ctx *ctx, struct m0_net_end_point *server_ep, const char *data)
static void nlx_ping_server_sync(struct nlx_ping_ctx *ctx)
void nlx_ping_server_spawn(struct m0_thread *server_thread, struct nlx_ping_ctx *sctx)
int m0_bufvec_alloc_aligned(struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size, unsigned shift)
void c_a_send_cb(const struct m0_net_buffer_event *ev)
static void nlx_ping_client_fini(struct nlx_ping_ctx *ctx, struct m0_net_end_point *server_ep)
static bool ping_workq_clink_cb(struct m0_clink *cl)
int decode_msg(struct m0_net_buffer *nb, struct ping_msg *msg)
void c_m_recv_cb(const struct m0_net_buffer_event *ev)
int alloc_buffers(int num, uint32_t segs, m0_bcount_t segsize, struct m0_net_buffer **out)
M0_INTERNAL bool m0_bufvec_cursor_move(struct m0_bufvec_cursor *cur, m0_bcount_t count)
M0_INTERNAL void m0_chan_signal(struct m0_chan *chan)
void c_m_send_cb(const struct m0_net_buffer_event *ev)
static void nlx_ping_server_async(struct nlx_ping_ctx *ctx)
enum m0_net_tm_state nte_next_state
M0_INTERNAL int m0_net_tm_init(struct m0_net_transfer_mc *tm, struct m0_net_domain *dom)
M0_INTERNAL void m0_clink_attach(struct m0_clink *link, struct m0_clink *group, m0_chan_cb_t cb)
void s_p_recv_cb(const struct m0_net_buffer_event *ev)
struct m0_net_tm_callbacks ctm_cb
void ping_fini(struct ping_ctx *ctx)
M0_INTERNAL void m0_net_lnet_tm_set_debug(struct m0_net_transfer_mc *tm, unsigned dbg)
enum m0_net_queue_type nb_qtype
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_copy(struct m0_bufvec_cursor *dcur, struct m0_bufvec_cursor *scur, m0_bcount_t num_bytes)
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_step(const struct m0_bufvec_cursor *cur)
void c_a_recv_cb(const struct m0_net_buffer_event *ev)
uint32_t nb_max_receive_msgs
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
M0_INTERNAL void m0_net_tm_fini(struct m0_net_transfer_mc *tm)
struct m0_net_transfer_mc pc_tm
M0_INTERNAL bool m0_mutex_is_locked(const struct m0_mutex *mutex)
M0_INTERNAL int m0_net_lnet_ifaces_get(struct m0_net_domain *dom, char ***addrs)
M0_INTERNAL void m0_cond_fini(struct m0_cond *cond)
void(* ntc_event_cb)(const struct m0_net_tm_event *ev)
static bool ping_net_clink_cb(struct m0_clink *cl)
struct m0_net_buffer * pwi_nb
M0_INTERNAL void m0_bufvec_cursor_init(struct m0_bufvec_cursor *cur, const struct m0_bufvec *bvec)
M0_INTERNAL void m0_cond_signal(struct m0_cond *cond)
struct m0_atomic64 pc_errors
char * fmt(const char *format,...) __attribute__((format(printf
struct m0_list_link pwi_link
void * m0_alloc(size_t size)
static struct m0_rpc_server_ctx sctx
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
static int nlx_ping_client_passive_send(struct nlx_ping_ctx *ctx, struct m0_net_end_point *server_ep, const char *data)
M0_INTERNAL void m0_net_lnet_ifaces_put(struct m0_net_domain *dom, char ***addrs)
M0_INTERNAL void m0_net_desc_free(struct m0_net_buf_desc *desc)
M0_INTERNAL void m0_bitmap_set(struct m0_bitmap *map, size_t idx, bool val)
static void set_bulk_timeout(struct nlx_ping_ctx *ctx, struct m0_net_buffer *nb)
struct m0_clink pc_net_clink
M0_INTERNAL void m0_net_end_point_get(struct m0_net_end_point *ep)
void c_p_send_cb(const struct m0_net_buffer_event *ev)
m0_net_buffer_cb_proc_t nbc_cb[M0_NET_QT_NR]
struct m0_atomic64 pc_retries
M0_INTERNAL int m0_net_desc_copy(const struct m0_net_buf_desc *from_desc, struct m0_net_buf_desc *to_desc)
M0_INTERNAL bool m0_list_is_empty(const struct m0_list *head)
uint64_t m0_time_seconds(const m0_time_t time)
enum m0_net_queue_type pwi_type
static struct m0_clink l[NR]
struct m0_net_buffer_callbacks cbuf_cb
M0_INTERNAL int m0_net_tm_stop(struct m0_net_transfer_mc *tm, bool abort)
M0_INTERNAL void m0_bufvec_free_aligned(struct m0_bufvec *bufvec, unsigned shift)
M0_INTERNAL void m0_net_buffer_event_deliver_all(struct m0_net_transfer_mc *tm)
static void server_event_ident(char *buf, size_t len, const char *ident, const struct m0_net_buffer_event *ev)
#define PING_ERR(fmt,...)
static struct nlx_ping_ctx * buffer_event_to_ping_ctx(const struct m0_net_buffer_event *ev)
static int64_t m0_atomic64_get(const struct m0_atomic64 *a)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
struct m0_net_buffer * ping_buf_get(struct ping_ctx *ctx)
void m0_net_end_point_put(struct m0_net_end_point *ep)
M0_INTERNAL void m0_net_buffer_event_notify(struct m0_net_transfer_mc *tm, struct m0_chan *chan)
M0_INTERNAL void m0_cond_wait(struct m0_cond *cond)
static uint8_t fail[DATA_UNIT_COUNT_MAX+PARITY_UNIT_COUNT_MAX]
static long long min(long long a, long long b)
M0_INTERNAL void m0_net_buffer_deregister(struct m0_net_buffer *buf, struct m0_net_domain *dom)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
void nlx_ping_server_should_stop(struct nlx_ping_ctx *ctx)
M0_INTERNAL bool m0_net_buffer_event_pending(struct m0_net_transfer_mc *tm)
static uint64_t ping_qs_total_retries
M0_INTERNAL int m0_net_buffer_event_deliver_synchronously(struct m0_net_transfer_mc *tm)
static uint64_t num_dels[M0_NET_QT_NR]
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL bool m0_chan_timedwait(struct m0_clink *link, const m0_time_t abs_timeout)
static void nlx_ping_server_work(struct nlx_ping_ctx *ctx)
void nlx_ping_client(struct nlx_ping_client_params *params)
M0_INTERNAL int m0_net_buffer_add(struct m0_net_buffer *buf, struct m0_net_transfer_mc *tm)
m0_time_t m0_time_from_now(uint64_t secs, long ns)
void s_a_send_cb(const struct m0_net_buffer_event *ev)
static uint32_t max32u(uint32_t a, uint32_t b)
uint64_t nlx_ping_parse_uint64(const char *s)
M0_INTERNAL bool m0_bitmap_get(const struct m0_bitmap *map, size_t idx)
struct m0_clink pc_wq_clink
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
static m0_bcount_t total_bytes[M0_NET_QT_NR]
M0_INTERNAL bool m0_cond_timedwait(struct m0_cond *cond, const m0_time_t abs_timeout)
static struct m0_atomic64 s_msg_recv_counter
int ping_init(struct ping_ctx *ctx)
struct m0_net_buf_desc nb_desc
static void set_msg_timeout(struct nlx_ping_ctx *ctx, struct m0_net_buffer *nb)
enum m0_net_tm_ev_type nte_type
static struct bulkio_params * bp
static void ping_print_qstats(struct nlx_ping_ctx *ctx, struct m0_net_qstats *qp, bool accumulate)
M0_INTERNAL void m0_list_link_init(struct m0_list_link *link)
static struct m0_list_link * m0_list_first(const struct m0_list *head)
static bool ping_tm_timedwait(struct nlx_ping_ctx *ctx, struct m0_clink *cl, m0_time_t timeout)
int encode_desc(struct m0_net_buffer *nb, bool send_desc, const struct m0_net_buf_desc *desc)
static void ping_print_interfaces(struct nlx_ping_ctx *ctx)
void msg_free(struct ping_msg *msg)
M0_INTERNAL void m0_chan_fini_lock(struct m0_chan *chan)
static struct m0_addb2_source * s
M0_INTERNAL int m0_net_end_point_create(struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const char *addr)
#define m0_list_entry(link, type, member)
void c_p_recv_cb(const struct m0_net_buffer_event *ev)
void ping_buf_put(struct ping_ctx *ctx, struct m0_net_buffer *nb)
void s_a_recv_cb(const struct m0_net_buffer_event *ev)
static void nlx_ping_server(struct nlx_ping_ctx *ctx)
#define PING_QSTATS_CLIENT_TOTAL(f)
static int64_t m0_atomic64_add_return(struct m0_atomic64 *a, int64_t d)
static uint64_t max64u(uint64_t a, uint64_t b)
void nlx_ping_print_qstats_tm(struct nlx_ping_ctx *ctx, bool reset)
static void m0_atomic64_set(struct m0_atomic64 *a, int64_t num)
struct m0_net_end_point * nb_ep
struct m0_net_transfer_mc * nte_tm
#define M0_IMPOSSIBLE(fmt,...)
int m0_nanosleep(const m0_time_t req, m0_time_t *rem)