#include "lib/trace.h"
#include "lib/ub.h"
#include "lib/misc.h"
#include "lib/string.h"
#include "lib/memory.h"
#include "fop/fop.h"
#include "net/bulk_mem.h"
#include "net/lnet/lnet.h"
#include "ut/cs_service.h"
#include "ut/misc.h"
#include "rpc/rpclib.h"
#include "rpc/session.h"
#include "rpc/ub/fops.h"
Go to the source code of this file.
|
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
|
#define | ARGS |
|
#define | X(name, defval, max) unsigned int a_ ## name; |
|
#define | X(name, defval, max) args->a_ ## name = defval; |
|
#define | X(name, defval, max) && 0 < args->a_ ## name && args->a_ ## name <= max |
|
#define | X(name, defval, max) |
|
#define | X(name, defval, max) { #name "=%u", &dest->a_ ## name }, |
|
#define | CLIENT_ENDPOINT_FMT "127.0.0.1:%d" |
|
#define | SERVER_ENDPOINT_ADDR "127.0.0.1:1" |
|
#define | SERVER_ENDPOINT "bulk-mem:" SERVER_ENDPOINT_ADDR |
|
#define | NAME(ext) "rpc-ub" ext |
|
◆ ARGS
Value: X(nr_msgs, 1000, 5000) \
X(msg_len, 32, 8192)
#define X(name, defval, max)
Definition at line 44 of file ub.c.
◆ CLIENT_ENDPOINT_FMT
#define CLIENT_ENDPOINT_FMT "127.0.0.1:%d" |
Definition at line 156 of file ub.c.
◆ M0_TRACE_SUBSYSTEM
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
Definition at line 23 of file ub.c.
◆ NAME
#define NAME |
( |
|
ext | ) |
"rpc-ub" ext |
Definition at line 172 of file ub.c.
◆ SERVER_ENDPOINT
#define SERVER_ENDPOINT "bulk-mem:" SERVER_ENDPOINT_ADDR |
Definition at line 158 of file ub.c.
◆ SERVER_ENDPOINT_ADDR
#define SERVER_ENDPOINT_ADDR "127.0.0.1:1" |
Definition at line 157 of file ub.c.
◆ X [1/5]
#define X |
( |
|
name, |
|
|
|
defval, |
|
|
|
max |
|
) |
| unsigned int a_ ## name; |
Definition at line 50 of file ub.c.
◆ X [2/5]
Definition at line 50 of file ub.c.
◆ X [3/5]
Definition at line 50 of file ub.c.
◆ X [4/5]
Value:fprintf(stderr, " %s=NUM\t(default = %u, ulimit = %u)\n", \
static long long max(long long a, long long b)
Definition at line 50 of file ub.c.
◆ X [5/5]
Definition at line 50 of file ub.c.
◆ anonymous enum
Enumerator |
---|
CLIENT_COB_DOM_ID | |
MAX_RPCS_IN_FLIGHT | |
MAX_RETRIES | |
MIN_RECV_QUEUE_LEN | |
Definition at line 138 of file ub.c.
◆ _client_start()
static void _client_start |
( |
struct ub_rpc_client * |
client, |
|
|
uint32_t |
cob_dom_id, |
|
|
const char * |
ep |
|
) |
| |
|
static |
Definition at line 201 of file ub.c.
◆ _client_stop()
Definition at line 224 of file ub.c.
◆ _session()
Definition at line 328 of file ub.c.
◆ _start()
static int _start |
( |
const char * |
opts | ) |
|
|
static |
Definition at line 234 of file ub.c.
◆ _stop()
static void _stop |
( |
void |
| ) |
|
|
static |
Definition at line 264 of file ub.c.
◆ args_check_limits()
static int args_check_limits |
( |
const struct args * |
args | ) |
|
|
static |
Definition at line 65 of file ub.c.
◆ args_help()
static void args_help |
( |
void |
| ) |
|
|
static |
Definition at line 93 of file ub.c.
◆ args_init()
static void args_init |
( |
struct args * |
args | ) |
|
|
static |
Assigns default values to the arguments.
Definition at line 58 of file ub.c.
◆ args_parse()
static int args_parse |
( |
const char * |
src, |
|
|
struct args * |
dest |
|
) |
| |
|
static |
Definition at line 104 of file ub.c.
◆ fop_send()
static void fop_send |
( |
struct m0_rpc_session * |
session, |
|
|
size_t |
msg_id |
|
) |
| |
|
static |
Definition at line 292 of file ub.c.
◆ M0_BASSERT()
◆ run()
static void run |
( |
int iter |
M0_UNUSED | ) |
|
|
static |
Definition at line 334 of file ub.c.
◆ token_matches()
static bool token_matches |
( |
const char * |
token, |
|
|
const struct match * |
tbl |
|
) |
| |
|
static |
Definition at line 83 of file ub.c.
◆ ub_item_replied()
static void ub_item_replied |
( |
struct m0_rpc_item * |
item | ) |
|
|
static |
Definition at line 275 of file ub.c.
◆ g_args
Definition at line 55 of file ub.c.
◆ g_argv
Initial value:= {
NAME(
""),
"-Q",
"200" ,
"-w",
"10",
"-T",
"AD",
"-D",
NAME(
".db"),
"-S",
NAME(
".stob"),
"-A",
"linuxstob:"NAME(
".addb-stob"),
}
#define SERVER_ENDPOINT_ADDR
#define M0_UT_CONF_PROCESS
Definition at line 173 of file ub.c.
◆ g_clients
Definition at line 168 of file ub.c.
◆ g_sctx
Initial value:= {
.rsx_xprts_nr = 1,
.rsx_log_file_name =
NAME(
".log")
}
static struct m0_net_xprt * g_xprt
Definition at line 182 of file ub.c.
◆ g_xprt
Definition at line 159 of file ub.c.
◆ m0_rpc_ub
Initial value:= {
.us_name = "rpc-ub",
.us_run = {
{ .ub_name = "run",
.ub_iter = 1,
}
}
static int _start(const char *opts)
static void run(int iter M0_UNUSED)
Definition at line 360 of file ub.c.
◆ M0_XCA_DOMAIN
struct args M0_XCA_DOMAIN |
◆ ub_item_ops
Initial value:= {
}
static void ub_item_replied(struct m0_rpc_item *item)
Definition at line 193 of file ub.c.