58 int main(
int argc,
char *argv[])
99 LAMBDA(
void, (
const char *str) {
108 LAMBDA(
void, (
const char *str) {
115 LAMBDA(
void, (
const char *str) {
129 M0_FLAGARG(
'A',
"async event processing (old style)",
135 "buffer (server only)",
146 fprintf(stderr,
"Max of %d client threads supported\n",
151 fprintf(stderr,
"Minimum of %d buffers required\n",
156 fprintf(stderr,
"Max supported bulk data size: %d\n",
163 fprintf(stderr,
"Server LNet interface address missing (" 164 "e.g. 10.1.2.3@tcp0, 1.2.3.4@o2ib1)\n");
207 printf(
"Motr LNet System Test Server Initialized\n");
211 char readbuf[BUFSIZ];
213 printf(
"Type \"quit\" or ^D to cause server to terminate\n");
214 while (fgets(readbuf, BUFSIZ, stdin)) {
215 if (strcmp(readbuf,
"quit\n") == 0)
217 if (strcmp(readbuf,
"\n") == 0)
219 if (strcmp(readbuf,
"reset_stats\n") == 0)
234 #define CPARAM_SET(f) params[i].f = f 265 printf(
"Motr LNet System Test %d Client(s)" 272 printf(
"Client %d: joined\n",
#define M0_GETOPTS(progname, argc, argv,...)
int(* pf)(const char *format,...) __attribute__((format(printf
#define M0_ALLOC_ARR(arr, nr)
static struct m0_thread server_thread
static int server_max_recv_msgs
#define M0_FLAGARG(ch, desc, ptr)
struct ping_ops quiet_ops
static int server_min_recv_size
const struct ping_ops * pc_ops
int m0_thread_join(struct m0_thread *q)
static char * client_network
int nlx_ping_print_qstats_total(const char *ident, const struct nlx_ping_ops *ops)
enum m0_net_tm_state ntm_state
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
int m0_init(struct m0 *instance)
M0_INTERNAL void m0_cond_init(struct m0_cond *cond, struct m0_mutex *mutex)
void nlx_ping_server_spawn(struct m0_thread *server_thread, struct nlx_ping_ctx *sctx)
static int active_bulk_delay
#define M0_STRINGARG(ch, desc, func)
static struct nlx_ping_client_params * params
int quiet_printf(const char *fmt,...)
#define M0_FORMATARG(ch, desc, fmt, ptr)
M0_INTERNAL void m0_cond_fini(struct m0_cond *cond)
struct m0_net_transfer_mc pc_tm
static char * server_network
char * fmt(const char *format,...) __attribute__((format(printf
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
void nlx_ping_server_should_stop(struct nlx_ping_ctx *ctx)
void nlx_ping_client(struct nlx_ping_client_params *params)
uint64_t nlx_ping_parse_uint64(const char *s)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
static struct m0_thread * client_thread
int main(int argc, char *argv[])
struct ping_ops verbose_ops
void nlx_ping_print_qstats_tm(struct nlx_ping_ctx *ctx, bool reset)