52 unsigned long long count;
71 "%10llu %8lu %10llu\n",
145 unsigned long long offset,
unsigned long nob)
171 while (
n->nc_nob_inflight + nob >
n->nc_nob_max ||
172 n->nc_msg_inflight + 1 >
n->nc_msg_max)
174 n->nc_nob_inflight += nob;
175 n->nc_msg_inflight += 1;
183 n->nc_msg_inflight -= 1;
184 n->nc_nob_inflight -= nob;
201 net_tx(
t,
n,
n->nc_rpc_size,
n->nc_rpc_delay_min,
n->nc_rpc_delay_max);
205 net_tx(
t,
n,
n->nc_rpc_size,
n->nc_rpc_delay_min,
n->nc_rpc_delay_max);
215 tx_min = rpc->
nr_todo * 1000000000 /
n->nc_rate_max;
216 tx_max = rpc->
nr_todo * 1000000000 /
n->nc_rate_min;
M0_INTERNAL void sim_thread_init(struct sim *state, struct sim_thread *thread, unsigned stacksize, sim_func_t func, void *arg)
struct sim_thread * ns_thread
static void net_enter(struct sim_thread *t, struct net_conf *n, unsigned long nob)
M0_INTERNAL void sim_chan_fini(struct sim_chan *chan)
M0_INTERNAL void sim_free(void *ptr)
struct net_conf * nr_conf
sim_time_t ns_pre_bulk_min
M0_INTERNAL void net_rpc_bulk(struct sim_thread *t, struct net_rpc *rpc)
M0_INTERNAL void sim_log(struct sim *s, enum sim_log_level level, const char *format,...)
M0_INTERNAL void sim_chan_broadcast(struct sim_chan *chan)
M0_INTERNAL void cnt_init(struct cnt *cnt, struct cnt *parent, const char *format,...)
M0_INTERNAL void net_rpc_process(struct sim_thread *t, struct net_conf *net, struct net_srv *srv, struct m0_stob_id *stob_id, unsigned long long offset, unsigned long count)
M0_INTERNAL void sim_chan_init(struct sim_chan *chan, char *format,...)
M0_INTERNAL void sim_thread_exit(struct sim_thread *thread)
M0_INTERNAL void net_rpc_fini(struct net_rpc *rpc)
M0_TL_DEFINE(src, static, struct source)
M0_INTERNAL void sim_run(struct sim *state)
M0_TL_DESCR_DEFINE(src, "addb2 rpc sources", static, struct source, s_linkage, s_magix, M0_ADDB2_SOURCE_MAGIC, M0_ADDB2_SOURCE_HEAD_MAGIC)
static int net_srv_threads_start(struct sim_callout *call)
struct sim_thread * nr_srv_thread
M0_INTERNAL void sim_thread_fini(struct sim_thread *thread)
static struct m0_thread t[8]
M0_INTERNAL void sim_timer_add(struct sim *state, sim_time_t delta, sim_call_t *cfunc, void *datum)
static long long max(long long a, long long b)
sim_time_t ns_pre_bulk_max
M0_INTERNAL void sim_sleep(struct sim_thread *thread, sim_time_t nap)
static void net_srv_loop(struct sim *s, struct sim_thread *t, void *arg)
M0_INTERNAL void sim_chan_wait(struct sim_chan *chan, struct sim_thread *thread)
unsigned long long sim_time_t
M0_INTERNAL void sim_chan_signal(struct sim_chan *chan)
M0_INTERNAL unsigned long long sim_rnd(unsigned long long a, unsigned long long b)
static m0_bindex_t offset
M0_INTERNAL void * sim_alloc(size_t size)
M0_INTERNAL void elevator_io(struct elevator *el, enum storage_req_type type, sector_t sector, unsigned long count)
M0_INTERNAL void net_srv_init(struct sim *s, struct net_srv *srv)
M0_INTERNAL void net_init(struct net_conf *net)
struct storage_dev * e_dev
static long long min(long long a, long long b)
struct m0_stob_id nr_stob_id
M0_INTERNAL uint64_t m0_stob_id_dom_id_get(const struct m0_stob_id *stob_id)
M0_INTERNAL void net_rpc_send(struct sim_thread *t, struct net_rpc *rpc)
static void net_tx(struct sim_thread *t, struct net_conf *n, unsigned long nob, sim_time_t min, sim_time_t max)
unsigned long long ns_file_size
static struct m0_addb2_net * net
struct sim_chan nr_bulk_wait
unsigned long long nr_offset
M0_INTERNAL void net_rpc_init(struct net_rpc *rpc, struct net_conf *conf, struct net_srv *srv, struct m0_stob_id *stob_id, unsigned long long offset, unsigned long nob)
M0_INTERNAL void net_srv_fini(struct net_srv *srv)
static struct m0_addb2_source * s
static void net_leave(struct sim_thread *t, struct net_conf *n, unsigned long nob)
struct storage_conf * sd_conf
struct sim_chan ns_incoming
M0_INTERNAL void cnt_fini(struct cnt *cnt)
static struct net_srv srv
M0_INTERNAL void net_fini(struct net_conf *net)