Motr  M0
m0_rpc_item Struct Reference

#include <item.h>

Collaboration diagram for m0_rpc_item:
Collaboration graph

Data Fields

enum m0_rpc_item_priority ri_prio
 
uint64_t ri_ha_epoch
 
m0_time_t ri_deadline
 
m0_time_t ri_resend_interval
 
uint64_t ri_nr_sent_max
 
struct m0_rpc_sessionri_session
 
const struct m0_rpc_item_opsri_ops
 
uint32_t ri_flags
 
struct m0_rpc_machineri_rmachine
 
int32_t ri_error
 
struct m0_rpc_itemri_reply
 
struct m0_sm_timeout ri_deadline_timeout
 
struct m0_sm_timer ri_timer
 
struct m0_sm ri_sm
 
uint32_t ri_nr_sent
 
struct m0_rpc_itemri_pending_reply
 
uint64_t ri_cookid
 
struct m0_rpc_item_header2 ri_header
 
size_t ri_size
 
const struct m0_rpc_item_typeri_type
 
m0_time_t ri_rpc_time
 
struct m0_tl ri_compound_items
 
struct m0_tlink ri_field
 
struct m0_tlink ri_iq_link
 
struct m0_tlink ri_plink
 
struct m0_rpc_packetri_packet
 
struct m0_tlri_itemq
 
struct m0_rpc_frmri_frm
 
struct m0_tlink ri_pending_link
 
uint64_t ri_magic
 
struct m0_tlink ri_cache_link
 
struct m0_tlink ri_xid_link
 
bool ri_xid_assigned_here
 
m0_time_t ri_cache_deadline
 

Detailed Description

A single RPC item, such as a FOP or ADDB Record. This structure should be included in every item being sent via RPC layer core to emulate relationship similar to inheritance and to allow extending the set of rpc_items without modifying core rpc headers.

See also
m0_fop.

Definition at line 130 of file item.h.

Field Documentation

◆ ri_cache_deadline

m0_time_t ri_cache_deadline

After this time item can be safely removed from reply cache

Definition at line 240 of file item.h.

◆ ri_cache_link

struct m0_tlink ri_cache_link

Link for m0_rpc_item_cache::ric_items.

Definition at line 234 of file item.h.

◆ ri_compound_items

struct m0_tl ri_compound_items

List of compound items.

Definition at line 204 of file item.h.

◆ ri_cookid

uint64_t ri_cookid

Cookie id by which we find the request from the reply.

Definition at line 190 of file item.h.

◆ ri_deadline

m0_time_t ri_deadline

Absolute time after which formation should not delay sending the item.

Definition at line 141 of file item.h.

◆ ri_deadline_timeout

struct m0_sm_timeout ri_deadline_timeout

If ri_deadline is not in past the ri_deadline_timeout is used to move item from ENQUEUD to URGENT state.

Definition at line 169 of file item.h.

◆ ri_error

int32_t ri_error

Definition at line 161 of file item.h.

◆ ri_field

struct m0_tlink ri_field

Link through which items are anchored on list of m0_rpc_item:ri_compound_items.

Definition at line 207 of file item.h.

◆ ri_flags

uint32_t ri_flags

Item flags. A bitmask of values from enum m0_rpc_item_flags.

This field is packed in item header when the item is sent and copied back in this field on receiver.

Definition at line 156 of file item.h.

◆ ri_frm

struct m0_rpc_frm* ri_frm

Definition at line 226 of file item.h.

◆ ri_ha_epoch

uint64_t ri_ha_epoch

HA epoch transferred by the item.

Definition at line 136 of file item.h.

◆ ri_header

struct m0_rpc_item_header2 ri_header

On-wire data of the item.

Definition at line 193 of file item.h.

◆ ri_iq_link

struct m0_tlink ri_iq_link

Link in one of m0_rpc_frm::f_itemq[] list. List descriptor: itemq

Definition at line 211 of file item.h.

◆ ri_itemq

struct m0_tl* ri_itemq

One of m0_rpc_frm::f_itemq[], in which this item is placed.

Definition at line 225 of file item.h.

◆ ri_magic

uint64_t ri_magic

M0_RPC_ITEM_MAGIC

Definition at line 232 of file item.h.

◆ ri_nr_sent

uint32_t ri_nr_sent

Number of times the item was sent

Definition at line 183 of file item.h.

◆ ri_nr_sent_max

uint64_t ri_nr_sent_max

How many resending attempts to make (defaults to ~0).

Definition at line 146 of file item.h.

◆ ri_ops

const struct m0_rpc_item_ops* ri_ops

item operations

Definition at line 149 of file item.h.

◆ ri_packet

struct m0_rpc_packet* ri_packet

Packet this item has been placed into. It is required if the item is to be cancelled while being sent.

Definition at line 223 of file item.h.

◆ ri_pending_link

struct m0_tlink ri_pending_link

Link through which items are anchored on m0_rpc_session::s_pending_cache.

Definition at line 230 of file item.h.

◆ ri_pending_reply

struct m0_rpc_item* ri_pending_reply

Reply received when request is still in SENDING state is kept "pending" until the request item moves to SENT state.

Definition at line 187 of file item.h.

◆ ri_plink

struct m0_tlink ri_plink

Link in RPC packet. m0_rpc_packet::rp_items List descriptor: packet_item. XXX An item cannot be in itemq and in packet at the same time. Hence, iff needed, ri_iq_link and ri_plink can be replaced with just one tlink.

Definition at line 218 of file item.h.

◆ ri_prio

enum m0_rpc_item_priority ri_prio

Definition at line 133 of file item.h.

◆ ri_reply

struct m0_rpc_item* ri_reply

reply item

Definition at line 163 of file item.h.

◆ ri_resend_interval

m0_time_t ri_resend_interval

Time to wait before resending (defaults to M0_RPC_ITEM_RESEND_INTERVAL seconds).

Definition at line 144 of file item.h.

◆ ri_rmachine

struct m0_rpc_machine* ri_rmachine

Definition at line 160 of file item.h.

◆ ri_rpc_time

m0_time_t ri_rpc_time

Time spent in rpc layer.

Definition at line 202 of file item.h.

◆ ri_session

struct m0_rpc_session* ri_session

Definition at line 147 of file item.h.

◆ ri_size

size_t ri_size

Item size in bytes. header + payload. Set during first call to m0_rpc_item_size() on this item.

Definition at line 198 of file item.h.

◆ ri_sm

struct m0_sm ri_sm

RPC item state machine.

See also
outgoing_item_states
incoming_item_states

Definition at line 181 of file item.h.

◆ ri_timer

struct m0_sm_timer ri_timer

Resend timer.

Invokes item_timer_cb() after every item->ri_resend_interval. item_timer_cb() then decides whether to resend the item or timeout the operation, depending on ri_nr_sent and ri_nr_sent_max.

Definition at line 176 of file item.h.

◆ ri_type

const struct m0_rpc_item_type* ri_type

Pointer to the type object for this item

Definition at line 200 of file item.h.

◆ ri_xid_assigned_here

bool ri_xid_assigned_here

xid was assigned in this process, i.e. item is in ri_xid_link.

Definition at line 238 of file item.h.

◆ ri_xid_link

struct m0_tlink ri_xid_link

Link for m0_rpc_session::s_xid_list.

Definition at line 236 of file item.h.


The documentation for this struct was generated from the following file: