Motr  M0
RPC
Collaboration diagram for RPC:

Modules

 Detailed Functional Specification for io bulk client.
 

Data Structures

struct  m0_rpc_frm_constraints
 
struct  m0_rpc_frm
 
struct  m0_rpc_frm_ops
 
struct  rpc_buffer
 
struct  m0_rpc_item
 
struct  m0_rpc_item_ops
 
struct  m0_rpc_item_type_ops
 
struct  m0_rpc_item_type
 
struct  m0_rpc_item_cache
 
struct  m0_rpc_item_source
 
struct  m0_rpc_item_source_ops
 
struct  m0_rpc_packet_onwire_header
 
struct  m0_rpc_packet_onwire_footer
 
struct  m0_rpc_item_header1
 
struct  m0_rpc_item_header2
 
struct  m0_rpc_item_footer
 
struct  m0_rpc_packet
 
struct  rpc_conn_holder
 
struct  m0_rpc_stats
 
struct  m0_rpc_machine
 
struct  m0_rpc_machine_watch
 
struct  m0_rpc_chan
 

Macros

#define frm_first_itemq(frm)   (&(frm)->f_itemq[0])
 
#define frm_end_itemq(frm)   (&(frm)->f_itemq[ARRAY_SIZE((frm)->f_itemq)])
 
#define for_each_itemq_in_frm(itemq, frm)
 
#define HEADER1_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_rpc_item_header1_xc, ptr)
 
#define HEADER2_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_rpc_item_header2_xc, ptr)
 
#define FOOTER_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_rpc_item_footer_xc, ptr)
 
#define ITEM_FMT   "%p [%s/%s(%u)]"
 
#define ITEM_ARG(item)
 
#define ITEM_HEAD1_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_rpc_item_header1_xc, ptr)
 
#define ITEM_HEAD2_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_rpc_item_header2_xc, ptr)
 
#define ITEM_FOOTER_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_rpc_item_footer_xc, ptr)
 
#define PACKHD_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_rpc_packet_onwire_header_xc, ptr)
 
#define PACKFT_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_rpc_packet_onwire_footer_xc, ptr)
 
#define for_each_item_in_packet(item, packet)   m0_tl_for(packet_item, &packet->rp_items, item)
 
#define end_for_each_item_in_packet   m0_tl_endfor
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_RPC
 
#define __MOTR_RPC_CORE_OPCODES_H__
 

Typedefs

typedef void item_visit_fn(struct m0_rpc_packet *packet, struct m0_rpc_item *item, int data)
 

Enumerations

enum  m0_avi_rpc_labels {
  M0_AVI_RPC_LOCK = M0_AVI_RPC_RANGE_START + 1, M0_AVI_RPC_REPLIED, M0_AVI_RPC_OUT_PHASE, M0_AVI_RPC_IN_PHASE,
  M0_AVI_RPC_ITEM_ID_ASSIGN, M0_AVI_RPC_ITEM_ID_FETCH, M0_AVI_RPC_BULK_OP, M0_AVI_RPC_ATTR_OPCODE,
  M0_AVI_RPC_ATTR_NR_SENT, M0_AVI_RPC_BULK_ATTR_OP, M0_AVI_RPC_BULK_ATTR_BUF_NR, M0_AVI_RPC_BULK_ATTR_BYTES,
  M0_AVI_RPC_BULK_ATTR_SEG_NR
}
 
enum  frm_state { FRM_UNINITIALISED, FRM_IDLE, FRM_BUSY, FRM_NR_STATES }
 
enum  m0_rpc_frm_itemq_type { FRMQ_URGENT, FRMQ_WAITING, FRMQ_NR_QUEUES }
 
enum  { M0_RPC_TMO = 8 }
 
enum  m0_rpc_item_priority { M0_RPC_ITEM_PRIO_MIN, M0_RPC_ITEM_PRIO_MID, M0_RPC_ITEM_PRIO_MAX, M0_RPC_ITEM_PRIO_NR }
 
enum  m0_rpc_item_state {
  M0_RPC_ITEM_UNINITIALISED, M0_RPC_ITEM_INITIALISED, M0_RPC_ITEM_ENQUEUED, M0_RPC_ITEM_URGENT,
  M0_RPC_ITEM_SENDING, M0_RPC_ITEM_SENT, M0_RPC_ITEM_WAITING_FOR_REPLY, M0_RPC_ITEM_REPLIED,
  M0_RPC_ITEM_ACCEPTED, M0_RPC_ITEM_FAILED, M0_RPC_ITEM_NR_STATES
}
 
enum  m0_rpc_item_dir { M0_RPC_ITEM_INCOMING, M0_RPC_ITEM_OUTGOING }
 
enum  m0_rpc_item_resend { M0_RPC_ITEM_RESEND_INTERVAL = 1, M0_RPC_ITEM_REPLY_CACHE_TMO = 100, M0_RPC_ITEM_REQ_CACHE_TMO = 100 }
 
enum  m0_rpc_item_flags { M0_RIF_DUP = 1 << 0, M0_RIF_REPLIED = 1 << 1 }
 
enum  m0_rpc_item_type_flags {
  M0_RPC_ITEM_TYPE_REQUEST = (1 << 0), M0_RPC_ITEM_TYPE_REPLY = (1 << 1), M0_RPC_ITEM_TYPE_ONEWAY = (1 << 2), M0_RPC_ITEM_TYPE_MUTABO = (1 << 3),
  M0_RPC_MUTABO_REQ = M0_RPC_ITEM_TYPE_MUTABO | M0_RPC_ITEM_TYPE_REQUEST
}
 
enum  { RIC_HASH_MASK = 0xff, RIC_HASH_SIZE = RIC_HASH_MASK + 1 }
 
enum  { M0_RPC_VERSION_1 = 1 }
 
enum  { M0_RPC_PACKET_FORMAT_VERSION_1 = 1, M0_RPC_PACKET_FORMAT_VERSION = M0_RPC_PACKET_FORMAT_VERSION_1, M0_RPC_ITEM_FORMAT_VERSION_1 = 1, M0_RPC_ITEM_FORMAT_VERSION = M0_RPC_ITEM_FORMAT_VERSION_1 }
 
enum  { DRAIN_INTERVAL = M0_MKTIME(5, 0), DRAIN_MAX = 128 }
 
enum  { M0_RPC_DEF_MAX_RPC_MSG_SIZE = 1 << 17 }
 
enum  M0_RPC_OPCODES {
  M0_CS_DS1_REQ_OPCODE = 3, M0_CS_DS1_REP_OPCODE = 4, M0_CS_DS2_REQ_OPCODE = 5, M0_CS_DS2_REP_OPCODE = 6,
  M0_CONS_FOP_DEVICE_OPCODE = 7, M0_CONS_FOP_REPLY_OPCODE = 8, M0_CONS_TEST = 9, M0_FOL_ANCHOR_TYPE_OPCODE = 10,
  M0_FOL_UT_OPCODE = 11, M0_FOP_ITERATOR_TEST_OPCODE = 12, M0_REQH_ERROR_REPLY_OPCODE = 13, M0_REQH_UT_DUMMY_OPCODE = 14,
  M0_STOB_IO_CREATE_REQ_OPCODE = 15, M0_STOB_IO_WRITE_REQ_OPCODE = 16, M0_STOB_IO_READ_REQ_OPCODE = 17, M0_STOB_IO_CREATE_REPLY_OPCODE = 18,
  M0_STOB_IO_WRITE_REPLY_OPCODE = 19, M0_STOB_IO_READ_REPLY_OPCODE = 20, M0_STOB_UT_WRITE_OPCODE = 21, M0_STOB_UT_READ_OPCODE = 22,
  M0_STOB_UT_CREATE_OPCODE = 23, M0_STOB_UT_WRITE_REPLY_OPCODE = 24, M0_STOB_UT_READ_REPLY_OPCODE = 25, M0_STOB_UT_CREATE_REPLY_OPCODE = 26,
  M0_STOB_UT_QUIT_OPCODE = 27, M0_RPC_PING_OPCODE = 28, M0_RPC_PING_REPLY_OPCODE = 29, M0_RPC_NOOP_OPCODE = 30,
  M0_RPC_ONWIRE_UT_OPCODE = 31, M0_RPC_CONN_ESTABLISH_OPCODE = 32, M0_RPC_CONN_ESTABLISH_REP_OPCODE = 33, M0_RPC_SESSION_ESTABLISH_OPCODE = 34,
  M0_RPC_SESSION_ESTABLISH_REP_OPCODE = 35, M0_RPC_SESSION_TERMINATE_OPCODE = 36, M0_RPC_SESSION_TERMINATE_REP_OPCODE = 37, M0_RPC_CONN_TERMINATE_OPCODE = 38,
  M0_RPC_CONN_TERMINATE_REP_OPCODE = 39, M0_NET_TEST_OPCODE = 40, M0_IOSERVICE_READV_OPCODE = 41, M0_IOSERVICE_WRITEV_OPCODE = 42,
  M0_IOSERVICE_READV_REP_OPCODE = 43, M0_IOSERVICE_WRITEV_REP_OPCODE = 44, M0_IOSERVICE_COB_CREATE_OPCODE = 45, M0_IOSERVICE_COB_DELETE_OPCODE = 46,
  M0_IOSERVICE_COB_TRUNCATE_OPCODE = 47, M0_IOSERVICE_COB_OP_REPLY_OPCODE = 48, M0_IOSERVICE_FV_NOTIFICATION_OPCODE = 49, M0_XCODE_UT_OPCODE = 50,
  M0_FOP_RDWR_OPCODE = 51, M0_FOP_RDWR_REPLY_OPCODE = 52, M0_CONF_FETCH_OPCODE = 53, M0_CONF_FETCH_RESP_OPCODE = 54,
  M0_CONF_UPDATE_OPCODE = 55, M0_CONF_UPDATE_RESP_OPCODE = 56, M0_MDSERVICE_CREATE_OPCODE = 57, M0_MDSERVICE_LOOKUP_OPCODE = 58,
  M0_MDSERVICE_LINK_OPCODE = 59, M0_MDSERVICE_UNLINK_OPCODE = 60, M0_MDSERVICE_RENAME_OPCODE = 61, M0_MDSERVICE_OPEN_OPCODE = 62,
  M0_MDSERVICE_CLOSE_OPCODE = 63, M0_MDSERVICE_SETATTR_OPCODE = 64, M0_MDSERVICE_GETATTR_OPCODE = 65, M0_MDSERVICE_SETXATTR_OPCODE = 66,
  M0_MDSERVICE_GETXATTR_OPCODE = 67, M0_MDSERVICE_DELXATTR_OPCODE = 68, M0_MDSERVICE_LISTXATTR_OPCODE = 69, M0_MDSERVICE_STATFS_OPCODE = 70,
  M0_MDSERVICE_READDIR_OPCODE = 71, M0_MDSERVICE_CREATE_REP_OPCODE = 72, M0_MDSERVICE_LOOKUP_REP_OPCODE = 73, M0_MDSERVICE_LINK_REP_OPCODE = 74,
  M0_MDSERVICE_UNLINK_REP_OPCODE = 75, M0_MDSERVICE_RENAME_REP_OPCODE = 76, M0_MDSERVICE_OPEN_REP_OPCODE = 77, M0_MDSERVICE_CLOSE_REP_OPCODE = 78,
  M0_MDSERVICE_SETATTR_REP_OPCODE = 79, M0_MDSERVICE_GETATTR_REP_OPCODE = 80, M0_MDSERVICE_STATFS_REP_OPCODE = 81, M0_MDSERVICE_READDIR_REP_OPCODE = 82,
  M0_MDSERVICE_SETXATTR_REP_OPCODE = 83, M0_MDSERVICE_GETXATTR_REP_OPCODE = 84, M0_MDSERVICE_DELXATTR_REP_OPCODE = 85, M0_MDSERVICE_LISTXATTR_REP_OPCODE = 86,
  M0_RPC_ARROW_OPCODE = 87, M0_RM_FOP_BORROW = 88, M0_RM_FOP_BORROW_REPLY = 89, M0_RM_FOP_REVOKE = 90,
  M0_RM_FOP_REVOKE_REPLY = 91, M0_RM_FOP_CANCEL = 92, M0_SNS_CM_REPAIR_CP_OPCODE = 93, M0_SNS_CM_REPAIR_CP_REP_OPCODE = 94,
  M0_SNS_CM_REBALANCE_CP_OPCODE = 95, M0_SNS_CM_REBALANCE_CP_REP_OPCODE = 96, M0_SNS_REPAIR_TRIGGER_OPCODE = 97, M0_SNS_REPAIR_TRIGGER_REP_OPCODE = 98,
  M0_SNS_REBALANCE_TRIGGER_OPCODE = 99, M0_SNS_REBALANCE_TRIGGER_REP_OPCODE = 100, M0_SNS_CM_REPAIR_SW_FOP_OPCODE = 101, M0_SNS_CM_REBALANCE_SW_FOP_OPCODE = 102,
  M0_RPC_UB_REQ_OPCODE = 103, M0_RPC_UB_RESP_OPCODE = 104, M0_POOLMACHINE_QUERY_OPCODE = 105, M0_POOLMACHINE_QUERY_REP_OPCODE = 106,
  M0_POOLMACHINE_SET_OPCODE = 107, M0_POOLMACHINE_SET_REP_OPCODE = 108, M0_STATS_UPDATE_FOP_OPCODE = 109, M0_STATS_QUERY_FOP_OPCODE = 110,
  M0_STATS_QUERY_REP_FOP_OPCODE = 111, M0_DTM_NOTIFICATION_OPCODE = 112, M0_DTM_UP_OPCODE = 113, M0_HA_NOTE_GET_OPCODE = 114,
  M0_HA_NOTE_GET_REP_OPCODE = 115, M0_HA_NOTE_SET_OPCODE = 116, M0_HA_ENTRYPOINT_REQ_OPCODE = 117, M0_HA_ENTRYPOINT_REP_OPCODE = 118,
  M0_FSYNC_MDS_OPCODE = 119, M0_FSYNC_MDS_REP_OPCODE = 120, M0_FSYNC_IOS_OPCODE = 121, M0_FSYNC_IOS_REP_OPCODE = 122,
  M0_FSYNC_CAS_OPCODE = 123, M0_FSYNC_CAS_REP_OPCODE = 124, M0_IOSERVICE_COB_GETATTR_OPCODE = 128, M0_IOSERVICE_COB_GETATTR_REP_OPCODE = 129,
  M0_IOSERVICE_COB_SETATTR_OPCODE = 130, M0_IOSERVICE_COB_SETATTR_REP_OPCODE = 131, M0_SPIEL_CONF_FILE_OPCODE = 138, M0_SPIEL_CONF_FILE_REP_OPCODE = 139,
  M0_SPIEL_CONF_FLIP_OPCODE = 140, M0_SPIEL_CONF_FLIP_REP_OPCODE = 141, M0_ADDB_FOP_OPCODE = 150, M0_REQH_UT_ALLOW_OPCODE = 151,
  M0_SNS_REPAIR_QUIESCE_OPCODE = 152, M0_SNS_REPAIR_QUIESCE_REP_OPCODE = 153, M0_SNS_REBALANCE_QUIESCE_OPCODE = 154, M0_SNS_REBALANCE_QUIESCE_REP_OPCODE = 155,
  M0_SNS_REPAIR_STATUS_OPCODE = 156, M0_SNS_REPAIR_STATUS_REP_OPCODE = 157, M0_SNS_REBALANCE_STATUS_OPCODE = 158, M0_SNS_REBALANCE_STATUS_REP_OPCODE = 159,
  M0_SNS_REPAIR_ABORT_OPCODE = 160, M0_SNS_REPAIR_ABORT_REP_OPCODE = 161, M0_SNS_REBALANCE_ABORT_OPCODE = 162, M0_SNS_REBALANCE_ABORT_REP_OPCODE = 163,
  M0_SNS_CM_REPAIR_SW_REP_FOP_OPCODE = 164, M0_SNS_CM_REBALANCE_SW_REP_FOP_OPCODE = 165, M0_FDMI_RECORD_NOT_OPCODE = 170, M0_FDMI_RECORD_NOT_REP_OPCODE = 171,
  M0_FDMI_RECORD_RELEASE_OPCODE = 172, M0_FDMI_RECORD_RELEASE_REP_OPCODE = 173, M0_FDMI_FILTERS_ENABLE_OPCODE = 174, M0_FDMI_FILTERS_ENABLE_REP_OPCODE = 175,
  M0_SSS_SVC_REQ_OPCODE = 200, M0_SSS_SVC_REP_OPCODE = 201, M0_SSS_PROCESS_REQ_OPCODE = 202, M0_SSS_PROCESS_REP_OPCODE = 203,
  M0_SSS_PROCESS_SVC_LIST_REP_OPCODE = 204, M0_SSS_DEVICE_REQ_OPCODE = 205, M0_SSS_DEVICE_REP_OPCODE = 206, M0_HA_LINK_MSG_REQ = 207,
  M0_HA_LINK_MSG_REP = 208, M0_RCONFC_HERD_LINK_OPCODE = 220, M0_CAS_GET_FOP_OPCODE = 230, M0_CAS_PUT_FOP_OPCODE = 231,
  M0_CAS_DEL_FOP_OPCODE = 232, M0_CAS_CUR_FOP_OPCODE = 233, M0_CAS_REP_FOP_OPCODE = 234, M0_CAS_GCW_FOP_OPCODE = 235,
  M0_CAS_GCF_FOP_OPCODE = 236, M0_FI_COMMAND_OPCODE = 260, M0_FI_COMMAND_REP_OPCODE = 261, M0_DIX_REPAIR_TRIGGER_OPCODE = 300,
  M0_DIX_REPAIR_QUIESCE_OPCODE = 301, M0_DIX_REPAIR_STATUS_OPCODE = 302, M0_DIX_REPAIR_ABORT_OPCODE = 303, M0_DIX_REPAIR_TRIGGER_REP_OPCODE = 304,
  M0_DIX_REPAIR_QUIESCE_REP_OPCODE = 305, M0_DIX_REPAIR_STATUS_REP_OPCODE = 306, M0_DIX_REPAIR_ABORT_REP_OPCODE = 307, M0_DIX_REBALANCE_TRIGGER_OPCODE = 308,
  M0_DIX_REBALANCE_QUIESCE_OPCODE = 309, M0_DIX_REBALANCE_STATUS_OPCODE = 310, M0_DIX_REBALANCE_TRIGGER_REP_OPCODE = 311, M0_DIX_REBALANCE_QUIESCE_REP_OPCODE = 312,
  M0_DIX_REBALANCE_STATUS_REP_OPCODE = 313, M0_DIX_REBALANCE_ABORT_OPCODE = 314, M0_DIX_REBALANCE_ABORT_REP_OPCODE = 315, M0_DIX_CM_REPAIR_SW_FOP_OPCODE = 316,
  M0_DIX_CM_REBALANCE_SW_FOP_OPCODE = 317, M0_DIX_CM_REPAIR_CP_OPCODE = 318, M0_DIX_CM_REPAIR_CP_REP_OPCODE = 319, M0_DIX_CM_REBALANCE_CP_OPCODE = 320,
  M0_DIX_CM_REBALANCE_CP_REP_OPCODE = 321, M0_DIX_CM_REPAIR_SW_REP_FOP_OPCODE = 322, M0_DIX_CM_REBALANCE_SW_REP_FOP_OPCODE = 323, M0_ISCSERVICE_REQ_OPCODE = 350,
  M0_ISCSERVICE_REP_OPCODE = 351, M0_DTM0_REQ_OPCODE = 450, M0_DTM0_REP_OPCODE = 451, M0_DTM0_REDO_OPCODE = 452,
  M0_FOM_OPCODE_START = 1024, M0_BE_TX_GROUP_OPCODE = 1025, M0_CM_UT_OPCODE = 1026, M0_CM_REBALANCE_OPCODE = 1030,
  M0_CM_REPAIR_OPCODE = 1034, M0_CM_UT_SENDER_OPCODE = 1038, M0_UB_FOM_OPCODE = 1042, M0_UT_RDWR_OPCODE = 1043,
  M0_UT_STATS_OPCODE = 1044, M0_UT_IOS_OPCODE = 1045, M0_RPC_LINK_CONN_OPCODE = 1046, M0_RPC_LINK_DISC_OPCODE = 1047,
  M0_HA_LINK_OUTGOING_OPCODE = 1048, M0_HA_ENTRYPOINT_CLIENT_OPCODE = 1049, M0_UT_RPC_AT_REQ_OPCODE = 1050, M0_UT_RPC_AT_REP_OPCODE = 1051,
  M0_UT_LEADER_FOM_OPCODE = 1052, M0_UT_FOLLOWER_FOM_OPCODE = 1053, M0_UT_TIMEDWAIT_FOM_OPCODE = 1054, M0_CM_DIX_REB_OPCODE = 1055,
  M0_CM_DIX_REP_OPCODE = 1060, M0_CM_DIX_REB_ITER_UT_OPCODE = 1065, M0_CM_DIX_REP_ITER_UT_OPCODE = 1066, M0_FDMI_PLUGIN_DOCK_OPCODE = 1070,
  M0_FDMI_SOURCE_DOCK_OPCODE = 1071, M0_ISCSERVICE_EXEC_OPCODE = 1072, M0_DTM0_RLINK_OPCODE = 1073, M0_FDMI_SOURCE_DOCK_TIMER_OPCODE = 1074,
  M0_OPCODES_NR = 2048
}
 

Functions

 M0_TL_DESCR_DEFINE (rpcbulk, "rpc bulk buffer list", M0_INTERNAL, struct m0_rpc_bulk_buf, bb_link, bb_magic, M0_RPC_BULK_BUF_MAGIC, M0_RPC_BULK_MAGIC)
 
 M0_TL_DEFINE (rpcbulk, M0_INTERNAL, struct m0_rpc_bulk_buf)
 
static bool rpc_bulk_buf_invariant (const struct m0_rpc_bulk_buf *rbuf)
 
static bool rpc_bulk_invariant (const struct m0_rpc_bulk *rbulk)
 
static void rpc_bulk_buf_deregister (struct m0_rpc_bulk_buf *buf)
 
static void rpc_bulk_buf_fini (struct m0_rpc_bulk_buf *rbuf)
 
static int rpc_bulk_buf_init (struct m0_rpc_bulk_buf *rbuf, uint32_t segs_nr, m0_bcount_t length, struct m0_net_buffer *nb)
 
M0_INTERNAL void m0_rpc_bulk_default_cb (const struct m0_net_buffer_event *evt)
 
M0_INTERNAL size_t m0_rpc_bulk_store_del_unqueued (struct m0_rpc_bulk *rbulk)
 
M0_INTERNAL void m0_rpc_bulk_store_del (struct m0_rpc_bulk *rbulk)
 
M0_INTERNAL void m0_rpc_bulk_init (struct m0_rpc_bulk *rbulk)
 
M0_INTERNAL void m0_rpc_bulk_fini (struct m0_rpc_bulk *rbulk)
 
M0_INTERNAL void m0_rpc_bulk_buflist_empty (struct m0_rpc_bulk *rbulk)
 
M0_INTERNAL int m0_rpc_bulk_buf_add (struct m0_rpc_bulk *rbulk, uint32_t segs_nr, m0_bcount_t length, struct m0_net_domain *netdom, struct m0_net_buffer *nb, struct m0_rpc_bulk_buf **out)
 
M0_INTERNAL int m0_rpc_bulk_buf_databuf_add (struct m0_rpc_bulk_buf *rbuf, void *buf, m0_bcount_t count, m0_bindex_t index, struct m0_net_domain *netdom)
 
M0_INTERNAL void m0_rpc_bulk_qtype (struct m0_rpc_bulk *rbulk, enum m0_net_queue_type q)
 
static void addb2_add_rpc_bulk_attr (struct m0_rpc_bulk *rbulk, enum m0_rpc_bulk_op_type op, uint32_t buf_nr, uint64_t seg_nr)
 
static int rpc_bulk_op (struct m0_rpc_bulk *rbulk, const struct m0_rpc_conn *conn, struct m0_net_buf_desc_data *descs, enum m0_rpc_bulk_op_type op, const struct m0_net_buffer_callbacks *bulk_cb)
 
M0_INTERNAL int m0_rpc_bulk_store (struct m0_rpc_bulk *rbulk, const struct m0_rpc_conn *conn, struct m0_net_buf_desc_data *to_desc, const struct m0_net_buffer_callbacks *bulk_cb)
 
M0_INTERNAL int m0_rpc_bulk_load (struct m0_rpc_bulk *rbulk, const struct m0_rpc_conn *conn, struct m0_net_buf_desc_data *from_desc, const struct m0_net_buffer_callbacks *bulk_cb)
 
M0_INTERNAL bool m0_rpc_bulk_is_empty (struct m0_rpc_bulk *rbulk)
 
M0_INTERNAL size_t m0_rpc_bulk_buf_length (struct m0_rpc_bulk *rbulk)
 
static bool itemq_invariant (const struct m0_tl *q)
 
static m0_bcount_t itemq_nr_bytes_acc (const struct m0_tl *q)
 
static enum m0_rpc_frm_itemq_type frm_which_qtype (struct m0_rpc_frm *frm, const struct m0_rpc_item *item)
 
static bool frm_is_idle (const struct m0_rpc_frm *frm)
 
static void frm_insert (struct m0_rpc_frm *frm, struct m0_rpc_item *item)
 
static void frm_remove (struct m0_rpc_frm *frm, struct m0_rpc_item *item)
 
static void __itemq_insert (struct m0_tl *q, struct m0_rpc_item *new_item)
 
static void __itemq_remove (struct m0_rpc_item *item)
 
static void frm_balance (struct m0_rpc_frm *frm)
 
static bool frm_is_ready (const struct m0_rpc_frm *frm)
 
static void frm_fill_packet (struct m0_rpc_frm *frm, struct m0_rpc_packet *p)
 
static void frm_fill_packet_from_item_sources (struct m0_rpc_frm *frm, struct m0_rpc_packet *p)
 
static int frm_packet_ready (struct m0_rpc_frm *frm, struct m0_rpc_packet *p)
 
static void frm_try_merging_item (struct m0_rpc_frm *frm, struct m0_rpc_item *item, m0_bcount_t limit)
 
static bool item_less_or_equal (const struct m0_rpc_item *i0, const struct m0_rpc_item *i1)
 
static void item_move_to_urgent_queue (struct m0_rpc_frm *frm, struct m0_rpc_item *item)
 
static m0_bcount_t available_space_in_packet (const struct m0_rpc_packet *p, const struct m0_rpc_frm *frm)
 
static bool item_will_exceed_packet_size (struct m0_rpc_item *item, const struct m0_rpc_packet *p, const struct m0_rpc_frm *frm)
 
static bool item_supports_merging (const struct m0_rpc_item *item)
 
static void drop_all_items (struct m0_rpc_frm *frm)
 
static bool constraints_are_valid (const struct m0_rpc_frm_constraints *constraints)
 
 M0_BASSERT (ARRAY_SIZE(str_qtype)==FRMQ_NR_QUEUES)
 
 M0_TL_DESCR_DEFINE (itemq, "rpc_itemq", M0_INTERNAL, struct m0_rpc_item, ri_iq_link, ri_magic, M0_RPC_ITEM_MAGIC, M0_RPC_ITEMQ_HEAD_MAGIC)
 
 M0_TL_DEFINE (itemq, M0_INTERNAL, struct m0_rpc_item)
 
static bool frm_invariant (const struct m0_rpc_frm *frm)
 
M0_INTERNAL struct m0_rpc_chanfrm_rchan (const struct m0_rpc_frm *frm)
 
M0_INTERNAL struct m0_rpc_machinefrm_rmachine (const struct m0_rpc_frm *frm)
 
static bool frm_rmachine_is_locked (const struct m0_rpc_frm *frm)
 
M0_INTERNAL void m0_rpc_frm_constraints_get_defaults (struct m0_rpc_frm_constraints *c)
 
M0_INTERNAL void m0_rpc_frm_init (struct m0_rpc_frm *frm, struct m0_rpc_frm_constraints *constraints, const struct m0_rpc_frm_ops *ops)
 
M0_INTERNAL void m0_rpc_frm_fini (struct m0_rpc_frm *frm)
 
M0_INTERNAL void m0_rpc_frm_enq_item (struct m0_rpc_frm *frm, struct m0_rpc_item *item)
 
M0_INTERNAL bool item_is_in_waiting_queue (const struct m0_rpc_item *item, const struct m0_rpc_frm *frm)
 
M0_INTERNAL void m0_rpc_frm_item_deadline_passed (struct m0_rpc_frm *frm, struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_frm_remove_item (struct m0_rpc_frm *frm, struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_frm_run_formation (struct m0_rpc_frm *frm)
 
M0_INTERNAL void m0_rpc_frm_packet_done (struct m0_rpc_packet *p)
 
M0_INTERNAL struct m0_rpc_frmsession_frm (const struct m0_rpc_session *s)
 
 M0_TL_DESCR_DECLARE (itemq, M0_EXTERN)
 
 M0_TL_DECLARE (itemq, M0_INTERNAL, struct m0_rpc_item)
 
static int packet_ready (struct m0_rpc_packet *p)
 
static int net_buffer_allocate (struct m0_net_buffer *netbuf, struct m0_net_domain *ndom, m0_bcount_t buf_size)
 
static void net_buffer_free (struct m0_net_buffer *netbuf, struct m0_net_domain *ndom)
 
static void bufvec_geometry (struct m0_net_domain *ndom, m0_bcount_t buf_size, int32_t *out_nr_segments, m0_bcount_t *out_segment_size)
 
static void item_done (struct m0_rpc_packet *p, struct m0_rpc_item *item, int rc)
 
static void item_fail (struct m0_rpc_packet *p, struct m0_rpc_item *item, int rc)
 
static void item_sent (struct m0_rpc_item *item)
 
 M0_BOB_DEFINE (static, &rpc_buffer_bob_type, rpc_buffer)
 
static int rpc_buffer_init (struct rpc_buffer *rpcbuf, struct m0_rpc_packet *p)
 
static int rpc_buffer_submit (struct rpc_buffer *rpcbuf)
 
static void rpc_buffer_fini (struct rpc_buffer *rpcbuf)
 
static void buf_send_cb (const struct m0_net_buffer_event *ev)
 
static struct m0_rpc_machinerpc_buffer__rmachine (const struct rpc_buffer *rpcbuf)
 
static int item_entered_in_urgent_state (struct m0_sm *mach)
 
static void item_timer_cb (struct m0_sm_timer *timer)
 
static void item_timedout (struct m0_rpc_item *item)
 
static void item_resend (struct m0_rpc_item *item)
 
static int item_reply_received (struct m0_rpc_item *reply, struct m0_rpc_item **req_out)
 
static bool item_reply_received_fi (struct m0_rpc_item *req, struct m0_rpc_item *reply)
 
static int req_replied (struct m0_rpc_item *req, struct m0_rpc_item *reply)
 
static void rpc_item_xid_unassign (struct m0_rpc_item *item)
 
 M0_TL_DESCR_DEFINE (rpcitem, "rpc item tlist", M0_INTERNAL, struct m0_rpc_item, ri_field, ri_magic, M0_RPC_ITEM_MAGIC, M0_RPC_ITEM_HEAD_MAGIC)
 
 M0_TL_DEFINE (rpcitem, M0_INTERNAL, struct m0_rpc_item)
 
 M0_TL_DESCR_DEFINE (rit, "rpc_item_type_descr", static, struct m0_rpc_item_type, rit_linkage, rit_magic, M0_RPC_ITEM_TYPE_MAGIC, M0_RPC_ITEM_TYPE_HEAD_MAGIC)
 
 M0_TL_DEFINE (rit, static, struct m0_rpc_item_type)
 
 M0_TL_DESCR_DEFINE (ric, "rpc item cache", M0_INTERNAL, struct m0_rpc_item, ri_cache_link, ri_magic, M0_RPC_ITEM_MAGIC, M0_RPC_ITEM_CACHE_HEAD_MAGIC)
 
 M0_TL_DEFINE (ric, M0_INTERNAL, struct m0_rpc_item)
 
 M0_TL_DESCR_DEFINE (pending_item, "pending-item-list", M0_INTERNAL, struct m0_rpc_item, ri_pending_link, ri_magic, M0_RPC_ITEM_MAGIC, M0_RPC_ITEM_PENDING_CACHE_HEAD_MAGIC)
 
 M0_TL_DEFINE (pending_item, M0_INTERNAL, struct m0_rpc_item)
 
 M0_TL_DESCR_DEFINE (xidl, "rpc session xid list", M0_INTERNAL, struct m0_rpc_item, ri_xid_link, ri_magic, M0_RPC_ITEM_MAGIC, M0_RPC_ITEM_XID_LIST_HEAD_MAGIC)
 
 M0_TL_DEFINE (xidl, M0_INTERNAL, struct m0_rpc_item)
 
static bool opcode_is_dup (uint32_t opcode)
 
M0_INTERNAL int m0_rpc_item_module_init (void)
 
M0_INTERNAL void m0_rpc_item_module_fini (void)
 
M0_INTERNAL void m0_rpc_item_type_register (struct m0_rpc_item_type *item_type)
 
M0_INTERNAL void m0_rpc_item_type_deregister (struct m0_rpc_item_type *item_type)
 
M0_INTERNAL struct m0_rpc_item_typem0_rpc_item_type_lookup (uint32_t opcode)
 
M0_INTERNAL bool m0_rpc_item_invariant (const struct m0_rpc_item *item)
 
M0_INTERNAL const char * item_state_name (const struct m0_rpc_item *item)
 
M0_INTERNAL const char * item_kind (const struct m0_rpc_item *item)
 
void m0_rpc_item_init (struct m0_rpc_item *item, const struct m0_rpc_item_type *itype)
 
void m0_rpc_item_fini (struct m0_rpc_item *item)
 
void m0_rpc_item_get (struct m0_rpc_item *item)
 
void m0_rpc_item_put (struct m0_rpc_item *item)
 
void m0_rpc_item_put_lock (struct m0_rpc_item *item)
 
m0_bcount_t m0_rpc_item_size (struct m0_rpc_item *item)
 
m0_bcount_t m0_rpc_item_payload_size (struct m0_rpc_item *item)
 
M0_INTERNAL bool m0_rpc_item_max_payload_exceeded (struct m0_rpc_item *item, struct m0_rpc_session *session)
 
M0_INTERNAL bool m0_rpc_item_is_update (const struct m0_rpc_item *item)
 
M0_INTERNAL bool m0_rpc_item_is_request (const struct m0_rpc_item *item)
 
M0_INTERNAL bool m0_rpc_item_is_reply (const struct m0_rpc_item *item)
 
M0_INTERNAL bool m0_rpc_item_is_oneway (const struct m0_rpc_item *item)
 
static bool rpc_item_needs_xid (const struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_xid_min_update (struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_xid_assign (struct m0_rpc_item *item)
 
M0_INTERNAL bool m0_rpc_item_xid_check (struct m0_rpc_item *item, struct m0_rpc_item **next)
 
M0_INTERNAL void m0_rpc_item_sm_init (struct m0_rpc_item *item, enum m0_rpc_item_dir dir)
 
M0_INTERNAL void m0_rpc_item_sm_fini (struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_change_state (struct m0_rpc_item *item, enum m0_rpc_item_state state)
 
M0_INTERNAL void m0_rpc_item_failed (struct m0_rpc_item *item, int32_t rc)
 
int m0_rpc_item_timedwait (struct m0_rpc_item *item, uint64_t states, m0_time_t timeout)
 
int m0_rpc_item_wait_for_reply (struct m0_rpc_item *item, m0_time_t timeout)
 
static void item_cancel_fi (struct m0_rpc_item *item)
 
void m0_rpc_item_cancel_nolock (struct m0_rpc_item *item)
 
void m0_rpc_item_cancel (struct m0_rpc_item *item)
 
void m0_rpc_item_cancel_init (struct m0_rpc_item *item)
 
int32_t m0_rpc_item_error (const struct m0_rpc_item *item)
 
M0_INTERNAL int m0_rpc_item_timer_start (struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_timer_stop (struct m0_rpc_item *item)
 
static int item_conn_test (struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_send (struct m0_rpc_item *item)
 
M0_INTERNAL const char * m0_rpc_item_remote_ep_addr (const struct m0_rpc_item *item)
 
M0_INTERNAL const char * m0_rpc_item_opname (const struct m0_rpc_item *item)
 
M0_INTERNAL const char * m0_rpc_item_type_name (const struct m0_rpc_item_type *item_type)
 
M0_INTERNAL int m0_rpc_item_received (struct m0_rpc_item *item, struct m0_rpc_machine *machine)
 
static void item__on_reply_postprocess (struct m0_rpc_item *item)
 
static void addb2_add_rpc_attrs (const struct m0_rpc_item *req)
 
M0_INTERNAL void m0_rpc_item_process_reply (struct m0_rpc_item *req, struct m0_rpc_item *reply)
 
M0_INTERNAL void m0_rpc_item_send_reply (struct m0_rpc_item *req, struct m0_rpc_item *reply)
 
M0_INTERNAL int m0_rpc_item_cache_init (struct m0_rpc_item_cache *ic, struct m0_mutex *lock)
 
M0_INTERNAL void m0_rpc_item_cache_fini (struct m0_rpc_item_cache *ic)
 
M0_INTERNAL bool m0_rpc_item_cache__invariant (struct m0_rpc_item_cache *ic)
 
M0_INTERNAL bool m0_rpc_item_cache_add (struct m0_rpc_item_cache *ic, struct m0_rpc_item *item, m0_time_t deadline)
 
static void rpc_item_cache_del (struct m0_rpc_item_cache *ic, struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_cache_del (struct m0_rpc_item_cache *ic, uint64_t xid)
 
M0_INTERNAL struct m0_rpc_itemm0_rpc_item_cache_lookup (struct m0_rpc_item_cache *ic, uint64_t xid)
 
M0_INTERNAL void m0_rpc_item_cache_purge (struct m0_rpc_item_cache *ic)
 
M0_INTERNAL void m0_rpc_item_cache_clear (struct m0_rpc_item_cache *ic)
 
M0_INTERNAL void m0_rpc_item_xid_list_init (struct m0_rpc_session *session)
 
M0_INTERNAL void m0_rpc_item_xid_list_fini (struct m0_rpc_session *session)
 
M0_INTERNAL void m0_rpc_item_pending_cache_init (struct m0_rpc_session *session)
 
static void pending_cache_drain (struct m0_rpc_session *session)
 
M0_INTERNAL void m0_rpc_item_pending_cache_fini (struct m0_rpc_session *session)
 
M0_INTERNAL void m0_rpc_item_pending_cache_add (struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_pending_cache_del (struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_replied_invoke (struct m0_rpc_item *req)
 
M0_INTERNAL void m0_rpc_item_sent_invoke (struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_item_ha_timer_stop (struct m0_rpc_item *item)
 
 M0_TL_DESCR_DEFINE (item_source, "item-source-list", M0_INTERNAL, struct m0_rpc_item_source, ris_tlink, ris_magic, M0_RPC_ITEM_SOURCE_MAGIC, M0_RPC_ITEM_SOURCE_HEAD_MAGIC)
 
 M0_TL_DEFINE (item_source, M0_INTERNAL, struct m0_rpc_item_source)
 
static bool item_source_invariant (const struct m0_rpc_item_source *ris)
 
void m0_rpc_item_source_init (struct m0_rpc_item_source *ris, const char *name, const struct m0_rpc_item_source_ops *ops)
 
void m0_rpc_item_source_fini (struct m0_rpc_item_source *ris)
 
bool m0_rpc_item_source_is_registered (const struct m0_rpc_item_source *ris)
 
void m0_rpc_item_source_register_locked (struct m0_rpc_conn *conn, struct m0_rpc_item_source *ris)
 
void m0_rpc_item_source_register (struct m0_rpc_conn *conn, struct m0_rpc_item_source *ris)
 
void m0_rpc_item_source_deregister (struct m0_rpc_item_source *ris)
 
M0_INTERNAL int m0_rpc_item_header1_encdec (struct m0_rpc_item_header1 *ioh, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
 
M0_INTERNAL int m0_rpc_item_header2_encdec (struct m0_rpc_item_header2 *ioh, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
 
M0_INTERNAL int m0_rpc_item_footer_encdec (struct m0_rpc_item_footer *iof, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
 
struct m0_rpc_packet_onwire_header M0_XCA_DOMAIN (rpc)
 
 M0_TL_DESCR_DEFINE (packet_item, "packet_item", M0_INTERNAL, struct m0_rpc_item, ri_plink, ri_magic, M0_RPC_ITEM_MAGIC, M0_RPC_PACKET_HEAD_MAGIC)
 
 M0_TL_DEFINE (packet_item, M0_INTERNAL, struct m0_rpc_item)
 
M0_INTERNAL m0_bcount_t m0_rpc_packet_onwire_header_size (void)
 
M0_INTERNAL m0_bcount_t m0_rpc_packet_onwire_footer_size (void)
 
M0_INTERNAL bool m0_rpc_packet_invariant (const struct m0_rpc_packet *p)
 
M0_INTERNAL void m0_rpc_packet_init (struct m0_rpc_packet *p, struct m0_rpc_machine *rmach)
 
M0_INTERNAL void m0_rpc_packet_fini (struct m0_rpc_packet *p)
 
M0_INTERNAL void m0_rpc_packet_discard (struct m0_rpc_packet *packet)
 
M0_INTERNAL void m0_rpc_packet_add_item (struct m0_rpc_packet *p, struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_packet_remove_item (struct m0_rpc_packet *p, struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_packet_remove_all_items (struct m0_rpc_packet *p)
 
M0_INTERNAL bool m0_rpc_packet_is_carrying_item (const struct m0_rpc_packet *p, const struct m0_rpc_item *item)
 
M0_INTERNAL bool m0_rpc_packet_is_empty (const struct m0_rpc_packet *p)
 
M0_INTERNAL int m0_rpc_packet_encode (struct m0_rpc_packet *p, struct m0_bufvec *bufvec)
 
static int packet_header_encdec (struct m0_rpc_packet_onwire_header *ph, struct m0_bufvec_cursor *cursor, enum m0_xcode_what what)
 
static int packet_footer_encdec (struct m0_rpc_packet_onwire_footer *pf, struct m0_bufvec_cursor *cursor, enum m0_xcode_what what)
 
static int item_encode (struct m0_rpc_item *item, struct m0_bufvec_cursor *cursor)
 
M0_INTERNAL int m0_rpc_packet_encode_using_cursor (struct m0_rpc_packet *packet, struct m0_bufvec_cursor *cursor)
 
M0_INTERNAL int m0_rpc_packet_decode (struct m0_rpc_packet *p, struct m0_bufvec *bufvec, m0_bindex_t off, m0_bcount_t len)
 
static int item_decode (struct m0_bufvec_cursor *cursor, struct m0_rpc_item **item_out)
 
M0_INTERNAL int m0_rpc_packet_decode_using_cursor (struct m0_rpc_packet *p, struct m0_bufvec_cursor *cursor, m0_bcount_t len)
 
M0_INTERNAL void m0_rpc_packet_traverse_items (struct m0_rpc_packet *p, item_visit_fn *visit, int opaque_data)
 
 M0_TL_DESCR_DECLARE (packet_item, M0_EXTERN)
 
 M0_TL_DECLARE (packet_item, M0_INTERNAL, struct m0_rpc_item)
 
M0_INTERNAL int m0_rpc_init (void)
 
M0_INTERNAL void m0_rpc_fini (void)
 
M0_INTERNAL int m0_rpc_post (struct m0_rpc_item *item)
 
M0_INTERNAL int m0_rpc__post_locked (struct m0_rpc_item *item)
 
void m0_rpc_reply_post (struct m0_rpc_item *request, struct m0_rpc_item *reply)
 
M0_INTERNAL void m0_rpc_oneway_item_post (const struct m0_rpc_conn *conn, struct m0_rpc_item *item)
 
M0_INTERNAL void m0_rpc_oneway_item_post_locked (const struct m0_rpc_conn *conn, struct m0_rpc_item *item)
 
M0_INTERNAL int m0_rpc_reply_timedwait (struct m0_clink *clink, const m0_time_t timeout)
 
static void rpc_buffer_pool_low (struct m0_net_buffer_pool *bp)
 
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)
 
void m0_rpc_net_buffer_pool_cleanup (struct m0_net_buffer_pool *app_pool)
 
M0_INTERNAL uint32_t m0_rpc_bufs_nr (uint32_t len, uint32_t tms_nr)
 
M0_INTERNAL m0_bcount_t m0_rpc_max_seg_size (struct m0_net_domain *ndom)
 
M0_INTERNAL uint32_t m0_rpc_max_segs_nr (struct m0_net_domain *ndom)
 
M0_INTERNAL m0_bcount_t m0_rpc_max_msg_size (struct m0_net_domain *ndom, m0_bcount_t rpc_size)
 
M0_INTERNAL uint32_t m0_rpc_max_recv_msgs (struct m0_net_domain *ndom, m0_bcount_t rpc_size)
 
M0_INTERNAL m0_time_t m0_rpc__down_timeout (void)
 
M0_INTERNAL int m0_rpc_session_module_init (void)
 
M0_INTERNAL void m0_rpc_session_module_fini (void)
 
M0_INTERNAL void rpc_worker_thread_fn (struct m0_rpc_machine *machine)
 
M0_INTERNAL int m0_rpc__fop_post (struct m0_fop *fop, struct m0_rpc_session *session, const struct m0_rpc_item_ops *ops, m0_time_t abs_timeout)
 
M0_INTERNAL int m0_rpc_item_dispatch (struct m0_rpc_item *item)
 
M0_INTERNAL uint64_t m0_rpc_id_generate (const struct m0_fid *uniq_fid)
 
M0_INTERNAL int m0_rpc_service_start (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_rpc_service_stop (struct m0_reqh *reqh)
 
 M0_TL_DESCR_DECLARE (item_source, M0_EXTERN)
 
 M0_TL_DECLARE (item_source, M0_INTERNAL, struct m0_rpc_item_source)
 
static struct m0_rpc_connitem2conn (const struct m0_rpc_item *item)
 
static void rpc_tm_cleanup (struct m0_rpc_machine *machine)
 
static int rpc_tm_setup (struct m0_net_transfer_mc *tm, struct m0_net_domain *net_dom, const char *ep_addr, struct m0_net_buffer_pool *pool, uint32_t colour, m0_bcount_t msg_size, uint32_t qlen)
 
static int __rpc_machine_init (struct m0_rpc_machine *machine)
 
static void __rpc_machine_fini (struct m0_rpc_machine *machine)
 
static struct m0_rpc_chanrpc_chan_locate (struct m0_rpc_machine *machine, struct m0_net_end_point *dest_ep)
 
static int rpc_chan_create (struct m0_rpc_chan **chan, struct m0_rpc_machine *machine, struct m0_net_end_point *dest_ep, uint64_t max_packets_in_flight)
 
static void rpc_chan_ref_release (struct m0_ref *ref)
 
static void rpc_recv_pool_buffer_put (struct m0_net_buffer *nb)
 
static void buf_recv_cb (const struct m0_net_buffer_event *ev)
 
static void net_buf_received (struct m0_net_buffer *nb, m0_bindex_t offset, m0_bcount_t length, struct m0_net_end_point *from_ep)
 
static void packet_received (struct m0_rpc_packet *p, struct m0_rpc_machine *machine, struct m0_net_end_point *from_ep)
 
static void item_received (struct m0_rpc_item *item, struct m0_net_end_point *from_ep)
 
static void net_buf_err (struct m0_net_buffer *nb, int32_t status)
 
 M0_BOB_DEFINE (, &rpc_machine_bob_type, m0_rpc_machine)
 
 M0_TL_DESCR_DEFINE (rpc_chan, "rpc_channels", static, struct m0_rpc_chan, rc_linkage, rc_magic, M0_RPC_CHAN_MAGIC, M0_RPC_CHAN_HEAD_MAGIC)
 
 M0_TL_DEFINE (rpc_chan, static, struct m0_rpc_chan)
 
 M0_TL_DESCR_DEFINE (rmach_watch, "rpc_machine_watch", M0_INTERNAL, struct m0_rpc_machine_watch, mw_linkage, mw_magic, M0_RPC_MACHINE_WATCH_MAGIC, M0_RPC_MACHINE_WATCH_HEAD_MAGIC)
 
 M0_TL_DEFINE (rmach_watch, M0_INTERNAL, struct m0_rpc_machine_watch)
 
 M0_TL_DESCR_DEFINE (rpc_conn, "rpc-conn", M0_INTERNAL, struct m0_rpc_conn, c_link, c_magic, M0_RPC_CONN_MAGIC, M0_RPC_CONN_HEAD_MAGIC)
 
 M0_TL_DEFINE (rpc_conn, M0_INTERNAL, struct m0_rpc_conn)
 
static void rpc_tm_event_cb (const struct m0_net_tm_event *ev)
 
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)
 
static void machine_nb_idle (struct m0_rpc_machine *machine)
 
void m0_rpc_machine_fini (struct m0_rpc_machine *machine)
 
static bool rpc_conn__on_finalised_cb (struct m0_clink *clink)
 
M0_INTERNAL void m0_rpc_machine_cleanup_incoming_connections (struct m0_rpc_machine *machine)
 
M0_INTERNAL void m0_rpc_machine_drain_item_sources (struct m0_rpc_machine *machine, uint32_t max_per_source)
 
static struct m0_rpc_machinetm_to_rpc_machine (const struct m0_net_transfer_mc *tm)
 
M0_INTERNAL void m0_rpc_machine_lock (struct m0_rpc_machine *machine)
 
M0_INTERNAL void m0_rpc_machine_unlock (struct m0_rpc_machine *machine)
 
M0_INTERNAL bool m0_rpc_machine_is_locked (const struct m0_rpc_machine *machine)
 
M0_INTERNAL bool m0_rpc_machine_is_not_locked (const struct m0_rpc_machine *machine)
 
static void __rpc_machine_get_stats (struct m0_rpc_machine *machine, struct m0_rpc_stats *stats, bool reset)
 
void m0_rpc_machine_get_stats (struct m0_rpc_machine *machine, struct m0_rpc_stats *stats, bool reset)
 
M0_INTERNAL const char * m0_rpc_machine_ep (const struct m0_rpc_machine *rmach)
 
M0_INTERNAL void m0_rpc_machine_add_conn (struct m0_rpc_machine *rmach, struct m0_rpc_conn *conn)
 
M0_INTERNAL struct m0_rpc_chanrpc_chan_get (struct m0_rpc_machine *machine, struct m0_net_end_point *dest_ep, uint64_t max_packets_in_flight)
 
M0_INTERNAL void rpc_chan_put (struct m0_rpc_chan *chan)
 
M0_INTERNAL struct m0_rpc_connm0_rpc_machine_find_conn (const struct m0_rpc_machine *machine, const struct m0_rpc_item *item)
 
static bool item_received_fi (struct m0_rpc_item *item)
 
void m0_rpc_machine_watch_attach (struct m0_rpc_machine_watch *watch)
 
void m0_rpc_machine_watch_detach (struct m0_rpc_machine_watch *watch)
 
 M0_BOB_DECLARE (extern, m0_rpc_machine)
 
 M0_TL_DESCR_DECLARE (rpc_conn, M0_EXTERN)
 
 M0_TL_DECLARE (rpc_conn, M0_INTERNAL, struct m0_rpc_conn)
 
 M0_TL_DESCR_DECLARE (rmach_watch, M0_EXTERN)
 
 M0_TL_DECLARE (rmach_watch, M0_INTERNAL, struct m0_rpc_machine_watch)
 
static int item_source_test_suite_init (void)
 
static int item_source_test_suite_fini (void)
 
static bool has_item (const struct m0_rpc_item_source *ris)
 
static struct m0_rpc_itemget_item (struct m0_rpc_item_source *ris, size_t max_payload_size)
 
static void conn_terminating (struct m0_rpc_item_source *ris)
 
static void item_source_basic_test (void)
 
static void item_source_limits_test (void)
 
static void item_source_test (void)
 
static void conn_terminating_cb_test (void)
 

Variables

enum m0_avi_rpc_labels M0_XCA_ENUM
 
const struct m0_net_buffer_callbacks m0_rpc__buf_bulk_cb
 
static const char * str_qtype []
 
const struct m0_rpc_frm_ops m0_rpc_frm_default_ops
 
const struct m0_rpc_frm_ops m0_rpc_frm_default_ops
 
static const struct m0_bob_type rpc_buffer_bob_type
 
static const struct m0_net_buffer_callbacks rpc_buf_send_cb
 
const struct m0_sm_conf outgoing_item_sm_conf
 
const struct m0_sm_conf incoming_item_sm_conf
 
static struct m0_tl rpc_item_types_list
 
static struct m0_rwlock rpc_item_types_lock
 
M0_INTERNAL m0_bcount_t m0_rpc_item_onwire_header_size
 
M0_INTERNAL m0_bcount_t m0_rpc_item_onwire_footer_size
 
static struct m0_sm_state_descr outgoing_item_states []
 
static struct m0_sm_state_descr incoming_item_states []
 
M0_EXTERN m0_bcount_t m0_rpc_item_onwire_header_size
 
M0_EXTERN m0_bcount_t m0_rpc_item_onwire_footer_size
 
struct m0_rpc_packet M0_XCA_DOMAIN
 
static const struct m0_net_buffer_pool_ops b_ops
 
static const struct m0_bob_type rpc_machine_bob_type
 
static const struct m0_net_buffer_callbacks rpc_buf_recv_cb
 
static struct m0_net_tm_callbacks m0_rpc_tm_callbacks
 
M0_INTERNAL void(* m0_rpc__item_dropped )(struct m0_rpc_item *item)
 
uint32_t m0_rpc__filter_opcode [4] = {}
 
enum M0_RPC_OPCODES M0_XCA_ENUM
 
static struct m0_rpc_connconn
 
static struct m0_rpc_itemitem
 
static int has_item_calls
 
static int get_item_calls
 
static bool conn_terminating_cb_called
 
static const struct m0_rpc_item_source_ops ris_ops
 
struct m0_ut_suite item_source_ut
 

Detailed Description

RPC layer abstraction over bulk IO.

This file is a centralized (temporary) location for opcodes. An opcode is an rpc item type attribute which uniquely identifies an rpc item type.

See also
rpc/rpccore.h

Macro Definition Documentation

◆ __MOTR_RPC_CORE_OPCODES_H__

#define __MOTR_RPC_CORE_OPCODES_H__

Definition at line 37 of file rpc_opcodes.h.

◆ end_for_each_item_in_packet

#define end_for_each_item_in_packet   m0_tl_endfor

Definition at line 77 of file packet_internal.h.

◆ FOOTER_XCODE_OBJ

#define FOOTER_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_rpc_item_footer_xc, ptr)

Definition at line 109 of file item.c.

◆ for_each_item_in_packet

#define for_each_item_in_packet (   item,
  packet 
)    m0_tl_for(packet_item, &packet->rp_items, item)

Definition at line 74 of file packet_internal.h.

◆ for_each_itemq_in_frm

#define for_each_itemq_in_frm (   itemq,
  frm 
)
Value:
for (itemq = frm_first_itemq(frm); \
itemq < frm_end_itemq(frm); \
++itemq)
#define frm_end_itemq(frm)
Definition: formation2.c:84
static struct m0_rpc_frm * frm
Definition: formation2.c:34
#define frm_first_itemq(frm)
Definition: formation2.c:83

Definition at line 86 of file formation2.c.

◆ frm_end_itemq

#define frm_end_itemq (   frm)    (&(frm)->f_itemq[ARRAY_SIZE((frm)->f_itemq)])

Definition at line 84 of file formation2.c.

◆ frm_first_itemq

#define frm_first_itemq (   frm)    (&(frm)->f_itemq[0])

Definition at line 83 of file formation2.c.

◆ HEADER1_XCODE_OBJ

#define HEADER1_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_rpc_item_header1_xc, ptr)

Definition at line 107 of file item.c.

◆ HEADER2_XCODE_OBJ

#define HEADER2_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_rpc_item_header2_xc, ptr)

Definition at line 108 of file item.c.

◆ ITEM_ARG

#define ITEM_ARG (   item)
Value:
((item)->ri_type != NULL ? (item)->ri_type->rit_opcode : 0)
#define NULL
Definition: misc.h:38
M0_INTERNAL const char * item_kind(const struct m0_rpc_item *item)
Definition: item.c:356
static struct m0_rpc_item * item
Definition: item.c:56
M0_INTERNAL const char * m0_rpc_item_opname(const struct m0_rpc_item *item)
Definition: item.c:1195

Definition at line 618 of file item.h.

◆ ITEM_FMT

#define ITEM_FMT   "%p [%s/%s(%u)]"

Definition at line 617 of file item.h.

◆ ITEM_FOOTER_XCODE_OBJ

#define ITEM_FOOTER_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_rpc_item_footer_xc, ptr)

Definition at line 40 of file onwire.c.

◆ ITEM_HEAD1_XCODE_OBJ

#define ITEM_HEAD1_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_rpc_item_header1_xc, ptr)

Definition at line 38 of file onwire.c.

◆ ITEM_HEAD2_XCODE_OBJ

#define ITEM_HEAD2_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_rpc_item_header2_xc, ptr)

Definition at line 39 of file onwire.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_RPC

Definition at line 29 of file rpc_machine.c.

◆ PACKFT_XCODE_OBJ

#define PACKFT_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_rpc_packet_onwire_footer_xc, ptr)

Definition at line 47 of file packet.c.

◆ PACKHD_XCODE_OBJ

#define PACKHD_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_rpc_packet_onwire_header_xc, ptr)

Definition at line 46 of file packet.c.

Typedef Documentation

◆ item_visit_fn

typedef void item_visit_fn(struct m0_rpc_packet *packet, struct m0_rpc_item *item, int data)

Definition at line 146 of file packet_internal.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
M0_RPC_TMO 

Definition at line 69 of file frmops.c.

◆ anonymous enum

anonymous enum
Enumerator
RIC_HASH_MASK 
RIC_HASH_SIZE 

Definition at line 523 of file item.h.

◆ anonymous enum

anonymous enum
Enumerator
M0_RPC_VERSION_1 

Definition at line 41 of file onwire.h.

◆ anonymous enum

anonymous enum
Enumerator
M0_RPC_PACKET_FORMAT_VERSION_1 
M0_RPC_PACKET_FORMAT_VERSION 

Current version, should point to the latest M0_RPC_PACKET_FORMAT_VERSION_*

M0_RPC_ITEM_FORMAT_VERSION_1 
M0_RPC_ITEM_FORMAT_VERSION 

Definition at line 45 of file onwire.h.

◆ anonymous enum

anonymous enum
Enumerator
DRAIN_INTERVAL 

RPC worker thread drains item sources no more than once per this interval.

DRAIN_MAX 

Maximum number of items that can be drained from each source at a time.

Definition at line 365 of file rpc_machine.c.

◆ anonymous enum

anonymous enum
Enumerator
M0_RPC_DEF_MAX_RPC_MSG_SIZE 

Default Maximum RPC message size is taken as 128k

Definition at line 48 of file rpc_machine.h.

◆ frm_state

enum frm_state

Possible states of formation state machine.

See also
m0_rpc_frm::f_state
Enumerator
FRM_UNINITIALISED 
FRM_IDLE 

There are no pending items in the formation queue AND No callback is pending

See also
frm_is_idle()
FRM_BUSY 

There are few items waiting in the formation queue OR some packet done callbacks are yet to be received.

FRM_NR_STATES 

Definition at line 126 of file formation2_internal.h.

◆ m0_avi_rpc_labels

Enumerator
M0_AVI_RPC_LOCK 
M0_AVI_RPC_REPLIED 
M0_AVI_RPC_OUT_PHASE 
M0_AVI_RPC_IN_PHASE 
M0_AVI_RPC_ITEM_ID_ASSIGN 
M0_AVI_RPC_ITEM_ID_FETCH 
M0_AVI_RPC_BULK_OP 
M0_AVI_RPC_ATTR_OPCODE 
M0_AVI_RPC_ATTR_NR_SENT 
M0_AVI_RPC_BULK_ATTR_OP 
M0_AVI_RPC_BULK_ATTR_BUF_NR 
M0_AVI_RPC_BULK_ATTR_BYTES 
M0_AVI_RPC_BULK_ATTR_SEG_NR 

Definition at line 37 of file addb2.h.

◆ m0_rpc_frm_itemq_type

Formation partitions RPC items in these types of queues. An item can migrate from one queue to another depending on its state.

URGENT_* are the queues which contain items whose deadline has been passed. These items should be sent as soon as possible.

WAITING_* are the queues which contain items whose deadline is not yet reached. An item from these queues can be picked for formation even before its deadline is passed.

Enumerator
FRMQ_URGENT 
FRMQ_WAITING 
FRMQ_NR_QUEUES 

Definition at line 150 of file formation2_internal.h.

◆ m0_rpc_item_dir

RPC item direction.

Enumerator
M0_RPC_ITEM_INCOMING 
M0_RPC_ITEM_OUTGOING 

Definition at line 109 of file item.h.

◆ m0_rpc_item_flags

Enumerator
M0_RIF_DUP 

Item is being sent not for the first time.

RPC sets this field internally, when the item is resent.

M0_RIF_REPLIED 

Sender already has the reply.

Definition at line 243 of file item.h.

◆ m0_rpc_item_priority

Enumerator
M0_RPC_ITEM_PRIO_MIN 
M0_RPC_ITEM_PRIO_MID 
M0_RPC_ITEM_PRIO_MAX 
M0_RPC_ITEM_PRIO_NR 

Definition at line 51 of file item.h.

◆ m0_rpc_item_resend

Enumerator
M0_RPC_ITEM_RESEND_INTERVAL 
Todo:
Provide proper value for re-send interval
M0_RPC_ITEM_REPLY_CACHE_TMO 
M0_RPC_ITEM_REQ_CACHE_TMO 

Definition at line 114 of file item.h.

◆ m0_rpc_item_state

Enumerator
M0_RPC_ITEM_UNINITIALISED 
M0_RPC_ITEM_INITIALISED 
M0_RPC_ITEM_ENQUEUED 

Item is in one of the WAITING_ queues maintained by formation. The item is waiting to be selected by formation machine for sending on the network.

M0_RPC_ITEM_URGENT 

Deadline of item is expired. Item is in one of URGENT_* queues maintained by formation. Formation should send the item as early as possible.

M0_RPC_ITEM_SENDING 

Item is serialised in a network buffer and the buffer is submitted to network layer for sending.

M0_RPC_ITEM_SENT 

The item is successfully placed on the network. Note that it does not state anything about whether the item is received or not.

M0_RPC_ITEM_WAITING_FOR_REPLY 

Only request items which are successfully sent over the wire can be in this state. Request item in this state is expecting a reply.

M0_RPC_ITEM_REPLIED 

When a reply is received for a request item, RPC moves the request item to REPLIED state.

M0_RPC_ITEM_ACCEPTED 

Received item is valid and is accepted.

M0_RPC_ITEM_FAILED 

Item is failed.

M0_RPC_ITEM_NR_STATES 

Definition at line 58 of file item.h.

◆ m0_rpc_item_type_flags

Possible values for m0_rpc_item_type::rit_flags. Flags M0_RPC_ITEM_TYPE_REQUEST, M0_RPC_ITEM_TYPE_REPLY and M0_RPC_ITEM_TYPE_ONEWAY are mutually exclusive.

Enumerator
M0_RPC_ITEM_TYPE_REQUEST 

Receiver of item is expected to send reply to item of this type

M0_RPC_ITEM_TYPE_REPLY 

Item of this type is reply to some item of M0_RPC_ITEM_TYPE_REQUEST type.

M0_RPC_ITEM_TYPE_ONEWAY 

This is a one-way item. There is no reply for this type of item

M0_RPC_ITEM_TYPE_MUTABO 

Item of this type can modify file-system state on receiver.

M0_RPC_MUTABO_REQ 

Definition at line 447 of file item.h.

◆ M0_RPC_OPCODES

Enumerator
M0_CS_DS1_REQ_OPCODE 

Motr setup rpc

M0_CS_DS1_REP_OPCODE 
M0_CS_DS2_REQ_OPCODE 
M0_CS_DS2_REP_OPCODE 
M0_CONS_FOP_DEVICE_OPCODE 

Console rpc

M0_CONS_FOP_REPLY_OPCODE 
M0_CONS_TEST 
M0_FOL_ANCHOR_TYPE_OPCODE 

Fol rpc

M0_FOL_UT_OPCODE 
M0_FOP_ITERATOR_TEST_OPCODE 

Fop iterator rpc

M0_REQH_ERROR_REPLY_OPCODE 

Request handler rpc

M0_REQH_UT_DUMMY_OPCODE 
M0_STOB_IO_CREATE_REQ_OPCODE 

Stob IO rpc

M0_STOB_IO_WRITE_REQ_OPCODE 
M0_STOB_IO_READ_REQ_OPCODE 
M0_STOB_IO_CREATE_REPLY_OPCODE 
M0_STOB_IO_WRITE_REPLY_OPCODE 
M0_STOB_IO_READ_REPLY_OPCODE 
M0_STOB_UT_WRITE_OPCODE 
M0_STOB_UT_READ_OPCODE 
M0_STOB_UT_CREATE_OPCODE 
M0_STOB_UT_WRITE_REPLY_OPCODE 
M0_STOB_UT_READ_REPLY_OPCODE 
M0_STOB_UT_CREATE_REPLY_OPCODE 
M0_STOB_UT_QUIT_OPCODE 
M0_RPC_PING_OPCODE 

RPC module

M0_RPC_PING_REPLY_OPCODE 
M0_RPC_NOOP_OPCODE 
M0_RPC_ONWIRE_UT_OPCODE 
M0_RPC_CONN_ESTABLISH_OPCODE 
M0_RPC_CONN_ESTABLISH_REP_OPCODE 
M0_RPC_SESSION_ESTABLISH_OPCODE 
M0_RPC_SESSION_ESTABLISH_REP_OPCODE 
M0_RPC_SESSION_TERMINATE_OPCODE 
M0_RPC_SESSION_TERMINATE_REP_OPCODE 
M0_RPC_CONN_TERMINATE_OPCODE 
M0_RPC_CONN_TERMINATE_REP_OPCODE 
M0_NET_TEST_OPCODE 

Network rpc

M0_IOSERVICE_READV_OPCODE 

I/O service read & write

M0_IOSERVICE_WRITEV_OPCODE 
M0_IOSERVICE_READV_REP_OPCODE 
M0_IOSERVICE_WRITEV_REP_OPCODE 
M0_IOSERVICE_COB_CREATE_OPCODE 

I/O service cob creation, deletion, truncation

M0_IOSERVICE_COB_DELETE_OPCODE 
M0_IOSERVICE_COB_TRUNCATE_OPCODE 
M0_IOSERVICE_COB_OP_REPLY_OPCODE 
M0_IOSERVICE_FV_NOTIFICATION_OPCODE 
M0_XCODE_UT_OPCODE 

Xcode rpc

M0_FOP_RDWR_OPCODE 

FOP module

M0_FOP_RDWR_REPLY_OPCODE 
M0_CONF_FETCH_OPCODE 

Configuration rpc

M0_CONF_FETCH_RESP_OPCODE 
M0_CONF_UPDATE_OPCODE 
M0_CONF_UPDATE_RESP_OPCODE 
M0_MDSERVICE_CREATE_OPCODE 
M0_MDSERVICE_LOOKUP_OPCODE 
M0_MDSERVICE_LINK_OPCODE 
M0_MDSERVICE_UNLINK_OPCODE 
M0_MDSERVICE_RENAME_OPCODE 
M0_MDSERVICE_OPEN_OPCODE 
M0_MDSERVICE_CLOSE_OPCODE 
M0_MDSERVICE_SETATTR_OPCODE 
M0_MDSERVICE_GETATTR_OPCODE 
M0_MDSERVICE_SETXATTR_OPCODE 
M0_MDSERVICE_GETXATTR_OPCODE 
M0_MDSERVICE_DELXATTR_OPCODE 
M0_MDSERVICE_LISTXATTR_OPCODE 
M0_MDSERVICE_STATFS_OPCODE 
M0_MDSERVICE_READDIR_OPCODE 
M0_MDSERVICE_CREATE_REP_OPCODE 
M0_MDSERVICE_LOOKUP_REP_OPCODE 
M0_MDSERVICE_LINK_REP_OPCODE 
M0_MDSERVICE_UNLINK_REP_OPCODE 
M0_MDSERVICE_RENAME_REP_OPCODE 
M0_MDSERVICE_OPEN_REP_OPCODE 
M0_MDSERVICE_CLOSE_REP_OPCODE 
M0_MDSERVICE_SETATTR_REP_OPCODE 
M0_MDSERVICE_GETATTR_REP_OPCODE 
M0_MDSERVICE_STATFS_REP_OPCODE 
M0_MDSERVICE_READDIR_REP_OPCODE 
M0_MDSERVICE_SETXATTR_REP_OPCODE 
M0_MDSERVICE_GETXATTR_REP_OPCODE 
M0_MDSERVICE_DELXATTR_REP_OPCODE 
M0_MDSERVICE_LISTXATTR_REP_OPCODE 
M0_RPC_ARROW_OPCODE 
M0_RM_FOP_BORROW 

Resource manager opcodes

M0_RM_FOP_BORROW_REPLY 
M0_RM_FOP_REVOKE 
M0_RM_FOP_REVOKE_REPLY 
M0_RM_FOP_CANCEL 
M0_SNS_CM_REPAIR_CP_OPCODE 
M0_SNS_CM_REPAIR_CP_REP_OPCODE 
M0_SNS_CM_REBALANCE_CP_OPCODE 
M0_SNS_CM_REBALANCE_CP_REP_OPCODE 
M0_SNS_REPAIR_TRIGGER_OPCODE 
M0_SNS_REPAIR_TRIGGER_REP_OPCODE 
M0_SNS_REBALANCE_TRIGGER_OPCODE 
M0_SNS_REBALANCE_TRIGGER_REP_OPCODE 
M0_SNS_CM_REPAIR_SW_FOP_OPCODE 
M0_SNS_CM_REBALANCE_SW_FOP_OPCODE 
M0_RPC_UB_REQ_OPCODE 
M0_RPC_UB_RESP_OPCODE 
M0_POOLMACHINE_QUERY_OPCODE 
M0_POOLMACHINE_QUERY_REP_OPCODE 
M0_POOLMACHINE_SET_OPCODE 
M0_POOLMACHINE_SET_REP_OPCODE 
M0_STATS_UPDATE_FOP_OPCODE 
M0_STATS_QUERY_FOP_OPCODE 
M0_STATS_QUERY_REP_FOP_OPCODE 
M0_DTM_NOTIFICATION_OPCODE 
M0_DTM_UP_OPCODE 
M0_HA_NOTE_GET_OPCODE 
M0_HA_NOTE_GET_REP_OPCODE 
M0_HA_NOTE_SET_OPCODE 
M0_HA_ENTRYPOINT_REQ_OPCODE 
M0_HA_ENTRYPOINT_REP_OPCODE 
M0_FSYNC_MDS_OPCODE 
M0_FSYNC_MDS_REP_OPCODE 
M0_FSYNC_IOS_OPCODE 
M0_FSYNC_IOS_REP_OPCODE 
M0_FSYNC_CAS_OPCODE 
M0_FSYNC_CAS_REP_OPCODE 
M0_IOSERVICE_COB_GETATTR_OPCODE 
M0_IOSERVICE_COB_GETATTR_REP_OPCODE 
M0_IOSERVICE_COB_SETATTR_OPCODE 
M0_IOSERVICE_COB_SETATTR_REP_OPCODE 
M0_SPIEL_CONF_FILE_OPCODE 

Spiel opcodes

M0_SPIEL_CONF_FILE_REP_OPCODE 
M0_SPIEL_CONF_FLIP_OPCODE 
M0_SPIEL_CONF_FLIP_REP_OPCODE 
M0_ADDB_FOP_OPCODE 

ADDB2

M0_REQH_UT_ALLOW_OPCODE 
M0_SNS_REPAIR_QUIESCE_OPCODE 
M0_SNS_REPAIR_QUIESCE_REP_OPCODE 
M0_SNS_REBALANCE_QUIESCE_OPCODE 
M0_SNS_REBALANCE_QUIESCE_REP_OPCODE 
M0_SNS_REPAIR_STATUS_OPCODE 
M0_SNS_REPAIR_STATUS_REP_OPCODE 
M0_SNS_REBALANCE_STATUS_OPCODE 
M0_SNS_REBALANCE_STATUS_REP_OPCODE 
M0_SNS_REPAIR_ABORT_OPCODE 
M0_SNS_REPAIR_ABORT_REP_OPCODE 
M0_SNS_REBALANCE_ABORT_OPCODE 
M0_SNS_REBALANCE_ABORT_REP_OPCODE 
M0_SNS_CM_REPAIR_SW_REP_FOP_OPCODE 
M0_SNS_CM_REBALANCE_SW_REP_FOP_OPCODE 
M0_FDMI_RECORD_NOT_OPCODE 

FDMI opcodes

M0_FDMI_RECORD_NOT_REP_OPCODE 
M0_FDMI_RECORD_RELEASE_OPCODE 
M0_FDMI_RECORD_RELEASE_REP_OPCODE 
M0_FDMI_FILTERS_ENABLE_OPCODE 
M0_FDMI_FILTERS_ENABLE_REP_OPCODE 
M0_SSS_SVC_REQ_OPCODE 

SSS Service fops

M0_SSS_SVC_REP_OPCODE 
M0_SSS_PROCESS_REQ_OPCODE 

SSS process fops

M0_SSS_PROCESS_REP_OPCODE 
M0_SSS_PROCESS_SVC_LIST_REP_OPCODE 
M0_SSS_DEVICE_REQ_OPCODE 

SSS device fops

M0_SSS_DEVICE_REP_OPCODE 
M0_HA_LINK_MSG_REQ 

HA link opcodes

M0_HA_LINK_MSG_REP 
M0_RCONFC_HERD_LINK_OPCODE 

RCONFC fops.

M0_CAS_GET_FOP_OPCODE 

CAS fops.

M0_CAS_PUT_FOP_OPCODE 
M0_CAS_DEL_FOP_OPCODE 
M0_CAS_CUR_FOP_OPCODE 
M0_CAS_REP_FOP_OPCODE 
M0_CAS_GCW_FOP_OPCODE 
M0_CAS_GCF_FOP_OPCODE 
M0_FI_COMMAND_OPCODE 

Fault Injection command fops.

M0_FI_COMMAND_REP_OPCODE 
M0_DIX_REPAIR_TRIGGER_OPCODE 

DIX repare rebalance fops.

M0_DIX_REPAIR_QUIESCE_OPCODE 
M0_DIX_REPAIR_STATUS_OPCODE 
M0_DIX_REPAIR_ABORT_OPCODE 
M0_DIX_REPAIR_TRIGGER_REP_OPCODE 
M0_DIX_REPAIR_QUIESCE_REP_OPCODE 
M0_DIX_REPAIR_STATUS_REP_OPCODE 
M0_DIX_REPAIR_ABORT_REP_OPCODE 
M0_DIX_REBALANCE_TRIGGER_OPCODE 
M0_DIX_REBALANCE_QUIESCE_OPCODE 
M0_DIX_REBALANCE_STATUS_OPCODE 
M0_DIX_REBALANCE_TRIGGER_REP_OPCODE 
M0_DIX_REBALANCE_QUIESCE_REP_OPCODE 
M0_DIX_REBALANCE_STATUS_REP_OPCODE 
M0_DIX_REBALANCE_ABORT_OPCODE 
M0_DIX_REBALANCE_ABORT_REP_OPCODE 
M0_DIX_CM_REPAIR_SW_FOP_OPCODE 
M0_DIX_CM_REBALANCE_SW_FOP_OPCODE 
M0_DIX_CM_REPAIR_CP_OPCODE 
M0_DIX_CM_REPAIR_CP_REP_OPCODE 
M0_DIX_CM_REBALANCE_CP_OPCODE 
M0_DIX_CM_REBALANCE_CP_REP_OPCODE 
M0_DIX_CM_REPAIR_SW_REP_FOP_OPCODE 
M0_DIX_CM_REBALANCE_SW_REP_FOP_OPCODE 
M0_ISCSERVICE_REQ_OPCODE 
M0_ISCSERVICE_REP_OPCODE 
M0_DTM0_REQ_OPCODE 

DTM0 service.

M0_DTM0_REP_OPCODE 
M0_DTM0_REDO_OPCODE 
M0_FOM_OPCODE_START 
M0_BE_TX_GROUP_OPCODE 
M0_CM_UT_OPCODE 
M0_CM_REBALANCE_OPCODE 
M0_CM_REPAIR_OPCODE 
M0_CM_UT_SENDER_OPCODE 
M0_UB_FOM_OPCODE 
M0_UT_RDWR_OPCODE 
M0_UT_STATS_OPCODE 
M0_UT_IOS_OPCODE 
M0_RPC_LINK_CONN_OPCODE 
M0_RPC_LINK_DISC_OPCODE 
M0_HA_LINK_OUTGOING_OPCODE 
M0_HA_ENTRYPOINT_CLIENT_OPCODE 
M0_UT_RPC_AT_REQ_OPCODE 
M0_UT_RPC_AT_REP_OPCODE 
M0_UT_LEADER_FOM_OPCODE 
M0_UT_FOLLOWER_FOM_OPCODE 
M0_UT_TIMEDWAIT_FOM_OPCODE 
M0_CM_DIX_REB_OPCODE 
M0_CM_DIX_REP_OPCODE 
M0_CM_DIX_REB_ITER_UT_OPCODE 
M0_CM_DIX_REP_ITER_UT_OPCODE 
M0_FDMI_PLUGIN_DOCK_OPCODE 
M0_FDMI_SOURCE_DOCK_OPCODE 
M0_ISCSERVICE_EXEC_OPCODE 
M0_DTM0_RLINK_OPCODE 
M0_FDMI_SOURCE_DOCK_TIMER_OPCODE 
M0_OPCODES_NR 

Definition at line 41 of file rpc_opcodes.h.

Function Documentation

◆ __itemq_insert()

static void __itemq_insert ( struct m0_tl q,
struct m0_rpc_item new_item 
)
static

q is sorted by m0_rpc_item::ri_prio and then by m0_rpc_item::ri_deadline.

Insert new_item such that the ordering of q is maintained.

Definition at line 363 of file formation2.c.

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

◆ __itemq_remove()

static void __itemq_remove ( struct m0_rpc_item item)
static

Definition at line 650 of file formation2.c.

Here is the caller graph for this function:

◆ __rpc_machine_fini()

static void __rpc_machine_fini ( struct m0_rpc_machine machine)
static

Definition at line 199 of file rpc_machine.c.

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

◆ __rpc_machine_get_stats()

static void __rpc_machine_get_stats ( struct m0_rpc_machine machine,
struct m0_rpc_stats stats,
bool  reset 
)
static

Definition at line 580 of file rpc_machine.c.

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

◆ __rpc_machine_init()

static int __rpc_machine_init ( struct m0_rpc_machine machine)
static

Definition at line 177 of file rpc_machine.c.

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

◆ addb2_add_rpc_attrs()

static void addb2_add_rpc_attrs ( const struct m0_rpc_item req)
static

Definition at line 1456 of file item.c.

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

◆ addb2_add_rpc_bulk_attr()

static void addb2_add_rpc_bulk_attr ( struct m0_rpc_bulk rbulk,
enum m0_rpc_bulk_op_type  op,
uint32_t  buf_nr,
uint64_t  seg_nr 
)
static

Definition at line 392 of file bulk.c.

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

◆ available_space_in_packet()

static m0_bcount_t available_space_in_packet ( const struct m0_rpc_packet p,
const struct m0_rpc_frm frm 
)
static

Definition at line 548 of file formation2.c.

Here is the caller graph for this function:

◆ buf_recv_cb()

static void buf_recv_cb ( const struct m0_net_buffer_event ev)
static

Definition at line 764 of file rpc_machine.c.

Here is the call graph for this function:

◆ buf_send_cb()

static void buf_send_cb ( const struct m0_net_buffer_event ev)
static

Network layer calls this function, whenever there is any event on network buffer which was previously submitted for sending by RPC layer.

Definition at line 370 of file frmops.c.

Here is the call graph for this function:

◆ bufvec_geometry()

static void bufvec_geometry ( struct m0_net_domain ndom,
m0_bcount_t  buf_size,
int32_t *  out_nr_segments,
m0_bcount_t out_segment_size 
)
static

Depending on buf_size and maximum network buffer segment size, returns number and size of segments to required to carry contents of size buf_size.

Definition at line 261 of file frmops.c.

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

◆ conn_terminating()

static void conn_terminating ( struct m0_rpc_item_source ris)
static

Definition at line 111 of file item_source.c.

Here is the call graph for this function:

◆ conn_terminating_cb_test()

static void conn_terminating_cb_test ( void  )
static

Definition at line 250 of file item_source.c.

Here is the call graph for this function:

◆ constraints_are_valid()

static bool constraints_are_valid ( const struct m0_rpc_frm_constraints constraints)
static
Todo:
XXX Check whether constraints are consistent

Definition at line 186 of file formation2.c.

Here is the caller graph for this function:

◆ drop_all_items()

static void drop_all_items ( struct m0_rpc_frm frm)
static

Definition at line 241 of file formation2.c.

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

◆ frm_balance()

static void frm_balance ( struct m0_rpc_frm frm)
static

Core of formation algorithm.

Precondition
frm_rmachine_is_locked(frm)

Definition at line 409 of file formation2.c.

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

◆ frm_fill_packet()

static void frm_fill_packet ( struct m0_rpc_frm frm,
struct m0_rpc_packet p 
)
static

Adds RPC items in packet p, taking the constraints into account.

An item is removed from itemq, once it is added to packet.

Definition at line 495 of file formation2.c.

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

◆ frm_fill_packet_from_item_sources()

static void frm_fill_packet_from_item_sources ( struct m0_rpc_frm frm,
struct m0_rpc_packet p 
)
static

Definition at line 570 of file formation2.c.

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

◆ frm_insert()

static void frm_insert ( struct m0_rpc_frm frm,
struct m0_rpc_item item 
)
static

Definition at line 273 of file formation2.c.

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

◆ frm_invariant()

static bool frm_invariant ( const struct m0_rpc_frm frm)
static

Definition at line 96 of file formation2.c.

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

◆ frm_is_idle()

static bool frm_is_idle ( const struct m0_rpc_frm frm)
static

Definition at line 192 of file formation2.c.

Here is the caller graph for this function:

◆ frm_is_ready()

static bool frm_is_ready ( const struct m0_rpc_frm frm)
static

Is frm ready to form a packet?

It is possible that frm_is_ready() returns true but no packet could be formed. See FRM_BALANCE_NOTE_1

Definition at line 472 of file formation2.c.

Here is the caller graph for this function:

◆ frm_packet_ready()

static int frm_packet_ready ( struct m0_rpc_frm frm,
struct m0_rpc_packet p 
)
static
See also
m0_rpc_frm_ops::fo_packet_ready()

Definition at line 670 of file formation2.c.

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

◆ frm_rchan()

M0_INTERNAL struct m0_rpc_chan * frm_rchan ( const struct m0_rpc_frm frm)

Definition at line 156 of file formation2.c.

Here is the caller graph for this function:

◆ frm_remove()

static void frm_remove ( struct m0_rpc_frm frm,
struct m0_rpc_item item 
)
static

Definition at line 632 of file formation2.c.

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

◆ frm_rmachine()

M0_INTERNAL struct m0_rpc_machine * frm_rmachine ( const struct m0_rpc_frm frm)

Definition at line 161 of file formation2.c.

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

◆ frm_rmachine_is_locked()

static bool frm_rmachine_is_locked ( const struct m0_rpc_frm frm)
static

Definition at line 166 of file formation2.c.

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

◆ frm_try_merging_item()

static void frm_try_merging_item ( struct m0_rpc_frm frm,
struct m0_rpc_item item,
m0_bcount_t  limit 
)
static
Todo:
XXX implement item merging

Definition at line 656 of file formation2.c.

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

◆ frm_which_qtype()

static enum m0_rpc_frm_itemq_type frm_which_qtype ( struct m0_rpc_frm frm,
const struct m0_rpc_item item 
)
static

Depending on item->ri_deadline and item->ri_prio returns one of enum m0_rpc_frm_itemq_type in which the item should be placed.

Definition at line 338 of file formation2.c.

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

◆ get_item()

static struct m0_rpc_item* get_item ( struct m0_rpc_item_source ris,
size_t  max_payload_size 
)
static

Definition at line 82 of file item_source.c.

Here is the call graph for this function:

◆ has_item()

static bool has_item ( const struct m0_rpc_item_source ris)
static

Definition at line 74 of file item_source.c.

Here is the call graph for this function:

◆ item2conn()

static struct m0_rpc_conn* item2conn ( const struct m0_rpc_item item)
inlinestatic

Definition at line 95 of file rpc_internal.h.

Here is the caller graph for this function:

◆ item__on_reply_postprocess()

static void item__on_reply_postprocess ( struct m0_rpc_item item)
static

HA to be updated in case the peered service replied after experiencing issues, and the item was re-sending due to those.

Definition at line 1435 of file item.c.

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

◆ item_cancel_fi()

static void item_cancel_fi ( struct m0_rpc_item item)
static

Definition at line 841 of file item.c.

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

◆ item_conn_test()

static int item_conn_test ( struct m0_rpc_item item)
static

Definition at line 1122 of file item.c.

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

◆ item_decode()

static int item_decode ( struct m0_bufvec_cursor cursor,
struct m0_rpc_item **  item_out 
)
static

Definition at line 390 of file packet.c.

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

◆ item_done()

static void item_done ( struct m0_rpc_packet p,
struct m0_rpc_item item,
int  rc 
)
static

Definition at line 441 of file frmops.c.

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

◆ item_encode()

static int item_encode ( struct m0_rpc_item item,
struct m0_bufvec_cursor cursor 
)
static

Definition at line 265 of file packet.c.

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

◆ item_entered_in_urgent_state()

static int item_entered_in_urgent_state ( struct m0_sm mach)
static

Definition at line 980 of file item.c.

Here is the call graph for this function:

◆ item_fail()

static void item_fail ( struct m0_rpc_packet p,
struct m0_rpc_item item,
int  rc 
)
static

Definition at line 565 of file frmops.c.

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

◆ item_is_in_waiting_queue()

M0_INTERNAL bool item_is_in_waiting_queue ( const struct m0_rpc_item item,
const struct m0_rpc_frm frm 
)

Definition at line 327 of file formation2.c.

Here is the caller graph for this function:

◆ item_kind()

M0_INTERNAL const char * item_kind ( const struct m0_rpc_item item)

Definition at line 356 of file item.c.

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

◆ item_less_or_equal()

static bool item_less_or_equal ( const struct m0_rpc_item i0,
const struct m0_rpc_item i1 
)
static

Defines total order of rpc items in itemq.

Definition at line 132 of file formation2.c.

Here is the caller graph for this function:

◆ item_move_to_urgent_queue()

static void item_move_to_urgent_queue ( struct m0_rpc_frm frm,
struct m0_rpc_item item 
)
static

Definition at line 395 of file formation2.c.

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

◆ item_received()

static void item_received ( struct m0_rpc_item item,
struct m0_net_end_point from_ep 
)
static

Definition at line 871 of file rpc_machine.c.

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

◆ item_received_fi()

static bool item_received_fi ( struct m0_rpc_item item)
static

Definition at line 912 of file rpc_machine.c.

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

◆ item_reply_received()

static int item_reply_received ( struct m0_rpc_item reply,
struct m0_rpc_item **  req_out 
)
static

Definition at line 1306 of file item.c.

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

◆ item_reply_received_fi()

static bool item_reply_received_fi ( struct m0_rpc_item req,
struct m0_rpc_item reply 
)
static

Definition at line 1342 of file item.c.

Here is the caller graph for this function:

◆ item_resend()

static void item_resend ( struct m0_rpc_item item)
static

Definition at line 1079 of file item.c.

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

◆ item_sent()

static void item_sent ( struct m0_rpc_item item)
static

Definition at line 494 of file frmops.c.

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

◆ item_source_basic_test()

static void item_source_basic_test ( void  )
static

Definition at line 126 of file item_source.c.

Here is the call graph for this function:

◆ item_source_invariant()

static bool item_source_invariant ( const struct m0_rpc_item_source ris)
static

Definition at line 40 of file item_source.c.

Here is the caller graph for this function:

◆ item_source_limits_test()

static void item_source_limits_test ( void  )
static

Definition at line 137 of file item_source.c.

Here is the call graph for this function:

◆ item_source_test()

static void item_source_test ( void  )
static

Definition at line 186 of file item_source.c.

Here is the call graph for this function:

◆ item_source_test_suite_fini()

static int item_source_test_suite_fini ( void  )
static

Definition at line 65 of file item_source.c.

Here is the call graph for this function:

◆ item_source_test_suite_init()

static int item_source_test_suite_init ( void  )
static

Definition at line 51 of file item_source.c.

Here is the call graph for this function:

◆ item_state_name()

M0_INTERNAL const char * item_state_name ( const struct m0_rpc_item item)

Definition at line 351 of file item.c.

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

◆ item_supports_merging()

static bool item_supports_merging ( const struct m0_rpc_item item)
static

Definition at line 562 of file formation2.c.

Here is the caller graph for this function:

◆ item_timedout()

static void item_timedout ( struct m0_rpc_item item)
static

Definition at line 1047 of file item.c.

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

◆ item_timer_cb()

static void item_timer_cb ( struct m0_sm_timer timer)
static

Definition at line 1027 of file item.c.

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

◆ item_will_exceed_packet_size()

static bool item_will_exceed_packet_size ( struct m0_rpc_item item,
const struct m0_rpc_packet p,
const struct m0_rpc_frm frm 
)
static

Definition at line 555 of file formation2.c.

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

◆ itemq_invariant()

static bool itemq_invariant ( const struct m0_tl q)
static

Definition at line 118 of file formation2.c.

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

◆ itemq_nr_bytes_acc()

static m0_bcount_t itemq_nr_bytes_acc ( const struct m0_tl q)
static

Returns sum of on-wire sizes of all the items in q.

Definition at line 143 of file formation2.c.

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

◆ M0_BASSERT()

M0_BASSERT ( ARRAY_SIZE(str_qtype = =FRMQ_NR_QUEUES)

◆ M0_BOB_DECLARE()

M0_BOB_DECLARE ( extern  ,
m0_rpc_machine   
)

◆ M0_BOB_DEFINE() [1/2]

M0_BOB_DEFINE ( rpc_machine_bob_type,
m0_rpc_machine   
)

◆ M0_BOB_DEFINE() [2/2]

M0_BOB_DEFINE ( static  ,
rpc_buffer_bob_type,
rpc_buffer   
)

◆ m0_rpc__down_timeout()

M0_INTERNAL m0_time_t m0_rpc__down_timeout ( void  )

Definition at line 322 of file rpc.c.

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

◆ m0_rpc__fop_post()

M0_INTERNAL int m0_rpc__fop_post ( struct m0_fop fop,
struct m0_rpc_session session,
const struct m0_rpc_item_ops ops,
m0_time_t  abs_timeout 
)

Helper routine, internal to rpc module. Sets up and posts rpc-item representing .

Initialises rpc item and posts it to rpc-layer

Definition at line 62 of file session_utils.c.

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

◆ m0_rpc__post_locked()

M0_INTERNAL int m0_rpc__post_locked ( struct m0_rpc_item item)

Posts rpc item while having rpc machine already locked.

Definition at line 83 of file rpc.c.

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

◆ m0_rpc_bufs_nr()

M0_INTERNAL uint32_t m0_rpc_bufs_nr ( uint32_t  len,
uint32_t  tms_nr 
)

Calculates the total number of buffers needed in network domain for receive buffer pool.

Parameters
lentotal Length of the TM's in a network domain
tms_nrNumber of TM's in the network domain

Definition at line 271 of file rpc.c.

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

◆ m0_rpc_bulk_buf_add()

M0_INTERNAL int m0_rpc_bulk_buf_add ( struct m0_rpc_bulk rbulk,
uint32_t  segs_nr,
m0_bcount_t  length,
struct m0_net_domain netdom,
struct m0_net_buffer nb,
struct m0_rpc_bulk_buf **  out 
)

Adds a m0_rpc_bulk_buf structure to the list of such structures in a m0_rpc_bulk structure.

Parameters
segs_nrNumber of segments needed in new m0_rpc_bulk_buf structure.
lengthNumber of bytes in the buffer. If 0, computed as total size of databufs.
netdomThe m0_net_domain structure to which new m0_rpc_bulk_buf structure will belong to. It is primarily used to keep a check on thresholds like max_seg_size, max_buf_size and max_number_of_segs.
nbNet buf pointer if user wants to use preallocated network buffer. (nb == NULL) implies that net buffer should be allocated by m0_rpc_bulk_buf_add().
outOut parameter through which newly created m0_rpc_bulk_buf structure is returned back to the caller. Users need not remove the m0_rpc_bulk_buf structures manually. These structures are removed by rpc bulk callback.
See also
rpc_bulk_buf_cb().
Precondition
rbulk != NULL && segs_nr != 0.
Postcondition
(rc == 0 && *out != NULL) || rc != 0.
See also
m0_rpc_bulk.

Definition at line 291 of file bulk.c.

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

◆ m0_rpc_bulk_buf_databuf_add()

M0_INTERNAL int m0_rpc_bulk_buf_databuf_add ( struct m0_rpc_bulk_buf rbuf,
void *  buf,
m0_bcount_t  count,
m0_bindex_t  index,
struct m0_net_domain netdom 
)

Adds a data buffer to zero vector referred to by rpc bulk structure.

Parameters
rbulkrpc bulk structure to which data buffer will be added.
bufUser space buffer starting address.
countNumber of bytes in user space buffer.
indexIndex of target object to which io is targeted.
netdomNet domain to which the net buffer from m0_rpc_bulk_buf belongs.
Precondition
buf != NULL && count != 0 && netdom != NULL && rpc_bulk_invariant(rbulk).
Postcondition
rpc_bulk_invariant(rbulk).

Definition at line 331 of file bulk.c.

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

◆ m0_rpc_bulk_buf_length()

M0_INTERNAL size_t m0_rpc_bulk_buf_length ( struct m0_rpc_bulk rbulk)

Definition at line 550 of file bulk.c.

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

◆ m0_rpc_bulk_buflist_empty()

M0_INTERNAL void m0_rpc_bulk_buflist_empty ( struct m0_rpc_bulk rbulk)

Removes all m0_rpc_bulk_buf structures from list of such structures in m0_rpc_bulk structure and deallocates it.

Precondition
rbulk != NULL.
Postcondition
rpcbulk_tlist_length(&rbulk->rb_buflist) == 0.

Definition at line 279 of file bulk.c.

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

◆ m0_rpc_bulk_default_cb()

M0_INTERNAL void m0_rpc_bulk_default_cb ( const struct m0_net_buffer_event evt)

Definition at line 140 of file bulk.c.

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

◆ m0_rpc_bulk_fini()

M0_INTERNAL void m0_rpc_bulk_fini ( struct m0_rpc_bulk rbulk)

Finalizes the rpc bulk structure.

Precondition
rbulk != NULL && rpc_bulk_invariant(rbulk).

Definition at line 263 of file bulk.c.

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

◆ m0_rpc_bulk_init()

M0_INTERNAL void m0_rpc_bulk_init ( struct m0_rpc_bulk rbulk)

Initializes a rpc bulk structure.

Parameters
rbulkrpc bulk structure to be initialized.
Precondition
rbulk != NULL.
Postcondition
rpc_bulk_invariant(rbulk).

Definition at line 247 of file bulk.c.

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

◆ m0_rpc_bulk_is_empty()

M0_INTERNAL bool m0_rpc_bulk_is_empty ( struct m0_rpc_bulk rbulk)

Definition at line 539 of file bulk.c.

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

◆ m0_rpc_bulk_load()

M0_INTERNAL int m0_rpc_bulk_load ( struct m0_rpc_bulk rbulk,
const struct m0_rpc_conn conn,
struct m0_net_buf_desc_data from_desc,
const struct m0_net_buffer_callbacks bulk_cb 
)

Loads the m0_net_buf_desc/s pointing to net buffer/s contained by m0_rpc_bulk_buf structure/s in rbulk->rb_buflist and starts RDMA transfer of buffers. This API is typically used by bulk server in a zero-copy buffer transfer.

Parameters
rbulkRpc bulk structure from whose list of m0_rpc_bulk_buf structures, net buffers will be added to transfer machine.
connThe m0_rpc_conn object which represents the rpc connection made with receiving node.
from_descThe source net buf descriptor which points to the source buffer from which data is copied.
Precondition
rbuf != NULL && item != NULL && from_desc != NULL && (rbuf->bb_nbuf & M0_NET_BUF_REGISTERED) && (rbuf->bb_nbuf.nb_qtype == M0_NET_QT_ACTIVE_BULK_RECV || rbuf->bb_nbuf.nb_qtype == M0_NET_QT_ACTIVE_BULK_SEND).
Postcondition
rpc_bulk_invariant(rbulk).

Definition at line 530 of file bulk.c.

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

◆ m0_rpc_bulk_qtype()

M0_INTERNAL void m0_rpc_bulk_qtype ( struct m0_rpc_bulk rbulk,
enum m0_net_queue_type  q 
)

Assigns queue type for buffers maintained in rbulk->rb_buflist from argument q.

Parameters
rbulkm0_rpc_bulk structure containing list of m0_rpc_bulk_buf structures whose net buffers queue type has to be assigned.
qQueue type for m0_net_buffer structures.
Precondition
rbulk != NULL && !m0_tlist_is_empty(rbulk->rb_buflist) && m0_mutex_is_locked(&rbulk->rb_mutex) && q == M0_NET_QT_PASSIVE_BULK_RECV || q == M0_NET_QT_PASSIVE_BULK_SEND || q == M0_NET_QT_ACTIVE_BULK_RECV || q == M0_NET_QT_ACTIVE_BULK_SEND.

Definition at line 372 of file bulk.c.

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

◆ m0_rpc_bulk_store()

M0_INTERNAL int m0_rpc_bulk_store ( struct m0_rpc_bulk rbulk,
const struct m0_rpc_conn conn,
struct m0_net_buf_desc_data to_desc,
const struct m0_net_buffer_callbacks bulk_cb 
)

Stores the m0_net_buf_desc/s for net buffer/s pointed to by m0_rpc_bulk_buf structure/s in the io fop wire format. This API is typically invoked by bulk client in a zero-copy buffer transfer.

Parameters
rbulkRpc bulk structure from whose list of m0_rpc_bulk_buf structures, the net buf descriptors of io fops will be populated.
connThe m0_rpc_conn object that represents the rpc connection made with receiving node.
to_descNet buf descriptor from fop which will be populated.
Precondition
rbuf != NULL && item != NULL && to_desc != NULL && (rbuf->bb_nbuf & M0_NET_BUF_REGISTERED) && (rbuf->bb_nbuf.nb_qtype == M0_NET_QT_PASSIVE_BULK_RECV || rbuf->bb_nbuf.nb_qtype == M0_NET_QT_PASSIVE_BULK_SEND).
Postcondition
rpc_bulk_invariant(rbulk).

Definition at line 520 of file bulk.c.

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

◆ m0_rpc_bulk_store_del()

M0_INTERNAL void m0_rpc_bulk_store_del ( struct m0_rpc_bulk rbulk)

Does exactly opposite of what m0_rpc_bulk_store() does. Should be called only when m0_rpc_bulk_store() had succeeded earlier and later due to some other condition, bulk transfer did not happen. Now the already stored net buffers need to be deleted from m0_net_transfer_mc so that m0_rpc_bulk object can be finalised. Invocation of this API should be followed by wait on m0_rpc_bulk::rb_chan.

Precondition
rbulk != NULL && rbulk->rb_rc == 0 && rpc_bulk_invariant(rbulk).
Postcondition
rpcbulk_tlist_is_empty(&rbulk->rb_buflist).

Definition at line 215 of file bulk.c.

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

◆ m0_rpc_bulk_store_del_unqueued()

M0_INTERNAL size_t m0_rpc_bulk_store_del_unqueued ( struct m0_rpc_bulk rbulk)

Like m0_rpc_bulk_store_del() but deletes unqueued buffers only. Requires rbulk locked by user.

Returns
number of deleted unqueued bufs.

Definition at line 190 of file bulk.c.

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

◆ m0_rpc_fini()

M0_INTERNAL void m0_rpc_fini ( void  )

Definition at line 51 of file rpc.c.

Here is the call graph for this function:

◆ m0_rpc_frm_constraints_get_defaults()

M0_INTERNAL void m0_rpc_frm_constraints_get_defaults ( struct m0_rpc_frm_constraints constraint)

Load default values for various constraints, that just works. Useful for unit tests.

Todo:
XXX decide default values for constraints

Definition at line 171 of file formation2.c.

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

◆ m0_rpc_frm_enq_item()

M0_INTERNAL void m0_rpc_frm_enq_item ( struct m0_rpc_frm frm,
struct m0_rpc_item item 
)

Enqueue an item for sending.

Definition at line 260 of file formation2.c.

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

◆ m0_rpc_frm_fini()

M0_INTERNAL void m0_rpc_frm_fini ( struct m0_rpc_frm frm)

Finalises m0_rpc_frm instance.

Precondition
frm->f_state == FRM_IDLE
Postcondition
frm->f_state == FRM_UNINITIALISED

Definition at line 222 of file formation2.c.

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

◆ m0_rpc_frm_init()

M0_INTERNAL void m0_rpc_frm_init ( struct m0_rpc_frm frm,
struct m0_rpc_frm_constraints constraints,
const struct m0_rpc_frm_ops ops 
)

Initialises frm instance.

Object pointed by constraints is copied inside m0_rpc_frm.

Precondition
frm->f_state == FRM_UNINITIALISED
Postcondition
frm->f_state == FRM_IDLE

Definition at line 197 of file formation2.c.

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

◆ m0_rpc_frm_item_deadline_passed()

M0_INTERNAL void m0_rpc_frm_item_deadline_passed ( struct m0_rpc_frm frm,
struct m0_rpc_item item 
)

Definition at line 384 of file formation2.c.

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

◆ m0_rpc_frm_packet_done()

M0_INTERNAL void m0_rpc_frm_packet_done ( struct m0_rpc_packet packet)

Callback for a packet which was previously enqueued.

Definition at line 698 of file formation2.c.

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

◆ m0_rpc_frm_remove_item()

M0_INTERNAL void m0_rpc_frm_remove_item ( struct m0_rpc_frm frm,
struct m0_rpc_item item 
)

Definition at line 626 of file formation2.c.

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

◆ m0_rpc_frm_run_formation()

M0_INTERNAL void m0_rpc_frm_run_formation ( struct m0_rpc_frm frm)

Runs formation algorithm.

Definition at line 684 of file formation2.c.

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

◆ m0_rpc_id_generate()

M0_INTERNAL uint64_t m0_rpc_id_generate ( const struct m0_fid uniq_fid)

Takes a unique fid and hashes it with id generated from timestamp seed to generate clusterwide unique RPC id.

Definition at line 96 of file session_utils.c.

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

◆ m0_rpc_init()

M0_INTERNAL int m0_rpc_init ( void  )

Definition at line 42 of file rpc.c.

Here is the call graph for this function:

◆ m0_rpc_item_cache__invariant()

M0_INTERNAL bool m0_rpc_item_cache__invariant ( struct m0_rpc_item_cache ic)

Definition at line 1578 of file item.c.

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

◆ m0_rpc_item_cache_add()

M0_INTERNAL bool m0_rpc_item_cache_add ( struct m0_rpc_item_cache ic,
struct m0_rpc_item item,
m0_time_t  deadline 
)

Adds item to the cache.

If an item is already in the cache, updates its deadline only. It takes one reference to the item if item is actually added to the cache. There is no guarantee that item will remain in cache after deadline passed.

Parameters
ic- items cache.
itemto be added.
deadline- timeout in absolute time value.
Returns
true if item was added,
false otherwise.

Definition at line 1583 of file item.c.

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

◆ m0_rpc_item_cache_clear()

M0_INTERNAL void m0_rpc_item_cache_clear ( struct m0_rpc_item_cache ic)

Deletes all items from the cache.

Definition at line 1655 of file item.c.

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

◆ m0_rpc_item_cache_del()

M0_INTERNAL void m0_rpc_item_cache_del ( struct m0_rpc_item_cache ic,
uint64_t  xid 
)

Remove item from the cache.

If item is not in cache, does nothing. Puts one reference to the item if item is actually removed from the cache.

Definition at line 1616 of file item.c.

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

◆ m0_rpc_item_cache_fini()

M0_INTERNAL void m0_rpc_item_cache_fini ( struct m0_rpc_item_cache ic)

Definition at line 1566 of file item.c.

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

◆ m0_rpc_item_cache_init()

M0_INTERNAL int m0_rpc_item_cache_init ( struct m0_rpc_item_cache ic,
struct m0_mutex lock 
)

Besides other cache initialization stuff allocates memory for the cache, so may return -ENOMEM.

Definition at line 1547 of file item.c.

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

◆ m0_rpc_item_cache_lookup()

M0_INTERNAL struct m0_rpc_item * m0_rpc_item_cache_lookup ( struct m0_rpc_item_cache ic,
uint64_t  xid 
)

Searches cache for the item with given xid.

Returns NULL if there is no item with the given xid in the cache. It doesn't take any reference to the item.

Definition at line 1631 of file item.c.

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

◆ m0_rpc_item_cache_purge()

M0_INTERNAL void m0_rpc_item_cache_purge ( struct m0_rpc_item_cache ic)

Deletes expired items from the cache.

Definition at line 1639 of file item.c.

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

◆ m0_rpc_item_cancel()

void m0_rpc_item_cancel ( struct m0_rpc_item item)

Deletes the item from all rpc queues. If reply arrives for the original cancelled item, it is ignored.

  • Item is moved to M0_RPC_ITEM_FAILED state
  • Item will be deleted once the user releases the reference/s it had held for this item, e.g. at the time of creation and other explicit references, if any.

Definition at line 932 of file item.c.

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

◆ m0_rpc_item_cancel_init()

void m0_rpc_item_cancel_init ( struct m0_rpc_item item)

Deletes the item from all rpc queues and re-initialises it. If reply arrives for the original cancelled item, it is ignored.

  • Item is first moved to M0_RPC_ITEM_FAILED state and then is moved to M0_RPC_ITEM_UNINITIALISED state
  • The item can be re-posted immediately after this function returns. When re-posted, the item gets new xid and is treated as a completely different item.

Definition at line 947 of file item.c.

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

◆ m0_rpc_item_cancel_nolock()

void m0_rpc_item_cancel_nolock ( struct m0_rpc_item item)

Similar to m0_rpc_item_cancel() except that it does not lock the RPC machine but expects that it is locked by the caller.

Definition at line 867 of file item.c.

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

◆ m0_rpc_item_change_state()

M0_INTERNAL void m0_rpc_item_change_state ( struct m0_rpc_item item,
enum m0_rpc_item_state  state 
)

Definition at line 728 of file item.c.

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

◆ m0_rpc_item_dispatch()

M0_INTERNAL int m0_rpc_item_dispatch ( struct m0_rpc_item item)

Temporary routine to place fop in a global queue, from where it can be selected for execution.

Todo:
this assumes that the item is a fop.

Definition at line 112 of file session_utils.c.

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

◆ m0_rpc_item_error()

int32_t m0_rpc_item_error ( const struct m0_rpc_item item)

Definition at line 973 of file item.c.

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

◆ m0_rpc_item_failed()

M0_INTERNAL void m0_rpc_item_failed ( struct m0_rpc_item item,
int32_t  rc 
)

Definition at line 742 of file item.c.

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

◆ m0_rpc_item_fini()

void m0_rpc_item_fini ( struct m0_rpc_item item)

Definition at line 394 of file item.c.

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

◆ m0_rpc_item_footer_encdec()

M0_INTERNAL int m0_rpc_item_footer_encdec ( struct m0_rpc_item_footer iof,
struct m0_bufvec_cursor cur,
enum m0_xcode_what  what 
)

Definition at line 58 of file onwire.c.

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

◆ m0_rpc_item_get()

void m0_rpc_item_get ( struct m0_rpc_item item)

Increments item's reference counter.

Definition at line 434 of file item.c.

Here is the caller graph for this function:

◆ m0_rpc_item_ha_timer_stop()

M0_INTERNAL void m0_rpc_item_ha_timer_stop ( struct m0_rpc_item item)

◆ m0_rpc_item_header1_encdec()

M0_INTERNAL int m0_rpc_item_header1_encdec ( struct m0_rpc_item_header1 ioh,
struct m0_bufvec_cursor cur,
enum m0_xcode_what  what 
)

Definition at line 42 of file onwire.c.

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

◆ m0_rpc_item_header2_encdec()

M0_INTERNAL int m0_rpc_item_header2_encdec ( struct m0_rpc_item_header2 ioh,
struct m0_bufvec_cursor cur,
enum m0_xcode_what  what 
)

Definition at line 50 of file onwire.c.

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

◆ m0_rpc_item_init()

void m0_rpc_item_init ( struct m0_rpc_item item,
const struct m0_rpc_item_type itype 
)

Definition at line 364 of file item.c.

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

◆ m0_rpc_item_invariant()

M0_INTERNAL bool m0_rpc_item_invariant ( const struct m0_rpc_item item)

Definition at line 314 of file item.c.

Here is the call graph for this function:

◆ m0_rpc_item_is_oneway()

M0_INTERNAL bool m0_rpc_item_is_oneway ( const struct m0_rpc_item item)

Definition at line 523 of file item.c.

Here is the caller graph for this function:

◆ m0_rpc_item_is_reply()

M0_INTERNAL bool m0_rpc_item_is_reply ( const struct m0_rpc_item item)

Definition at line 516 of file item.c.

Here is the caller graph for this function:

◆ m0_rpc_item_is_request()

M0_INTERNAL bool m0_rpc_item_is_request ( const struct m0_rpc_item item)

Definition at line 509 of file item.c.

Here is the caller graph for this function:

◆ m0_rpc_item_is_update()

M0_INTERNAL bool m0_rpc_item_is_update ( const struct m0_rpc_item item)

Definition at line 504 of file item.c.

Here is the caller graph for this function:

◆ m0_rpc_item_max_payload_exceeded()

M0_INTERNAL bool m0_rpc_item_max_payload_exceeded ( struct m0_rpc_item item,
struct m0_rpc_session session 
)

Checks whether item payload exceeds max item payload.

Definition at line 490 of file item.c.

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

◆ m0_rpc_item_module_fini()

M0_INTERNAL void m0_rpc_item_module_fini ( void  )

Finalizes and destroys the global rpc item state including type list by traversing the list and deleting and finalizing each element.

Definition at line 137 of file item.c.

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

◆ m0_rpc_item_module_init()

M0_INTERNAL int m0_rpc_item_module_init ( void  )

Initialises global the rpc item state including types list and lock

Definition at line 111 of file item.c.

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

◆ m0_rpc_item_opname()

M0_INTERNAL const char * m0_rpc_item_opname ( const struct m0_rpc_item item)

Definition at line 1195 of file item.c.

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

◆ m0_rpc_item_payload_size()

m0_bcount_t m0_rpc_item_payload_size ( struct m0_rpc_item item)

Definition at line 480 of file item.c.

Here is the caller graph for this function:

◆ m0_rpc_item_pending_cache_add()

M0_INTERNAL void m0_rpc_item_pending_cache_add ( struct m0_rpc_item item)

Adds item to the pending item cache only if it is not already present there. It is going to be present there in case of resend.

Definition at line 1710 of file item.c.

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

◆ m0_rpc_item_pending_cache_del()

M0_INTERNAL void m0_rpc_item_pending_cache_del ( struct m0_rpc_item item)

Deletes item from the pending item cache.

Definition at line 1741 of file item.c.

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

◆ m0_rpc_item_pending_cache_fini()

M0_INTERNAL void m0_rpc_item_pending_cache_fini ( struct m0_rpc_session session)

Finalises the pending item cache.

Definition at line 1703 of file item.c.

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

◆ m0_rpc_item_pending_cache_init()

M0_INTERNAL void m0_rpc_item_pending_cache_init ( struct m0_rpc_session session)

Initialises the pending item cache.

Definition at line 1687 of file item.c.

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

◆ m0_rpc_item_process_reply()

M0_INTERNAL void m0_rpc_item_process_reply ( struct m0_rpc_item req,
struct m0_rpc_item reply 
)

Definition at line 1464 of file item.c.

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

◆ m0_rpc_item_put()

void m0_rpc_item_put ( struct m0_rpc_item item)

Decrements item's reference counter.

Definition at line 443 of file item.c.

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

◆ m0_rpc_item_put_lock()

void m0_rpc_item_put_lock ( struct m0_rpc_item item)

Definition at line 454 of file item.c.

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

◆ m0_rpc_item_received()

M0_INTERNAL int m0_rpc_item_received ( struct m0_rpc_item item,
struct m0_rpc_machine machine 
)

Definition at line 1208 of file item.c.

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

◆ m0_rpc_item_remote_ep_addr()

M0_INTERNAL const char * m0_rpc_item_remote_ep_addr ( const struct m0_rpc_item item)

Extract remote endpoint address from given item

Definition at line 1188 of file item.c.

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

◆ m0_rpc_item_replied_invoke()

M0_INTERNAL void m0_rpc_item_replied_invoke ( struct m0_rpc_item req)

Definition at line 1756 of file item.c.

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

◆ m0_rpc_item_send()

M0_INTERNAL void m0_rpc_item_send ( struct m0_rpc_item item)

Definition at line 1129 of file item.c.

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

◆ m0_rpc_item_send_reply()

M0_INTERNAL void m0_rpc_item_send_reply ( struct m0_rpc_item req,
struct m0_rpc_item reply 
)

Definition at line 1503 of file item.c.

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

◆ m0_rpc_item_sent_invoke()

M0_INTERNAL void m0_rpc_item_sent_invoke ( struct m0_rpc_item item)

Definition at line 1766 of file item.c.

Here is the caller graph for this function:

◆ m0_rpc_item_size()

m0_bcount_t m0_rpc_item_size ( struct m0_rpc_item item)

Definition at line 470 of file item.c.

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

◆ m0_rpc_item_sm_fini()

M0_INTERNAL void m0_rpc_item_sm_fini ( struct m0_rpc_item item)

Definition at line 720 of file item.c.

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

◆ m0_rpc_item_sm_init()

M0_INTERNAL void m0_rpc_item_sm_init ( struct m0_rpc_item item,
enum m0_rpc_item_dir  dir 
)

Definition at line 704 of file item.c.

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

◆ m0_rpc_item_source_deregister()

void m0_rpc_item_source_deregister ( struct m0_rpc_item_source ris)

Deregisters item-source.

Calling m0_rpc_item_source_deregister() on an already deregistered item-source is safe.

Postcondition
!m0_rpc_item_source_is_registered(ris)

Definition at line 107 of file item_source.c.

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

◆ m0_rpc_item_source_fini()

void m0_rpc_item_source_fini ( struct m0_rpc_item_source ris)
Precondition
!m0_rpc_item_source_is_registered(ris)

Definition at line 70 of file item_source.c.

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

◆ m0_rpc_item_source_init()

void m0_rpc_item_source_init ( struct m0_rpc_item_source ris,
const char *  name,
const struct m0_rpc_item_source_ops ops 
)
Precondition
ris != NULL && name != NULL
ops != NULL && ops->riso_has_item != NULL && ops->riso_get_item != NULL && ops->riso_conn_terminating != NULL

Definition at line 52 of file item_source.c.

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

◆ m0_rpc_item_source_is_registered()

bool m0_rpc_item_source_is_registered ( const struct m0_rpc_item_source ris)

Returns true iff ris is registered.

Definition at line 77 of file item_source.c.

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

◆ m0_rpc_item_source_register()

void m0_rpc_item_source_register ( struct m0_rpc_conn conn,
struct m0_rpc_item_source ris 
)

Registers an item-source with rpc-connection.

Precondition
!m0_rpc_item_source_is_registered(ris)
Postcondition
m0_rpc_item_source_is_registered(ris)

Definition at line 95 of file item_source.c.

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

◆ m0_rpc_item_source_register_locked()

void m0_rpc_item_source_register_locked ( struct m0_rpc_conn conn,
struct m0_rpc_item_source ris 
)

Registers an item-source with a locked rpc-connection.

Identical to m0_rpc_item_source_register() except assumes that the rpc machine is already locked.

Precondition
!m0_rpc_item_source_is_registered(ris)
Postcondition
m0_rpc_item_source_is_registered(ris)

Definition at line 83 of file item_source.c.

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

◆ m0_rpc_item_timedwait()

int m0_rpc_item_timedwait ( struct m0_rpc_item item,
uint64_t  states,
m0_time_t  timeout 
)

Waits until item reaches in one of states specified in states or absolute timeout specified by timeout is passed.

See also
m0_sm_timedwait() to know more about values returned by this function.

Definition at line 813 of file item.c.

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

◆ m0_rpc_item_timer_start()

M0_INTERNAL int m0_rpc_item_timer_start ( struct m0_rpc_item item)

Definition at line 998 of file item.c.

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

◆ m0_rpc_item_timer_stop()

M0_INTERNAL void m0_rpc_item_timer_stop ( struct m0_rpc_item item)

Definition at line 1018 of file item.c.

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

◆ m0_rpc_item_type_deregister()

M0_INTERNAL void m0_rpc_item_type_deregister ( struct m0_rpc_item_type item_type)

De-registers an rpc item type by deleting the corresponding entry in the rpc item types list.

Parameters
item_typeThe rpc item type to be deregistered.

Definition at line 176 of file item.c.

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

◆ m0_rpc_item_type_lookup()

M0_INTERNAL struct m0_rpc_item_type * m0_rpc_item_type_lookup ( uint32_t  opcode)

Returns a pointer to rpc item type registered for an opcode

Parameters
opcodeUnique operation code for the rpc item type to be looked up.
Return values
Pointerto the rpc item type for that opcode.
NULLif the item type is not registered.

Definition at line 189 of file item.c.

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

◆ m0_rpc_item_type_name()

M0_INTERNAL const char * m0_rpc_item_type_name ( const struct m0_rpc_item_type item_type)

Definition at line 1202 of file item.c.

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

◆ m0_rpc_item_type_register()

M0_INTERNAL void m0_rpc_item_type_register ( struct m0_rpc_item_type item_type)

Registers a new rpc item type by adding an entry to the rpc item types list. Asserts when an entry for that opcode already exists in the item types list.

Parameters
item_typeThe rpc item type to be registered.

Definition at line 154 of file item.c.

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

◆ m0_rpc_item_wait_for_reply()

int m0_rpc_item_wait_for_reply ( struct m0_rpc_item item,
m0_time_t  timeout 
)

Waits until either item reaches in one of REPLIED/FAILED states or timeout is elapsed.

Returns
0 when item is REPLIED,
item->ri_error if item is FAILED.

Definition at line 824 of file item.c.

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

◆ m0_rpc_item_xid_assign()

M0_INTERNAL void m0_rpc_item_xid_assign ( struct m0_rpc_item item)

Definition at line 565 of file item.c.

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

◆ m0_rpc_item_xid_check()

M0_INTERNAL bool m0_rpc_item_xid_check ( struct m0_rpc_item item,
struct m0_rpc_item **  next 
)

Returns either item should be handled or not. Decision is based on the item xid. For duplicate request, the cached reply (if any) will be resent again. Purges the stale items from reply cache also.

Definition at line 617 of file item.c.

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

◆ m0_rpc_item_xid_list_fini()

M0_INTERNAL void m0_rpc_item_xid_list_fini ( struct m0_rpc_session session)

Definition at line 1675 of file item.c.

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

◆ m0_rpc_item_xid_list_init()

M0_INTERNAL void m0_rpc_item_xid_list_init ( struct m0_rpc_session session)

Definition at line 1669 of file item.c.

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

◆ m0_rpc_item_xid_min_update()

M0_INTERNAL void m0_rpc_item_xid_min_update ( struct m0_rpc_item item)

Definition at line 543 of file item.c.

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

◆ m0_rpc_machine_add_conn()

M0_INTERNAL void m0_rpc_machine_add_conn ( struct m0_rpc_machine rmach,
struct m0_rpc_conn conn 
)

Definition at line 608 of file rpc_machine.c.

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

◆ m0_rpc_machine_cleanup_incoming_connections()

M0_INTERNAL void m0_rpc_machine_cleanup_incoming_connections ( struct m0_rpc_machine machine)

Terminates all active incoming sessions and connections.

Such cleanup is required to handle case where receiver is terminated while one or more senders are still connected to it.

For more information on this issue visit here

Definition at line 300 of file rpc_machine.c.

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

◆ m0_rpc_machine_drain_item_sources()

M0_INTERNAL void m0_rpc_machine_drain_item_sources ( struct m0_rpc_machine machine,
uint32_t  max_per_source 
)

Definition at line 404 of file rpc_machine.c.

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

◆ m0_rpc_machine_ep()

M0_INTERNAL const char * m0_rpc_machine_ep ( const struct m0_rpc_machine rmach)

Definition at line 603 of file rpc_machine.c.

Here is the caller graph for this function:

◆ m0_rpc_machine_find_conn()

M0_INTERNAL struct m0_rpc_conn * m0_rpc_machine_find_conn ( const struct m0_rpc_machine machine,
const struct m0_rpc_item item 
)

Definition at line 836 of file rpc_machine.c.

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

◆ m0_rpc_machine_fini()

void m0_rpc_machine_fini ( struct m0_rpc_machine machine)

Definition at line 233 of file rpc_machine.c.

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

◆ m0_rpc_machine_get_stats()

void m0_rpc_machine_get_stats ( struct m0_rpc_machine machine,
struct m0_rpc_stats stats,
bool  reset 
)

Definition at line 592 of file rpc_machine.c.

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

◆ m0_rpc_machine_init()

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 
)

Rpc machine is a running instance of rpc layer. A number of rpc machine structures can co-exist in rpc layer. With every rpc machine, a sessions module, a formation module, sending/receiving logic and statistics components are associated.

Parameters
machineInput rpc_machine object.
net_domNetwork domain, this rpc_machine is associated with.
ep_addrSource end point address to associate with the transfer mc.
receive_poolBuffer pool to be attached to TM for provisioning it.
colourUnique colour of each transfer machine. Locality optimized buffer selection during provisioning is enabled by specifying a colour to be assigned to the internal network transfer machine; the invoker should assign each transfer machine in this network domain a unique colour. Specify the M0_BUFFER_ANY_COLOUR constant if locality optimizations are not required.
msg_sizeMaximum RPC message size. The M0_RPC_DEF_MAX_RPC_MSG_SIZE constant provides a suitable default value.
queue_lenMinimum TM receive queue length. The M0_NET_TM_RECV_QUEUE_DEF_LEN constant provides a suitable default value.
Note
machine->rm_bulk_cutoff value is initialised to the half of message size aligned to the next page boundary. User is allowed to change this value after initialisation by direct field assignment.
See also
m0_rpc_max_msg_size()

Definition at line 123 of file rpc_machine.c.

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

◆ m0_rpc_machine_is_locked()

M0_INTERNAL bool m0_rpc_machine_is_locked ( const struct m0_rpc_machine machine)

Definition at line 565 of file rpc_machine.c.

Here is the call graph for this function:

◆ m0_rpc_machine_is_not_locked()

M0_INTERNAL bool m0_rpc_machine_is_not_locked ( const struct m0_rpc_machine machine)

Definition at line 573 of file rpc_machine.c.

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

◆ m0_rpc_machine_lock()

M0_INTERNAL void m0_rpc_machine_lock ( struct m0_rpc_machine machine)

Definition at line 551 of file rpc_machine.c.

Here is the call graph for this function:

◆ m0_rpc_machine_unlock()

M0_INTERNAL void m0_rpc_machine_unlock ( struct m0_rpc_machine machine)

Definition at line 558 of file rpc_machine.c.

Here is the call graph for this function:

◆ m0_rpc_machine_watch_attach()

void m0_rpc_machine_watch_attach ( struct m0_rpc_machine_watch watch)

Attaches a watch to its rpc machine.

Precondition
watch->mw_mach != NULL
m0_rpc_machine_is_not_locked(watch->mw_mach)

Definition at line 979 of file rpc_machine.c.

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

◆ m0_rpc_machine_watch_detach()

void m0_rpc_machine_watch_detach ( struct m0_rpc_machine_watch watch)

Detaches a watch from its rpc machine, if still attached.

Precondition
watch->mw_mach != NULL
m0_rpc_machine_is_not_locked(watch->mw_mach)

Definition at line 997 of file rpc_machine.c.

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

◆ m0_rpc_max_msg_size()

M0_INTERNAL m0_bcount_t m0_rpc_max_msg_size ( struct m0_net_domain ndom,
m0_bcount_t  rpc_size 
)

Returns the maximum RPC message size in the network domain.

Definition at line 302 of file rpc.c.

Here is the caller graph for this function:

◆ m0_rpc_max_recv_msgs()

M0_INTERNAL uint32_t m0_rpc_max_recv_msgs ( struct m0_net_domain ndom,
m0_bcount_t  rpc_size 
)

Returns the maximum number of messages that can be received in a buffer of network domain for a specific maximum receive message size.

Definition at line 312 of file rpc.c.

Here is the caller graph for this function:

◆ m0_rpc_max_seg_size()

M0_INTERNAL m0_bcount_t m0_rpc_max_seg_size ( struct m0_net_domain ndom)

Returns the maximum segment size of receive pool of network domain.

Definition at line 284 of file rpc.c.

Here is the caller graph for this function:

◆ m0_rpc_max_segs_nr()

M0_INTERNAL uint32_t m0_rpc_max_segs_nr ( struct m0_net_domain ndom)

Returns the maximum number of segments of receive pool of network domain.

Definition at line 293 of file rpc.c.

Here is the caller graph for this function:

◆ m0_rpc_net_buffer_pool_cleanup()

void m0_rpc_net_buffer_pool_cleanup ( struct m0_net_buffer_pool app_pool)

Definition at line 264 of file rpc.c.

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

◆ m0_rpc_net_buffer_pool_setup()

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 
)

Create a buffer pool per net domain which to be shared by TM's in it.

Precondition
ndom != NULL && app_pool != NULL
bufs_nr != 0

Definition at line 229 of file rpc.c.

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

◆ m0_rpc_oneway_item_post()

M0_INTERNAL void m0_rpc_oneway_item_post ( const struct m0_rpc_conn conn,
struct m0_rpc_item item 
)

Definition at line 169 of file rpc.c.

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

◆ m0_rpc_oneway_item_post_locked()

M0_INTERNAL void m0_rpc_oneway_item_post_locked ( const struct m0_rpc_conn conn,
struct m0_rpc_item item 
)

Definition at line 184 of file rpc.c.

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

◆ m0_rpc_packet_add_item()

M0_INTERNAL void m0_rpc_packet_add_item ( struct m0_rpc_packet packet,
struct m0_rpc_item item 
)
Precondition
!packet_item_tlink_is_in(item)
Postcondition
m0_rpc_packet_is_carrying_item(packet, item)

Definition at line 141 of file packet.c.

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

◆ m0_rpc_packet_decode()

M0_INTERNAL int m0_rpc_packet_decode ( struct m0_rpc_packet packet,
struct m0_bufvec bufvec,
m0_bindex_t  off,
m0_bcount_t  len 
)

Decodes packet from bufvec.

Definition at line 367 of file packet.c.

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

◆ m0_rpc_packet_decode_using_cursor()

M0_INTERNAL int m0_rpc_packet_decode_using_cursor ( struct m0_rpc_packet packet,
struct m0_bufvec_cursor cursor,
m0_bcount_t  len 
)

Decodes packet from location pointed by bufvec cursor.

Definition at line 448 of file packet.c.

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

◆ m0_rpc_packet_discard()

M0_INTERNAL void m0_rpc_packet_discard ( struct m0_rpc_packet packet)

Removes all items from the packet, finalises and frees it.

Definition at line 134 of file packet.c.

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

◆ m0_rpc_packet_encode()

M0_INTERNAL int m0_rpc_packet_encode ( struct m0_rpc_packet packet,
struct m0_bufvec bufvec 
)

Serialises packet in buffer pointed by bufvec.

Precondition
!m0_rpc_packet_is_empty(packet)

Definition at line 221 of file packet.c.

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

◆ m0_rpc_packet_encode_using_cursor()

M0_INTERNAL int m0_rpc_packet_encode_using_cursor ( struct m0_rpc_packet packet,
struct m0_bufvec_cursor cursor 
)

Serialises packet in location pointed by cursor.

Precondition
!m0_rpc_packet_is_empty(packet)

Definition at line 317 of file packet.c.

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

◆ m0_rpc_packet_fini()

M0_INTERNAL void m0_rpc_packet_fini ( struct m0_rpc_packet p)

Definition at line 122 of file packet.c.

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

◆ m0_rpc_packet_init()

M0_INTERNAL void m0_rpc_packet_init ( struct m0_rpc_packet p,
struct m0_rpc_machine rmach 
)

Definition at line 103 of file packet.c.

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

◆ m0_rpc_packet_invariant()

M0_INTERNAL bool m0_rpc_packet_invariant ( const struct m0_rpc_packet p)

Definition at line 82 of file packet.c.

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

◆ m0_rpc_packet_is_carrying_item()

M0_INTERNAL bool m0_rpc_packet_is_carrying_item ( const struct m0_rpc_packet packet,
const struct m0_rpc_item item 
)

Returns true iff item is included in packet.

Definition at line 208 of file packet.c.

Here is the caller graph for this function:

◆ m0_rpc_packet_is_empty()

M0_INTERNAL bool m0_rpc_packet_is_empty ( const struct m0_rpc_packet p)

Definition at line 214 of file packet.c.

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

◆ m0_rpc_packet_onwire_footer_size()

M0_INTERNAL m0_bcount_t m0_rpc_packet_onwire_footer_size ( void  )

Definition at line 68 of file packet.c.

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

◆ m0_rpc_packet_onwire_header_size()

M0_INTERNAL m0_bcount_t m0_rpc_packet_onwire_header_size ( void  )

Definition at line 54 of file packet.c.

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

◆ m0_rpc_packet_remove_all_items()

M0_INTERNAL void m0_rpc_packet_remove_all_items ( struct m0_rpc_packet packet)
Postcondition
m0_rpc_packet_is_empty(packet)

Definition at line 190 of file packet.c.

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

◆ m0_rpc_packet_remove_item()

M0_INTERNAL void m0_rpc_packet_remove_item ( struct m0_rpc_packet packet,
struct m0_rpc_item item 
)
Precondition
m0_rpc_packet_is_carrying_item(packet, item)
Postcondition
!packet_item_tlink_is_in(item)

Definition at line 165 of file packet.c.

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

◆ m0_rpc_packet_traverse_items()

M0_INTERNAL void m0_rpc_packet_traverse_items ( struct m0_rpc_packet p,
item_visit_fn visit,
int  opaque_data 
)

Iterates through all the items in the packet p and calls visit function for each item. Passes opaque_data as it is to visit function.

Definition at line 524 of file packet.c.

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

◆ m0_rpc_post()

M0_INTERNAL int m0_rpc_post ( struct m0_rpc_item item)

Posts an item to the rpc layer.

The rpc layer will try to send the item out not later than item->ri_deadline and with priority of item->ri_priority.

Operation timeout is controlled by item->ri_resend_interval and item->ri_nr_sent_max. By default their values are set to 1 second and UINT64_MAX respectively. RPC resends the request every ->ri_resend_interval seconds, until a reply is received. item->ri_resend_interval and item->ri_nr_sent_max are "public" fields that user can set before posting an item.

After successful call to m0_rpc_post(), user should not attempt to directly free the item. Instead reference on the item should be dropped.

See also
m0_fop_put()
m0_rpc_item_type_ops::rito_item_put

Callbacks:

See also
m0_rpc_item_ops::rio_sent
m0_rpc_item_ops::rio_replied

If item is successfully placed on network, then rio_sent() is called. If RPC layer failed to place item on network, then rio_sent() is called with item->ri_error set to non-zero error code. When reply to item is received, rio_replied() callback is called with item->ri_reply pointing to reply item and item->ri_error == 0. If request's operation timeout is passed or receiver reported failure, then rio_replied() is called with item->ri_error set to non-zero error code and item->ri_reply == NULL.

To wait until either reply is received or request is failed use m0_rpc_item_wait_for_reply().

Precondition
item->ri_session != NULL
M0_IN(session_state(item->ri_session), (M0_RPC_SESSION_IDLE, M0_RPC_SESSION_BUSY))
m0_rpc_item_is_request(item) && !m0_rpc_item_is_bound(item)
m0_rpc_item_size(item) <= m0_rpc_session_get_max_item_size(item->ri_session)

Definition at line 63 of file rpc.c.

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

◆ m0_rpc_reply_post()

void m0_rpc_reply_post ( struct m0_rpc_item request,
struct m0_rpc_item reply 
)

Posts reply item on the same session on which the request item is received.

RPC items are reference counted, so do not directly free request or reply items.

See also
m0_fop_put()
m0_rpc_item_type_ops::rito_item_put

Definition at line 135 of file rpc.c.

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

◆ m0_rpc_reply_timedwait()

M0_INTERNAL int m0_rpc_reply_timedwait ( struct m0_clink clink,
const m0_time_t  timeout 
)

Definition at line 205 of file rpc.c.

Here is the call 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_session_module_fini()

M0_INTERNAL void m0_rpc_session_module_fini ( void  )

Finalises all session realted fop types

Definition at line 52 of file session_utils.c.

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

◆ m0_rpc_session_module_init()

M0_INTERNAL int m0_rpc_session_module_init ( void  )

Initialises all the session related fop types

Definition at line 47 of file session_utils.c.

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

◆ M0_TL_DECLARE() [1/5]

M0_TL_DECLARE ( packet_item  ,
M0_INTERNAL  ,
struct m0_rpc_item   
)

◆ M0_TL_DECLARE() [2/5]

M0_TL_DECLARE ( rpc_conn  ,
M0_INTERNAL  ,
struct m0_rpc_conn   
)

◆ M0_TL_DECLARE() [3/5]

M0_TL_DECLARE ( rmach_watch  ,
M0_INTERNAL  ,
struct m0_rpc_machine_watch   
)

◆ M0_TL_DECLARE() [4/5]

M0_TL_DECLARE ( item_source  ,
M0_INTERNAL  ,
struct m0_rpc_item_source   
)

◆ M0_TL_DECLARE() [5/5]

M0_TL_DECLARE ( itemq  ,
M0_INTERNAL  ,
struct m0_rpc_item   
)

◆ M0_TL_DEFINE() [1/12]

M0_TL_DEFINE ( item_source  ,
M0_INTERNAL  ,
struct m0_rpc_item_source   
)

◆ M0_TL_DEFINE() [2/12]

M0_TL_DEFINE ( rpcbulk  ,
M0_INTERNAL  ,
struct m0_rpc_bulk_buf   
)

◆ M0_TL_DEFINE() [3/12]

M0_TL_DEFINE ( packet_item  ,
M0_INTERNAL  ,
struct m0_rpc_item   
)

◆ M0_TL_DEFINE() [4/12]

M0_TL_DEFINE ( rpcitem  ,
M0_INTERNAL  ,
struct m0_rpc_item   
)

◆ M0_TL_DEFINE() [5/12]

M0_TL_DEFINE ( rit  ,
static  ,
struct m0_rpc_item_type   
)

◆ M0_TL_DEFINE() [6/12]

M0_TL_DEFINE ( ric  ,
M0_INTERNAL  ,
struct m0_rpc_item   
)

◆ M0_TL_DEFINE() [7/12]

M0_TL_DEFINE ( pending_item  ,
M0_INTERNAL  ,
struct m0_rpc_item   
)

◆ M0_TL_DEFINE() [8/12]

M0_TL_DEFINE ( xidl  ,
M0_INTERNAL  ,
struct m0_rpc_item   
)

◆ M0_TL_DEFINE() [9/12]

M0_TL_DEFINE ( itemq  ,
M0_INTERNAL  ,
struct m0_rpc_item   
)

◆ M0_TL_DEFINE() [10/12]

M0_TL_DEFINE ( rpc_chan  ,
static  ,
struct m0_rpc_chan   
)

◆ M0_TL_DEFINE() [11/12]

M0_TL_DEFINE ( rmach_watch  ,
M0_INTERNAL  ,
struct m0_rpc_machine_watch   
)

◆ M0_TL_DEFINE() [12/12]

M0_TL_DEFINE ( rpc_conn  ,
M0_INTERNAL  ,
struct m0_rpc_conn   
)

◆ M0_TL_DESCR_DECLARE() [1/5]

M0_TL_DESCR_DECLARE ( packet_item  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DECLARE() [2/5]

M0_TL_DESCR_DECLARE ( rpc_conn  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DECLARE() [3/5]

M0_TL_DESCR_DECLARE ( rmach_watch  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DECLARE() [4/5]

M0_TL_DESCR_DECLARE ( item_source  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DECLARE() [5/5]

M0_TL_DESCR_DECLARE ( itemq  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DEFINE() [1/12]

M0_TL_DESCR_DEFINE ( item_source  ,
"item-source-list ,
M0_INTERNAL  ,
struct m0_rpc_item_source  ,
ris_tlink  ,
ris_magic  ,
M0_RPC_ITEM_SOURCE_MAGIC  ,
M0_RPC_ITEM_SOURCE_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [2/12]

M0_TL_DESCR_DEFINE ( rpcbulk  ,
"rpc bulk buffer list ,
M0_INTERNAL  ,
struct m0_rpc_bulk_buf  ,
bb_link  ,
bb_magic  ,
M0_RPC_BULK_BUF_MAGIC  ,
M0_RPC_BULK_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [3/12]

M0_TL_DESCR_DEFINE ( packet_item  ,
"packet_item"  ,
M0_INTERNAL  ,
struct m0_rpc_item  ,
ri_plink  ,
ri_magic  ,
M0_RPC_ITEM_MAGIC  ,
M0_RPC_PACKET_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [4/12]

M0_TL_DESCR_DEFINE ( rpcitem  ,
"rpc item tlist"  ,
M0_INTERNAL  ,
struct m0_rpc_item  ,
ri_field  ,
ri_magic  ,
M0_RPC_ITEM_MAGIC  ,
M0_RPC_ITEM_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [5/12]

M0_TL_DESCR_DEFINE ( rit  ,
"rpc_item_type_descr"  ,
static  ,
struct m0_rpc_item_type  ,
rit_linkage  ,
rit_magic  ,
M0_RPC_ITEM_TYPE_MAGIC  ,
M0_RPC_ITEM_TYPE_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [6/12]

M0_TL_DESCR_DEFINE ( ric  ,
"rpc item cache ,
M0_INTERNAL  ,
struct m0_rpc_item  ,
ri_cache_link  ,
ri_magic  ,
M0_RPC_ITEM_MAGIC  ,
M0_RPC_ITEM_CACHE_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [7/12]

M0_TL_DESCR_DEFINE ( pending_item  ,
"pending-item-list ,
M0_INTERNAL  ,
struct m0_rpc_item  ,
ri_pending_link  ,
ri_magic  ,
M0_RPC_ITEM_MAGIC  ,
M0_RPC_ITEM_PENDING_CACHE_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [8/12]

M0_TL_DESCR_DEFINE ( xidl  ,
"rpc session xid list ,
M0_INTERNAL  ,
struct m0_rpc_item  ,
ri_xid_link  ,
ri_magic  ,
M0_RPC_ITEM_MAGIC  ,
M0_RPC_ITEM_XID_LIST_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [9/12]

M0_TL_DESCR_DEFINE ( itemq  ,
"rpc_itemq"  ,
M0_INTERNAL  ,
struct m0_rpc_item  ,
ri_iq_link  ,
ri_magic  ,
M0_RPC_ITEM_MAGIC  ,
M0_RPC_ITEMQ_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [10/12]

M0_TL_DESCR_DEFINE ( rpc_chan  ,
"rpc_channels"  ,
static  ,
struct m0_rpc_chan  ,
rc_linkage  ,
rc_magic  ,
M0_RPC_CHAN_MAGIC  ,
M0_RPC_CHAN_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [11/12]

M0_TL_DESCR_DEFINE ( rmach_watch  ,
"rpc_machine_watch"  ,
M0_INTERNAL  ,
struct m0_rpc_machine_watch  ,
mw_linkage  ,
mw_magic  ,
M0_RPC_MACHINE_WATCH_MAGIC  ,
M0_RPC_MACHINE_WATCH_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [12/12]

M0_TL_DESCR_DEFINE ( rpc_conn  ,
"rpc-conn ,
M0_INTERNAL  ,
struct m0_rpc_conn  ,
c_link  ,
c_magic  ,
M0_RPC_CONN_MAGIC  ,
M0_RPC_CONN_HEAD_MAGIC   
)

◆ M0_XCA_DOMAIN()

struct m0_rpc_packet_onwire_header M0_XCA_DOMAIN ( rpc  )

◆ machine_nb_idle()

static void machine_nb_idle ( struct m0_rpc_machine machine)
static

Definition at line 217 of file rpc_machine.c.

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

◆ net_buf_err()

static void net_buf_err ( struct m0_net_buffer nb,
int32_t  status 
)
static

Definition at line 949 of file rpc_machine.c.

Here is the caller graph for this function:

◆ net_buf_received()

static void net_buf_received ( struct m0_net_buffer nb,
m0_bindex_t  offset,
m0_bcount_t  length,
struct m0_net_end_point from_ep 
)
static

Definition at line 786 of file rpc_machine.c.

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

◆ net_buffer_allocate()

static int net_buffer_allocate ( struct m0_net_buffer netbuf,
struct m0_net_domain ndom,
m0_bcount_t  buf_size 
)
static

Allocates network buffer and register it with network domain ndom.

Definition at line 225 of file frmops.c.

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

◆ net_buffer_free()

static void net_buffer_free ( struct m0_net_buffer netbuf,
struct m0_net_domain ndom 
)
static

Definition at line 307 of file frmops.c.

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

◆ opcode_is_dup()

static bool opcode_is_dup ( uint32_t  opcode)
static

Checks if the supplied opcode has already been registered.

Parameters
opcodeRPC item type opcode.
Return values
trueif opcode is a duplicate(already registered)
falseif opcode has not been registered yet.

Definition at line 97 of file item.c.

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

◆ packet_footer_encdec()

static int packet_footer_encdec ( struct m0_rpc_packet_onwire_footer pf,
struct m0_bufvec_cursor cursor,
enum m0_xcode_what  what 
)
static

Definition at line 256 of file packet.c.

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

◆ packet_header_encdec()

static int packet_header_encdec ( struct m0_rpc_packet_onwire_header ph,
struct m0_bufvec_cursor cursor,
enum m0_xcode_what  what 
)
static

Definition at line 247 of file packet.c.

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

◆ packet_ready()

static int packet_ready ( struct m0_rpc_packet p)
static

Serialises packet p and its items in a network buffer and submits it to network layer.

See also
m0_rpc_frm_ops::fo_packet_ready()

Definition at line 135 of file frmops.c.

Here is the call graph for this function:

◆ packet_received()

static void packet_received ( struct m0_rpc_packet p,
struct m0_rpc_machine machine,
struct m0_net_end_point from_ep 
)
static

Definition at line 811 of file rpc_machine.c.

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

◆ pending_cache_drain()

static void pending_cache_drain ( struct m0_rpc_session session)
static

Definition at line 1693 of file item.c.

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

◆ req_replied()

static int req_replied ( struct m0_rpc_item req,
struct m0_rpc_item reply 
)
static

Definition at line 1360 of file item.c.

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

◆ rpc_buffer__rmachine()

static struct m0_rpc_machine* rpc_buffer__rmachine ( const struct rpc_buffer rpcbuf)
static

Definition at line 115 of file frmops.c.

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

◆ rpc_buffer_fini()

static void rpc_buffer_fini ( struct rpc_buffer rpcbuf)
static

Definition at line 348 of file frmops.c.

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

◆ rpc_buffer_init()

static int rpc_buffer_init ( struct rpc_buffer rpcbuf,
struct m0_rpc_packet p 
)
static

Initialises rpcbuf, allocates network buffer of size enough to accomodate serialised packet p.

Definition at line 185 of file frmops.c.

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

◆ rpc_buffer_pool_low()

static void rpc_buffer_pool_low ( struct m0_net_buffer_pool bp)
static

Definition at line 219 of file rpc.c.

◆ rpc_buffer_submit()

static int rpc_buffer_submit ( struct rpc_buffer rpcbuf)
static

Submits buffer to network layer for sending.

Definition at line 322 of file frmops.c.

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

◆ rpc_bulk_buf_deregister()

static void rpc_bulk_buf_deregister ( struct m0_rpc_bulk_buf buf)
static

Definition at line 67 of file bulk.c.

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

◆ rpc_bulk_buf_fini()

static void rpc_bulk_buf_fini ( struct m0_rpc_bulk_buf rbuf)
static

Definition at line 74 of file bulk.c.

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

◆ rpc_bulk_buf_init()

static int rpc_bulk_buf_init ( struct m0_rpc_bulk_buf rbuf,
uint32_t  segs_nr,
m0_bcount_t  length,
struct m0_net_buffer nb 
)
static

Definition at line 91 of file bulk.c.

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

◆ rpc_bulk_buf_invariant()

static bool rpc_bulk_buf_invariant ( const struct m0_rpc_bulk_buf rbuf)
static

Definition at line 49 of file bulk.c.

Here is the caller graph for this function:

◆ rpc_bulk_invariant()

static bool rpc_bulk_invariant ( const struct m0_rpc_bulk rbulk)
static

Definition at line 57 of file bulk.c.

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

◆ rpc_bulk_op()

static int rpc_bulk_op ( struct m0_rpc_bulk rbulk,
const struct m0_rpc_conn conn,
struct m0_net_buf_desc_data descs,
enum m0_rpc_bulk_op_type  op,
const struct m0_net_buffer_callbacks bulk_cb 
)
static

Definition at line 411 of file bulk.c.

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

◆ rpc_chan_create()

static int rpc_chan_create ( struct m0_rpc_chan **  chan,
struct m0_rpc_machine machine,
struct m0_net_end_point dest_ep,
uint64_t  max_packets_in_flight 
)
static

Definition at line 688 of file rpc_machine.c.

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

◆ rpc_chan_get()

M0_INTERNAL struct m0_rpc_chan* rpc_chan_get ( struct m0_rpc_machine machine,
struct m0_net_end_point dest_ep,
uint64_t  max_packets_in_flight 
)

Definition at line 635 of file rpc_machine.c.

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

◆ rpc_chan_locate()

static struct m0_rpc_chan * rpc_chan_locate ( struct m0_rpc_machine machine,
struct m0_net_end_point dest_ep 
)
static

Definition at line 660 of file rpc_machine.c.

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

◆ rpc_chan_put()

M0_INTERNAL void rpc_chan_put ( struct m0_rpc_chan chan)

Definition at line 729 of file rpc_machine.c.

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

◆ rpc_chan_ref_release()

static void rpc_chan_ref_release ( struct m0_ref ref)
static

Definition at line 747 of file rpc_machine.c.

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

◆ rpc_conn__on_finalised_cb()

static bool rpc_conn__on_finalised_cb ( struct m0_clink clink)
static

Definition at line 280 of file rpc_machine.c.

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

◆ rpc_item_cache_del()

static void rpc_item_cache_del ( struct m0_rpc_item_cache ic,
struct m0_rpc_item item 
)
static

Definition at line 1606 of file item.c.

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

◆ rpc_item_needs_xid()

static bool rpc_item_needs_xid ( const struct m0_rpc_item item)
static

Definition at line 531 of file item.c.

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

◆ rpc_item_xid_unassign()

static void rpc_item_xid_unassign ( struct m0_rpc_item item)
static

Definition at line 596 of file item.c.

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

◆ rpc_recv_pool_buffer_put()

static void rpc_recv_pool_buffer_put ( struct m0_net_buffer nb)
static

Definition at line 954 of file rpc_machine.c.

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

◆ rpc_tm_cleanup()

static void rpc_tm_cleanup ( struct m0_rpc_machine machine)
static

Definition at line 518 of file rpc_machine.c.

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

◆ rpc_tm_event_cb()

static void rpc_tm_event_cb ( const struct m0_net_tm_event ev)
static

Definition at line 110 of file rpc_machine.c.

◆ rpc_tm_setup()

static int rpc_tm_setup ( struct m0_net_transfer_mc tm,
struct m0_net_domain net_dom,
const char *  ep_addr,
struct m0_net_buffer_pool pool,
uint32_t  colour,
m0_bcount_t  msg_size,
uint32_t  qlen 
)
static
Todo:
Find more appropriate err code. tm does not report cause of failure.

Definition at line 453 of file rpc_machine.c.

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

◆ rpc_worker_thread_fn()

M0_INTERNAL void rpc_worker_thread_fn ( struct m0_rpc_machine machine)

Called for each received item.

Definition at line 379 of file rpc_machine.c.

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

◆ session_frm()

M0_INTERNAL struct m0_rpc_frm * session_frm ( const struct m0_rpc_session s)

Definition at line 721 of file formation2.c.

◆ tm_to_rpc_machine()

static struct m0_rpc_machine* tm_to_rpc_machine ( const struct m0_net_transfer_mc tm)
static

Definition at line 448 of file rpc_machine.c.

Here is the caller graph for this function:

Variable Documentation

◆ b_ops

const struct m0_net_buffer_pool_ops b_ops
static
Initial value:
= {
.nbpo_below_threshold = rpc_buffer_pool_low,
}
M0_INTERNAL void m0_net_domain_buffer_pool_not_empty(struct m0_net_buffer_pool *pool)
Definition: tm_provision.c:484
static void rpc_buffer_pool_low(struct m0_net_buffer_pool *bp)
Definition: rpc.c:219

Definition at line 224 of file rpc.c.

◆ conn

struct m0_rpc_conn* conn
static

Definition at line 45 of file item_source.c.

◆ conn_terminating_cb_called

bool conn_terminating_cb_called
static

Definition at line 49 of file item_source.c.

◆ get_item_calls

int get_item_calls
static

Definition at line 48 of file item_source.c.

◆ has_item_calls

int has_item_calls
static

Definition at line 47 of file item_source.c.

◆ incoming_item_sm_conf

const struct m0_sm_conf incoming_item_sm_conf
Initial value:
= {
.scf_name = "Incoming-RPC-Item-sm",
.scf_nr_states = ARRAY_SIZE(incoming_item_states),
.scf_state = incoming_item_states,
}
static struct m0_sm_state_descr incoming_item_states[]
Definition: item.c:276
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 60 of file item.c.

◆ incoming_item_states

struct m0_sm_state_descr incoming_item_states[]
static

Definition at line 276 of file item.c.

◆ item

struct m0_rpc_item* item
static

Definition at line 46 of file item_source.c.

◆ item_source_ut

struct m0_ut_suite item_source_ut
Initial value:
= {
.ts_name = "rpc-item-source-ut",
.ts_tests = {
{ "basic", item_source_basic_test },
{ "item_source_limits", item_source_limits_test },
{ "item_pull", item_source_test },
{ "conn_terminating_cb_test", conn_terminating_cb_test },
{ NULL, NULL },
}
}
#define NULL
Definition: misc.h:38
static int item_source_test_suite_fini(void)
Definition: item_source.c:65
static void item_source_limits_test(void)
Definition: item_source.c:137
static void item_source_test(void)
Definition: item_source.c:186
static int item_source_test_suite_init(void)
Definition: item_source.c:51
static void conn_terminating_cb_test(void)
Definition: item_source.c:250
static void item_source_basic_test(void)
Definition: item_source.c:126

Definition at line 267 of file item_source.c.

◆ m0_rpc__buf_bulk_cb

const struct m0_net_buffer_callbacks m0_rpc__buf_bulk_cb

◆ m0_rpc__filter_opcode

uint32_t m0_rpc__filter_opcode[4] = {}

Definition at line 910 of file rpc_machine.c.

◆ m0_rpc__item_dropped

M0_INTERNAL void(* m0_rpc__item_dropped) (struct m0_rpc_item *item)

Definition at line 868 of file rpc_machine.c.

◆ m0_rpc_frm_default_ops [1/2]

const struct m0_rpc_frm_ops m0_rpc_frm_default_ops
Initial value:
= {
.fo_packet_ready = packet_ready,
}
static int packet_ready(struct m0_rpc_packet *p)
Definition: frmops.c:135

Default implementation of m0_rpc_frm_ops

Definition at line 65 of file frmops.c.

◆ m0_rpc_frm_default_ops [2/2]

const struct m0_rpc_frm_ops m0_rpc_frm_default_ops

Default implementation of m0_rpc_frm_ops

Definition at line 65 of file frmops.c.

◆ m0_rpc_item_onwire_footer_size [1/2]

M0_INTERNAL m0_bcount_t m0_rpc_item_onwire_footer_size

Definition at line 105 of file item.c.

◆ m0_rpc_item_onwire_footer_size [2/2]

M0_EXTERN m0_bcount_t m0_rpc_item_onwire_footer_size

Definition at line 316 of file item.h.

◆ m0_rpc_item_onwire_header_size [1/2]

M0_INTERNAL m0_bcount_t m0_rpc_item_onwire_header_size

Definition at line 104 of file item.c.

◆ m0_rpc_item_onwire_header_size [2/2]

M0_EXTERN m0_bcount_t m0_rpc_item_onwire_header_size

Definition at line 315 of file item.h.

◆ m0_rpc_tm_callbacks

struct m0_net_tm_callbacks m0_rpc_tm_callbacks
static
Initial value:
= {
.ntc_event_cb = rpc_tm_event_cb
}
static void rpc_tm_event_cb(const struct m0_net_tm_event *ev)
Definition: rpc_machine.c:110

Transfer machine callback vector for transfer machines created by rpc layer.

Definition at line 119 of file rpc_machine.c.

◆ M0_XCA_DOMAIN

struct m0_rpc_packet M0_XCA_DOMAIN

◆ M0_XCA_ENUM [1/2]

enum m0_avi_rpc_labels M0_XCA_ENUM

◆ M0_XCA_ENUM [2/2]

enum M0_RPC_OPCODES M0_XCA_ENUM

◆ outgoing_item_sm_conf

const struct m0_sm_conf outgoing_item_sm_conf
Initial value:
= {
.scf_name = "Outgoing-RPC-Item-sm",
.scf_nr_states = ARRAY_SIZE(outgoing_item_states),
.scf_state = outgoing_item_states,
}
static struct m0_sm_state_descr outgoing_item_states[]
Definition: item.c:205
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 59 of file item.c.

◆ outgoing_item_states

struct m0_sm_state_descr outgoing_item_states[]
static

Definition at line 205 of file item.c.

◆ ris_ops

const struct m0_rpc_item_source_ops ris_ops
static
Initial value:
= {
.riso_has_item = has_item,
.riso_get_item = get_item,
.riso_conn_terminating = conn_terminating,
}
static void conn_terminating(struct m0_rpc_item_source *ris)
Definition: item_source.c:111
static bool has_item(const struct m0_rpc_item_source *ris)
Definition: item_source.c:74
static struct m0_rpc_item * get_item(struct m0_rpc_item_source *ris, size_t max_payload_size)
Definition: item_source.c:82

Definition at line 120 of file item_source.c.

◆ rpc_buf_recv_cb

const struct m0_net_buffer_callbacks rpc_buf_recv_cb
static
Initial value:
= {
.nbc_cb = {
}
}
static void buf_recv_cb(const struct m0_net_buffer_event *ev)
Definition: rpc_machine.c:764

Buffer callback for buffers added by rpc layer for receiving messages.

Definition at line 89 of file rpc_machine.c.

◆ rpc_buf_send_cb

const struct m0_net_buffer_callbacks rpc_buf_send_cb
static
Initial value:
= {
.nbc_cb = {
}
}
static void buf_send_cb(const struct m0_net_buffer_event *ev)
Definition: frmops.c:370

Definition at line 108 of file frmops.c.

◆ rpc_buffer_bob_type

const struct m0_bob_type rpc_buffer_bob_type
static
Initial value:
= {
.bt_name = "rpc_buffer",
.bt_magix_offset = M0_MAGIX_OFFSET(struct rpc_buffer, rb_magic),
.bt_magix = M0_RPC_BUF_MAGIC,
.bt_check = NULL,
}
#define NULL
Definition: misc.h:38
#define M0_MAGIX_OFFSET(type, field)
Definition: misc.h:356

Definition at line 90 of file frmops.c.

◆ rpc_item_types_list

struct m0_tl rpc_item_types_list
static

Global rpc item types list.

Definition at line 88 of file item.c.

◆ rpc_item_types_lock

struct m0_rwlock rpc_item_types_lock
static

Definition at line 89 of file item.c.

◆ rpc_machine_bob_type

const struct m0_bob_type rpc_machine_bob_type
static
Initial value:
= {
.bt_name = "rpc_machine",
.bt_magix_offset = M0_MAGIX_OFFSET(struct m0_rpc_machine, rm_magix),
.bt_magix = M0_RPC_MACHINE_MAGIC,
.bt_check = NULL
}
#define NULL
Definition: misc.h:38
#define M0_MAGIX_OFFSET(type, field)
Definition: misc.h:356

Definition at line 77 of file rpc_machine.c.

◆ str_qtype

const char* str_qtype[]
static
Initial value:

Definition at line 76 of file formation2.c.