Motr
M0
|
Data Structures | |
struct | rpc_link_state_transition |
struct | m0_rpc_link |
Macros | |
#define | CONN_STATE(conn) ((conn)->c_sm.sm_state) |
#define | CONN_RC(conn) ((conn)->c_sm.sm_rc) |
#define | CONN_CHAN(conn) ((conn)->c_sm.sm_chan) |
#define | SESS_STATE(sess) ((sess)->s_sm.sm_state) |
#define | SESS_RC(sess) ((sess)->s_sm.sm_rc) |
#define | SESS_CHAN(sess) ((sess)->s_sm.sm_chan) |
Typedefs | |
typedef void(* | rpc_link_cb_t) (struct m0_rpc_link *, m0_time_t, struct m0_clink *) |
Enumerations | |
enum | m0_rpc_link_states { M0_RLS_INIT = M0_FOM_PHASE_INIT, M0_RLS_FINI = M0_FOM_PHASE_FINISH, M0_RLS_CONN_FAILURE, M0_RLS_SESS_FAILURE, M0_RLS_CONN_CONNECTING, M0_RLS_SESS_ESTABLISHING, M0_RLS_SESS_WAIT_IDLE, M0_RLS_SESS_TERMINATING, M0_RLS_CONN_TERMINATING } |
Functions | |
static int | rpc_link_conn_fom_tick (struct m0_fom *fom) |
static void | rpc_link_conn_fom_fini (struct m0_fom *fom) |
static int | rpc_link_disc_fom_tick (struct m0_fom *fom) |
static void | rpc_link_disc_fom_fini (struct m0_fom *fom) |
static size_t | rpc_link_fom_locality (const struct m0_fom *fom) |
static void | rpc_link_conn_fom_wait_on (struct m0_fom *fom, struct m0_rpc_link *rlink) |
static int | rpc_link_conn_establish (struct m0_rpc_link *rlink) |
static int | rpc_link_sess_establish (struct m0_rpc_link *rlink) |
static int | rpc_link_sess_established (struct m0_rpc_link *rlink) |
static int | rpc_link_disc_init (struct m0_rpc_link *rlink) |
static int | rpc_link_conn_terminate (struct m0_rpc_link *rlink) |
static int | rpc_link_conn_terminated (struct m0_rpc_link *rlink) |
static int | rpc_link_sess_terminate (struct m0_rpc_link *rlink) |
static void | rpc_link_sess_cleanup (struct m0_rpc_link *rlink) |
static int | rpc_link_conn_failure (struct m0_rpc_link *rlink) |
static int | rpc_link_sess_failure (struct m0_rpc_link *rlink) |
static void | rpc_link_sess_fom_wait_on (struct m0_fom *fom, struct m0_rpc_link *rlink) |
static void | rpc_link_fom_fini_common (struct m0_fom *fom, bool connected) |
M0_INTERNAL int | m0_rpc_link_module_init (void) |
M0_INTERNAL void | m0_rpc_link_module_fini (void) |
M0_INTERNAL int | m0_rpc_link_init (struct m0_rpc_link *rlink, struct m0_rpc_machine *mach, struct m0_fid *svc_fid, const char *ep, uint64_t max_rpcs_in_flight) |
M0_INTERNAL void | m0_rpc_link_fini (struct m0_rpc_link *rlink) |
M0_INTERNAL void | m0_rpc_link_reset (struct m0_rpc_link *rlink) |
static void | rpc_link_fom_queue (struct m0_rpc_link *rlink, struct m0_clink *wait_clink, const struct m0_fom_type *fom_type, const struct m0_fom_ops *fom_ops) |
static int | rpc_link_call_sync (struct m0_rpc_link *rlink, m0_time_t abs_timeout, rpc_link_cb_t cb) |
M0_INTERNAL void | m0_rpc_link_connect_async (struct m0_rpc_link *rlink, m0_time_t abs_timeout, struct m0_clink *wait_clink) |
M0_INTERNAL int | m0_rpc_link_connect_sync (struct m0_rpc_link *rlink, m0_time_t abs_timeout) |
M0_INTERNAL void | m0_rpc_link_disconnect_async (struct m0_rpc_link *rlink, m0_time_t abs_timeout, struct m0_clink *wait_clink) |
M0_INTERNAL int | m0_rpc_link_disconnect_sync (struct m0_rpc_link *rlink, m0_time_t abs_timeout) |
M0_INTERNAL bool | m0_rpc_link_is_connected (const struct m0_rpc_link *rlink) |
M0_INTERNAL const char * | m0_rpc_link_end_point (const struct m0_rpc_link *rlink) |
Variables | |
struct m0_fom_type | rpc_link_conn_fom_type |
struct m0_fom_type | rpc_link_disc_fom_type |
const struct m0_fom_ops | rpc_link_conn_fom_ops |
const struct m0_fom_ops | rpc_link_disc_fom_ops |
static const struct m0_fom_type_ops | rpc_link_conn_fom_type_ops |
static const struct m0_fom_type_ops | rpc_link_disc_fom_type_ops |
static struct rpc_link_state_transition | rpc_link_conn_states [] |
static struct rpc_link_state_transition | rpc_link_disc_states [] |
static struct m0_sm_state_descr | rpc_link_conn_state_descr [] |
static const struct m0_sm_conf | rpc_link_conn_sm_conf |
static struct m0_sm_state_descr | rpc_link_disc_state_descr [] |
static const struct m0_sm_conf | rpc_link_disc_sm_conf |
struct m0_reqh_service_type | m0_rpc_service_type |
#define CONN_STATE | ( | conn | ) | ((conn)->c_sm.sm_state) |
#define SESS_STATE | ( | sess | ) | ((sess)->s_sm.sm_state) |
typedef void(* rpc_link_cb_t) (struct m0_rpc_link *, m0_time_t, struct m0_clink *) |
enum m0_rpc_link_states |
M0_INTERNAL void m0_rpc_link_connect_async | ( | struct m0_rpc_link * | rlink, |
m0_time_t | abs_timeout, | ||
struct m0_clink * | wait_clink | ||
) |
M0_INTERNAL int m0_rpc_link_connect_sync | ( | struct m0_rpc_link * | rlink, |
m0_time_t | abs_timeout | ||
) |
M0_INTERNAL void m0_rpc_link_disconnect_async | ( | struct m0_rpc_link * | rlink, |
m0_time_t | abs_timeout, | ||
struct m0_clink * | wait_clink | ||
) |
M0_INTERNAL int m0_rpc_link_disconnect_sync | ( | struct m0_rpc_link * | rlink, |
m0_time_t | abs_timeout | ||
) |
M0_INTERNAL const char * m0_rpc_link_end_point | ( | const struct m0_rpc_link * | rlink | ) |
M0_INTERNAL void m0_rpc_link_fini | ( | struct m0_rpc_link * | rlink | ) |
M0_INTERNAL int m0_rpc_link_init | ( | struct m0_rpc_link * | rlink, |
struct m0_rpc_machine * | mach, | ||
struct m0_fid * | svc_fid, | ||
const char * | ep, | ||
uint64_t | max_rpcs_in_flight | ||
) |
Initialises an rpc_link object.
rlink | Rpc link object that encapsulates rpc_conn and rpc_session. |
ep | End point. |
timeout | Timeout for connection/session establishment/termination. |
Definition at line 605 of file link.c.
M0_INTERNAL bool m0_rpc_link_is_connected | ( | const struct m0_rpc_link * | rlink | ) |
M0_INTERNAL void m0_rpc_link_module_fini | ( | void | ) |
M0_INTERNAL int m0_rpc_link_module_init | ( | void | ) |
M0_INTERNAL void m0_rpc_link_reset | ( | struct m0_rpc_link * | rlink | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
struct m0_reqh_service_type m0_rpc_service_type |
const struct m0_fom_ops rpc_link_conn_fom_ops |
struct m0_fom_type rpc_link_conn_fom_type |
|
static |
|
static |
|
static |
|
static |
const struct m0_fom_ops rpc_link_disc_fom_ops |
struct m0_fom_type rpc_link_disc_fom_type |
|
static |
|
static |
|
static |
|
static |