23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 39 #include "rpc/ut/at/at_ut_xc.h" 53 #define SERVER_ENDPOINT_ADDR "0@lo:12345:34:1" 54 #define CLIENT_ENDPOINT_ADDR "0@lo:12345:34:2" 99 (*svc)->rs_type =
stype;
112 .rst_typecode = M0_CST_DS1
183 .sd_name =
"load-done",
187 .sd_name =
"prepare-reply",
199 return buf->b_nob == len &&
224 ret = ab->
u.ab_send.bdd_used == len;
227 ret = ab->
u.ab_recv.bdd_used == len;
230 ret = ab->
u.ab_rep.abr_len == len;
446 m0_xc_rpc_ut_at_at_ut_init();
468 m0_xc_rpc_ut_at_at_ut_fini();
544 .rhia_dtm = (
void *)1,
545 .rhia_mdstore = (
void *)1,
769 #undef M0_TRACE_SUBSYSTEM static m0_bcount_t seg_size
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_segment_size(struct m0_net_domain *dom)
static struct m0_rpc_conn * client_conn(void)
void m0_rpc_machine_fini(struct m0_rpc_machine *machine)
M0_INTERNAL int m0_reqh_service_start(struct m0_reqh_service *service)
bool reply_is_necessary(uint32_t test_id)
M0_INTERNAL void m0_reqh_services_terminate(struct m0_reqh *reqh)
struct m0_net_domain aur_net_dom
void m0_net_domain_fini(struct m0_net_domain *dom)
static void req_send(struct atut__req *req, struct atut__rep **rep)
M0_INTERNAL void m0_reqh_service_stop(struct m0_reqh_service *service)
static bool atdata_is_correct(const struct m0_buf *buf, uint32_t len)
#define M0_FOP_TYPE_INIT(ft,...)
#define M0_REQH_INIT(reqh,...)
static struct io_request req
int(* fo_tick)(struct m0_fom *fom)
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
M0_INTERNAL void m0_rpc_at_init(struct m0_rpc_at_buf *ab)
M0_INTERNAL void m0_reqh_service_prepare_to_stop(struct m0_reqh_service *service)
M0_INTERNAL bool m0_rpc_at_is_set(const struct m0_rpc_at_buf *ab)
M0_INTERNAL void atut__bufdata_alloc(struct m0_buf *buf, size_t size, struct m0_rpc_machine *rmach)
static struct m0_uint128 test_id
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
static struct m0_sm_state_descr atfom_phases[]
static const struct m0_fom_type_ops atfom_type_ops
struct m0_net_domain * ntm_dom
void * m0_fop_data(const struct m0_fop *fop)
void m0_fop_type_fini(struct m0_fop_type *fopt)
M0_INTERNAL void m0_sm_conf_extend(const struct m0_sm_state_descr *base, struct m0_sm_state_descr *sub, uint32_t nr)
M0_INTERNAL int m0_rpc_at_add(struct m0_rpc_at_buf *ab, const struct m0_buf *buf, const struct m0_rpc_conn *conn)
M0_INTERNAL int m0_pageshift_get(void)
struct m0_rpc_client_ctx acl_rpc_ctx
static struct m0_fop * g_reqfop
M0_INTERNAL int m0_rpc_at_load(struct m0_rpc_at_buf *ab, struct m0_fom *fom, int next_phase)
static struct m0_xcode_type ** xt[]
M0_INTERNAL void m0_reqh_fini(struct m0_reqh *reqh)
static int atfom_tick(struct m0_fom *fom0)
const struct m0_sm_conf m0_generic_conf
struct m0_fop_getxattr_rep * rep
static struct atut_reqh atreqh
static void req_fini(void)
M0_INTERNAL int m0_rpc_at_reply(struct m0_rpc_at_buf *in, struct m0_rpc_at_buf *out, struct m0_buf *repbuf, struct m0_fom *fom, int next_phase)
struct m0_fom_type ft_fom_type
struct m0_ut_suite rpc_at_ut
static void at_fops_fini(void)
M0_INTERNAL int m0_rpc_at_rep_get(struct m0_rpc_at_buf *sent, struct m0_rpc_at_buf *rcvd, struct m0_buf *out)
struct m0_rpc_machine aur_rmachine
void m0_fom_init(struct m0_fom *fom, const struct m0_fom_type *fom_type, const struct m0_fom_ops *ops, struct m0_fop *fop, struct m0_fop *reply, struct m0_reqh *reqh)
struct m0_fop_type * f_type
m0_bcount_t rm_bulk_cutoff
static void inbulk_recv_unk(void)
static struct m0_fop_type atbuf_req_fopt
static const struct socktype stype[]
static void atsvc_stop(struct m0_reqh_service *svc)
int m0_fom_tick_generic(struct m0_fom *fom)
static void inline_send(void)
void m0_fom_fini(struct m0_fom *fom)
struct m0_net_transfer_mc rm_tm
static m0_bcount_t at_seg_size
static int atfom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
static int atsvc_start(struct m0_reqh_service *svc)
M0_INTERNAL int m0_rpc_net_buffer_pool_setup(struct m0_net_domain *ndom, struct m0_net_buffer_pool *app_pool, uint32_t bufs_nr, uint32_t tm_nr)
M0_INTERNAL void m0_reqh_service_fini(struct m0_reqh_service *service)
#define CLIENT_ENDPOINT_ADDR
struct m0_rpc_conn rcx_connection
M0_INTERNAL uint32_t m0_rpc_bufs_nr(uint32_t len, uint32_t tms_nr)
int m0_rpc_client_stop(struct m0_rpc_client_ctx *cctx)
M0_INTERNAL int m0_rpc_at_get(const struct m0_rpc_at_buf *ab, struct m0_buf *buf)
M0_INTERNAL int m0_rpc_machine_init(struct m0_rpc_machine *machine, struct m0_net_domain *net_dom, const char *ep_addr, struct m0_reqh *reqh, struct m0_net_buffer_pool *receive_pool, uint32_t colour, m0_bcount_t msg_size, uint32_t queue_len)
struct m0_net_xprt * m0_net_xprt_default_get(void)
int m0_rpc_client_start(struct m0_rpc_client_ctx *cctx)
static void inbulk_send(void)
struct m0_rpc_item * ri_reply
M0_INTERNAL int m0_buf_alloc(struct m0_buf *buf, size_t size)
M0_INTERNAL int m0_rpc_at_reply_rc(struct m0_rpc_at_buf *out)
int m0_rpc_post_sync(struct m0_fop *fop, struct m0_rpc_session *session, const struct m0_rpc_item_ops *ri_ops, m0_time_t deadline)
M0_INTERNAL int m0_reqh_service_allocate(struct m0_reqh_service **out, const struct m0_reqh_service_type *stype, struct m0_reqh_context *rctx)
union m0_rpc_at_buf::@447 u
static void repbuf_fill(uint32_t test_id, struct m0_buf *buf)
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_size(struct m0_net_domain *dom)
static void reqh_init(void)
M0_INTERNAL void m0_reqh_service_init(struct m0_reqh_service *service, struct m0_reqh *reqh, const struct m0_fid *fid)
#define SERVER_ENDPOINT_ADDR
struct m0_net_domain * rcx_net_dom
static void inline_recv_unk(void)
static struct m0_fop_type atbuf_rep_fopt
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
struct m0_fop * m0_fop_reply_alloc(struct m0_fop *req, struct m0_fop_type *rept)
static void atsvc_fini(struct m0_reqh_service *svc)
uint64_t rcx_max_rpcs_in_flight
#define m0_forall(var, nr,...)
M0_INTERNAL void m0_reqh_start(struct m0_reqh *reqh)
static struct atut_clctx at_cctx
static void client_stop(void)
int(* rsto_service_allocate)(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
static void client_start(void)
struct m0_sm_state_descr * scf_state
static const struct m0_reqh_service_ops atsvc_ops
struct m0_rpc_session rcx_session
static void inline_recv(void)
static void at_fops_init(void)
static void reply_rc_check(uint32_t test_id, const struct m0_rpc_at_buf *ab, int rc)
struct m0_net_buffer_pool aur_buf_pool
M0_INTERNAL void m0_fop_release(struct m0_ref *ref)
static void reqh_start(void)
#define M0_ALLOC_PTR(ptr)
static void init_fini(void)
static struct m0_net_test_service svc
const char * rcx_remote_addr
static size_t atfom_home_locality(const struct m0_fom *fom)
M0_INTERNAL void m0_rpc_at_fini(struct m0_rpc_at_buf *ab)
void m0_fop_put_lock(struct m0_fop *fop)
static struct m0_fop * fop
static int atsvc_type_allocate(struct m0_reqh_service **svc, const struct m0_reqh_service_type *stype)
M0_INTERNAL void m0_reqh_idle_wait_for(struct m0_reqh *reqh, struct m0_reqh_service *service)
static struct m0_sm_conf at_sm_conf
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
static void reqbuf_check(uint32_t test_id, const struct m0_buf *buf, int rc)
static void reply_check(uint32_t test_id, const struct m0_rpc_at_buf *ab, int result)
const char * rcx_local_addr
struct m0_fop * fo_rep_fop
struct m0_rpc_machine rcx_rpc_machine
struct m0_net_domain acl_ndom
static void load_check(uint32_t test_id, const struct m0_rpc_at_buf *ab, int result)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
static void reqh_fini(void)
static void atfom_fini(struct m0_fom *fom0)
void m0_rpc_net_buffer_pool_cleanup(struct m0_net_buffer_pool *app_pool)
M0_INTERNAL void * m0_alloc_aligned(size_t size, unsigned shift)
static const struct m0_reqh_service_type_ops atsvc_type_ops
static void reqh_stop(void)
struct m0_rpc_item f_item
static bool atbuf_check(const struct m0_rpc_at_buf *ab, uint32_t len, enum m0_rpc_at_type type)
int(* rso_start_async)(struct m0_reqh_service_start_async_ctx *asc)
struct m0_fid g_process_fid
static struct m0_reqh_service * atsvc
const m0_time_t M0_TIME_IMMEDIATELY
static m0_bcount_t at_buf_size
static struct m0_reqh_service_type atsvc_type
static void inbulk_recv(void)
static void inline__recv(uint32_t test_id, uint32_t len)
M0_INTERNAL int m0_rpc_at_recv(struct m0_rpc_at_buf *ab, const struct m0_rpc_conn *conn, uint32_t len, bool force_bulk)
#define M0_IMPOSSIBLE(fmt,...)
static const struct m0_fom_ops atfom_ops