Motr  M0
ping.h File Reference
#include "lib/bitmap.h"
#include <stdio.h>
Include dependency graph for ping.h:

Go to the source code of this file.

Data Structures

struct  nlx_ping_ops
 
struct  nlx_ping_ctx
 
struct  nlx_ping_client_params
 

Macros

#define __MOTR_NET_LNET_PING_H__
 
#define PING_ERR(fmt, ...)   fprintf(stderr, fmt , ## __VA_ARGS__)
 
#define PING_OUT(ctx, num, fmt, ...)
 

Enumerations

enum  {
  PING_CLIENT_PORTAL = 39, PING_CLIENT_DYNAMIC_TMID = -1, PING_SERVER_PORTAL = 39, PING_SERVER_TMID = 12,
  PING_DEF_BUFS = 20, PING_MIN_BUFS = 4, PING_DEF_CLIENT_THREADS = 1, PING_MAX_CLIENT_THREADS = 32,
  PING_DEF_LOOPS = 1, PING_DEF_MSG_TIMEOUT = 5, PING_DEF_BULK_TIMEOUT = 10, PING_SEGMENT_SIZE = 4096,
  PING_SEGMENT_SHIFT = 12, PING_MAX_SEGMENTS = 256, PING_MAX_BUFFER_SIZE = PING_MAX_SEGMENTS * PING_SEGMENT_SIZE, PING_DEF_SEGMENTS = 8,
  PING_DEF_BUFFER_SIZE = PING_DEF_SEGMENTS * PING_SEGMENT_SIZE, PING_MSG_OVERHEAD = 2, PING_DEF_MIN_RECV_SIZE = 100, ONE_MILLION = 1000000ULL,
  SEC_PER_HR = 60 * 60, SEC_PER_MIN = 60
}
 

Functions

void nlx_ping_server_spawn (struct m0_thread *server_thread, struct nlx_ping_ctx *sctx)
 
void nlx_ping_server_should_stop (struct nlx_ping_ctx *ctx)
 
void nlx_ping_client (struct nlx_ping_client_params *params)
 
void nlx_ping_print_qstats_tm (struct nlx_ping_ctx *ctx, bool reset)
 
int nlx_ping_print_qstats_total (const char *ident, const struct nlx_ping_ops *ops)
 
uint64_t nlx_ping_parse_uint64 (const char *s)
 
void nlx_ping_init (void)
 
void nlx_ping_fini (void)
 

Macro Definition Documentation

◆ __MOTR_NET_LNET_PING_H__

#define __MOTR_NET_LNET_PING_H__

Definition at line 26 of file ping.h.

◆ PING_ERR

#define PING_ERR (   fmt,
  ... 
)    fprintf(stderr, fmt , ## __VA_ARGS__)

Definition at line 148 of file ping.h.

◆ PING_OUT

#define PING_OUT (   ctx,
  num,
  fmt,
  ... 
)
Value:
do { \
if ((ctx)->pc_verbose >= num) \
(ctx)->pc_ops->pf(fmt , ## __VA_ARGS__);\
} while (0)
char * fmt(const char *format,...) __attribute__((format(printf
static struct fdmi_ctx ctx
Definition: main.c:80
Definition: nucleus.c:42
int num
Definition: bulk_if.c:54

Definition at line 151 of file ping.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PING_CLIENT_PORTAL 
PING_CLIENT_DYNAMIC_TMID 
PING_SERVER_PORTAL 
PING_SERVER_TMID 
PING_DEF_BUFS 
PING_MIN_BUFS 
PING_DEF_CLIENT_THREADS 
PING_MAX_CLIENT_THREADS 
PING_DEF_LOOPS 
PING_DEF_MSG_TIMEOUT 
PING_DEF_BULK_TIMEOUT 
PING_SEGMENT_SIZE 
PING_SEGMENT_SHIFT 
PING_MAX_SEGMENTS 
PING_MAX_BUFFER_SIZE 
PING_DEF_SEGMENTS 
PING_DEF_BUFFER_SIZE 
PING_MSG_OVERHEAD 
PING_DEF_MIN_RECV_SIZE 
ONE_MILLION 
SEC_PER_HR 
SEC_PER_MIN 

Definition at line 112 of file ping.h.

Function Documentation

◆ nlx_ping_client()

void nlx_ping_client ( struct nlx_ping_client_params params)

Definition at line 1837 of file ping.c.

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

◆ nlx_ping_fini()

void nlx_ping_fini ( void  )

Definition at line 1921 of file ping.c.

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

◆ nlx_ping_init()

void nlx_ping_init ( void  )

Definition at line 1916 of file ping.c.

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

◆ nlx_ping_parse_uint64()

uint64_t nlx_ping_parse_uint64 ( const char *  s)

Definition at line 171 of file ping.c.

Here is the caller graph for this function:

◆ nlx_ping_print_qstats_tm()

void nlx_ping_print_qstats_tm ( struct nlx_ping_ctx ctx,
bool  reset 
)

Definition at line 136 of file ping.c.

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

◆ nlx_ping_print_qstats_total()

int nlx_ping_print_qstats_total ( const char *  ident,
const struct nlx_ping_ops ops 
)

Definition at line 151 of file ping.c.

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

◆ nlx_ping_server_should_stop()

void nlx_ping_server_should_stop ( struct nlx_ping_ctx ctx)

Definition at line 1485 of file ping.c.

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

◆ nlx_ping_server_spawn()

void nlx_ping_server_spawn ( struct m0_thread server_thread,
struct nlx_ping_ctx sctx 
)

Definition at line 1496 of file ping.c.

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