Motr  M0
mover Struct Reference
Collaboration diagram for mover:
Collaboration graph

Data Fields

uint64_t m_magix
 
struct sockm_sock
 
struct epm_ep
 
struct m0_sm m_sm
 
const struct mover_op_vecm_op
 
struct m0_tlink m_linkage
 
struct bufm_buf
 
struct packet m_pk
 
char m_pkbuf [sizeof(struct packet)]
 
m0_bcount_t m_nob
 
void * m_scratch
 

Detailed Description

A mover.

A mover is a state machine (mover::m_sm) with non-blocking state-transitions, moving data between a buffer (mover::m_buf) and an end-point (mover::m_ep).

Definition at line 846 of file sock.c.

Field Documentation

◆ m_buf

struct buf* m_buf

The buffer from or to which data are moved.

Definition at line 867 of file sock.c.

◆ m_ep

struct ep* m_ep

The end-point. A writer takes a reference to it (ep_add()).

Definition at line 861 of file sock.c.

◆ m_linkage

struct m0_tlink m_linkage

Linkage in the list of writers for an end-point (ep::e_writer).

Definition at line 865 of file sock.c.

◆ m_magix

uint64_t m_magix

Definition at line 847 of file sock.c.

◆ m_nob

m0_bcount_t m_nob

How many bytes (header and payload) has been ioed in the current packet.

Definition at line 876 of file sock.c.

◆ m_op

const struct mover_op_vec* m_op

Definition at line 863 of file sock.c.

◆ m_pk

struct packet m_pk

The current packet.

Definition at line 869 of file sock.c.

◆ m_pkbuf

char m_pkbuf[sizeof(struct packet)]

The current packet in on-wire form.

Definition at line 871 of file sock.c.

◆ m_scratch

void* m_scratch

An intermediate buffer into which a packet is read from a datagram socket.

Definition at line 881 of file sock.c.

◆ m_sm

struct m0_sm m_sm

Definition at line 862 of file sock.c.

◆ m_sock

struct sock* m_sock

For a reader, which is always embedded in a sock (sock::s_reader), this points back to the ambient sock.

A writer is always embedded in a buffer (buf::b_writer) and is associated with a particular end-point (mover::m_ep), but can switch between different sockets to that end-point. This switch can happen only on a boundary between packets. When the writer is busy writing a packet (R_PK, R_HEADER, R_INTERVAL and R_PK_DONE states), it is locked to the socket to which mover::m_sock points.

Definition at line 859 of file sock.c.


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