Motr  M0
RPC service

Data Structures

struct  m0_rpc_service
 

Functions

 M0_TL_DESCR_DEFINE (rev_conn, "Reverse Connections", static, struct m0_reverse_connection, rcf_linkage, rcf_magic, M0_RM_REV_CONN_LIST_MAGIC, M0_RM_REV_CONN_LIST_HEAD_MAGIC)
 
 M0_TL_DEFINE (rev_conn, static, struct m0_reverse_connection)
 
 M0_BOB_DEFINE (M0_INTERNAL, &rpc_svc_bob, m0_rpc_service)
 
static int rpc_service_start (struct m0_reqh_service *service)
 
static void rpc_service_stop (struct m0_reqh_service *service)
 
static void rpc_service_fini (struct m0_reqh_service *service)
 
static int rpc_service_fop_accept (struct m0_reqh_service *service, struct m0_fop *fop)
 
static int rpc_service_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
M0_INTERNAL int m0_rpc_service_register (void)
 
M0_INTERNAL void m0_rpc_service_unregister (void)
 
M0_INTERNAL struct m0_rpc_sessionm0_rpc_service_reverse_session_lookup (struct m0_reqh_service *service, const struct m0_rpc_item *item)
 
M0_INTERNAL int m0_rpc_service_reverse_session_get (struct m0_reqh_service *service, const struct m0_rpc_item *item, struct m0_clink *clink, struct m0_rpc_session **session)
 
static void rev_conn_free (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool rev_conn_disconnected_cb (struct m0_clink *link)
 
M0_INTERNAL void m0_rpc_service_reverse_session_put (struct m0_rpc_session *sess)
 
M0_INTERNAL void m0_rpc_service_reverse_sessions_cleanup (struct m0_reqh_service *service)
 
M0_INTERNAL int m0_rpc_session_status (struct m0_rpc_session *session)
 
M0_INTERNAL struct m0_reqh_servicem0_reqh_rpc_service_find (struct m0_reqh *reqh)
 
M0_INTERNAL int m0_rpc_service_start (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_rpc_service_stop (struct m0_reqh *reqh)
 

Variables

static const struct m0_bob_type rpc_svc_bob
 
static const struct m0_reqh_service_ops rpc_ops
 
static const struct m0_reqh_service_type_ops rpc_service_type_ops
 
struct m0_reqh_service_type m0_rpc_service_type
 

Detailed Description

Function Documentation

◆ M0_BOB_DEFINE()

M0_BOB_DEFINE ( M0_INTERNAL  ,
rpc_svc_bob,
m0_rpc_service   
)

◆ m0_reqh_rpc_service_find()

M0_INTERNAL struct m0_reqh_service * m0_reqh_rpc_service_find ( struct m0_reqh reqh)

Definition at line 287 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_service_register()

M0_INTERNAL int m0_rpc_service_register ( void  )

Definition at line 128 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_service_reverse_session_get()

M0_INTERNAL int m0_rpc_service_reverse_session_get ( struct m0_reqh_service service,
const struct m0_rpc_item item,
struct m0_clink clink,
struct m0_rpc_session **  session 
)

Return reverse session to given item.

Precondition
svc != NULL
item != NULL && session != NULL

Definition at line 164 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_service_reverse_session_lookup()

M0_INTERNAL struct m0_rpc_session * m0_rpc_service_reverse_session_lookup ( struct m0_reqh_service service,
const struct m0_rpc_item item 
)

Definition at line 141 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_service_reverse_session_put()

M0_INTERNAL void m0_rpc_service_reverse_session_put ( struct m0_rpc_session sess)

Definition at line 220 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_service_reverse_sessions_cleanup()

M0_INTERNAL void m0_rpc_service_reverse_sessions_cleanup ( struct m0_reqh_service service)

Definition at line 243 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_service_start()

M0_INTERNAL int m0_rpc_service_start ( struct m0_reqh reqh)

Definition at line 292 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_service_stop()

M0_INTERNAL void m0_rpc_service_stop ( struct m0_reqh reqh)

Definition at line 300 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_service_unregister()

M0_INTERNAL void m0_rpc_service_unregister ( void  )

Definition at line 134 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_rpc_session_status()

M0_INTERNAL int m0_rpc_session_status ( struct m0_rpc_session session)

Definition at line 281 of file service.c.

Here is the caller graph for this function:

◆ M0_TL_DEFINE()

M0_TL_DEFINE ( rev_conn  ,
static  ,
struct m0_reverse_connection   
)

◆ M0_TL_DESCR_DEFINE()

M0_TL_DESCR_DEFINE ( rev_conn  ,
"Reverse Connections"  ,
static  ,
struct m0_reverse_connection  ,
rcf_linkage  ,
rcf_magic  ,
M0_RM_REV_CONN_LIST_MAGIC  ,
M0_RM_REV_CONN_LIST_HEAD_MAGIC   
)

◆ rev_conn_disconnected_cb()

static bool rev_conn_disconnected_cb ( struct m0_clink link)
static

Definition at line 206 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rev_conn_free()

static void rev_conn_free ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 195 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rpc_service_allocate()

static int rpc_service_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Definition at line 99 of file service.c.

Here is the call graph for this function:

◆ rpc_service_fini()

static void rpc_service_fini ( struct m0_reqh_service service)
static

Definition at line 77 of file service.c.

Here is the call graph for this function:

◆ rpc_service_fop_accept()

static int rpc_service_fop_accept ( struct m0_reqh_service service,
struct m0_fop fop 
)
static

Definition at line 87 of file service.c.

◆ rpc_service_start()

static int rpc_service_start ( struct m0_reqh_service service)
static

Definition at line 58 of file service.c.

◆ rpc_service_stop()

static void rpc_service_stop ( struct m0_reqh_service service)
static

Definition at line 68 of file service.c.

Here is the call graph for this function:

Variable Documentation

◆ m0_rpc_service_type

struct m0_reqh_service_type m0_rpc_service_type
Initial value:
= {
.rst_name = "rpcservice",
.rst_ops = &rpc_service_type_ops,
.rst_level = M0_RPC_SVC_LEVEL,
.rst_keep_alive = true,
}
static const struct m0_reqh_service_type_ops rpc_service_type_ops
Definition: service.c:116

Definition at line 120 of file service.c.

◆ rpc_ops

const struct m0_reqh_service_ops rpc_ops
static
Initial value:
= {
.rso_start = rpc_service_start,
.rso_stop = rpc_service_stop,
.rso_fini = rpc_service_fini,
.rso_fop_accept = rpc_service_fop_accept
}
static void rpc_service_fini(struct m0_reqh_service *service)
Definition: service.c:77
static void rpc_service_stop(struct m0_reqh_service *service)
Definition: service.c:68
static int rpc_service_fop_accept(struct m0_reqh_service *service, struct m0_fop *fop)
Definition: service.c:87
static int rpc_service_start(struct m0_reqh_service *service)
Definition: service.c:58

Definition at line 92 of file service.c.

◆ rpc_service_type_ops

const struct m0_reqh_service_type_ops rpc_service_type_ops
static
Initial value:
= {
.rsto_service_allocate = rpc_service_allocate
}
static int rpc_service_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: service.c:99

Definition at line 116 of file service.c.

◆ rpc_svc_bob

const struct m0_bob_type rpc_svc_bob
static
Initial value:
= {
.bt_name = "rpc service",
.bt_magix_offset = offsetof(struct m0_rpc_service, rps_magix),
.bt_magix = M0_RPC_SERVICE_MAGIC,
.bt_check = NULL
}
#define NULL
Definition: misc.h:38
#define offsetof(typ, memb)
Definition: misc.h:29

Definition at line 50 of file service.c.