23 #include <linux/module.h> 24 #include <linux/kernel.h> 25 #include <linux/inet.h> 146 va_start(varargs,
fmt);
148 if (fmtbuf !=
NULL) {
149 sprintf(fmtbuf,
"%s%s", KERN_INFO,
fmt);
153 rc = vprintk(
fmt, varargs);
182 uint64_t buffer_size;
187 printk(KERN_WARNING
"Minimum of %d buffers required\n",
193 printk(KERN_WARNING
"Max supported bulk data size: %d\n",
198 printk(KERN_WARNING
"Max of %d client threads supported\n",
205 printk(KERN_WARNING
"Server LNet interface address missing (" 206 "e.g. 10.1.2.3@tcp0, 1.2.3.4@o2ib1)\n");
210 printk(KERN_WARNING
"Client LNet interface address missing (" 211 "e.g. 10.1.2.3@tcp0, 1.2.3.4@o2ib1)\n");
255 printk(KERN_INFO
"Motr LNet System Test" 256 " Server Initialized\n");
272 #define CPARAM_SET(f) params[i].f = f 286 params[
i].bulk_size = buffer_size;
302 printk(KERN_INFO
"Motr LNet System Test" 317 printk(KERN_INFO
"Client %d: joined\n",
339 printk(KERN_INFO
"Motr Kernel Messaging System Test removed\n");
#define M0_ALLOC_ARR(arr, nr)
static struct m0_thread server_thread
static int server_max_recv_msgs
static int server_min_recv_size
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
int(* pf)(const char *format,...) __attribute__((format(printf
const struct nlx_ping_ops * pc_ops
static int quiet_printk(const char *fmt,...)
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
MODULE_PARM_DESC(quiet, "quiet mode")
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 void __exit m0_netst_fini_k(void)
static int active_bulk_delay
static int __init m0_netst_init_k(void)
static struct nlx_ping_client_params * params
module_param(quiet, bool, S_IRUGO)
struct m0_net_transfer_mc pc_tm
M0_INTERNAL void m0_cond_fini(struct m0_cond *cond)
static char * server_network
char * fmt(const char *format,...) __attribute__((format(printf
void * m0_alloc(size_t size)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
static struct nlx_ping_ops quiet_ops
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
static struct nlx_ping_ops verbose_ops
int(*) void(* pqs)(struct nlx_ping_ctx *ctx, bool reset)
static struct nlx_ping_ctx sctx
static int verbose_printk(const char *fmt,...)
void nlx_ping_print_qstats_tm(struct nlx_ping_ctx *ctx, bool reset)