Motr  M0
mem_xprt_xo.c File Reference
Include dependency graph for mem_xprt_xo.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_NET
 

Functions

M0_INTERNAL int m0_mem_xprt_init (void)
 
M0_INTERNAL void m0_mem_xprt_fini (void)
 
static m0_bcount_t mem_buffer_length (const struct m0_net_buffer *nb)
 
static bool mem_buffer_in_bounds (const struct m0_net_buffer *nb)
 
static int mem_copy_buffer (struct m0_net_buffer *d_nb, struct m0_net_buffer *s_nb, m0_bcount_t num_bytes)
 
static void mem_wi_add (struct m0_net_bulk_mem_work_item *wi, struct m0_net_bulk_mem_tm_pvt *tp)
 
static void mem_wi_post_buffer_event (struct m0_net_bulk_mem_work_item *wi)
 
static bool mem_dom_invariant (const struct m0_net_domain *dom)
 
static bool mem_ep_invariant (const struct m0_net_end_point *ep)
 
static bool mem_buffer_invariant (const struct m0_net_buffer *nb)
 
static bool mem_tm_invariant (const struct m0_net_transfer_mc *tm)
 
static int mem_xo_dom_init (const struct m0_net_xprt *xprt, struct m0_net_domain *dom)
 
static void mem_xo_dom_fini (struct m0_net_domain *dom)
 
static m0_bcount_t mem_xo_get_max_buffer_size (const struct m0_net_domain *dom)
 
static m0_bcount_t mem_xo_get_max_buffer_segment_size (const struct m0_net_domain *dom)
 
static int32_t mem_xo_get_max_buffer_segments (const struct m0_net_domain *dom)
 
static int mem_xo_end_point_create (struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const char *addr)
 
static int mem_xo_buf_register (struct m0_net_buffer *nb)
 
static void mem_xo_buf_deregister (struct m0_net_buffer *nb)
 
static int mem_xo_buf_add (struct m0_net_buffer *nb)
 
static void mem_xo_buf_del (struct m0_net_buffer *nb)
 
static int mem_xo_tm_init (struct m0_net_transfer_mc *tm)
 
static void mem_xo_tm_fini (struct m0_net_transfer_mc *tm)
 
M0_INTERNAL void m0_net_bulk_mem_tm_set_num_threads (struct m0_net_transfer_mc *tm, size_t num)
 
M0_INTERNAL size_t m0_net_bulk_mem_tm_get_num_threads (const struct m0_net_transfer_mc *tm)
 
static int mem_xo_tm_start (struct m0_net_transfer_mc *tm, const char *addr)
 
static int mem_xo_tm_stop (struct m0_net_transfer_mc *tm, bool cancel)
 
static m0_bcount_t mem_xo_get_max_buffer_desc_size (const struct m0_net_domain *dom)
 

Variables

static struct m0_list mem_domains
 
static const struct m0_net_bulk_mem_ops mem_xprt_methods
 
static const struct m0_net_xprt_ops mem_xo_xprt_ops
 
const struct m0_net_xprt m0_net_bulk_mem_xprt
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_NET

Definition at line 23 of file mem_xprt_xo.c.

Function Documentation

◆ mem_buffer_in_bounds()

static bool mem_buffer_in_bounds ( const struct m0_net_buffer nb)
static

Check buffer size limits.

Definition at line 85 of file mem_xprt_xo.c.

◆ mem_buffer_invariant()

static bool mem_buffer_invariant ( const struct m0_net_buffer nb)
static

Definition at line 176 of file mem_xprt_xo.c.

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

◆ mem_buffer_length()

static m0_bcount_t mem_buffer_length ( const struct m0_net_buffer nb)
static

Definition at line 77 of file mem_xprt_xo.c.

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

◆ mem_copy_buffer()

static int mem_copy_buffer ( struct m0_net_buffer d_nb,
struct m0_net_buffer s_nb,
m0_bcount_t  num_bytes 
)
static

Copy from one buffer to another. Each buffer may have different number of segments and segment sizes. The subroutine does not set the nb_length field of the d_nb buffer.

Parameters
d_nbThe destination buffer pointer.
s_nbThe source buffer pointer.
num_bytesThe number of bytes to copy.
Precondition
mem_buffer_length(d_nb) >= num_bytes && mem_buffer_length(s_nb) >= num_bytes

Definition at line 113 of file mem_xprt_xo.c.

Here is the call graph for this function:

◆ mem_dom_invariant()

static bool mem_dom_invariant ( const struct m0_net_domain dom)
static

Definition at line 163 of file mem_xprt_xo.c.

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

◆ mem_ep_invariant()

static bool mem_ep_invariant ( const struct m0_net_end_point ep)
static

Definition at line 169 of file mem_xprt_xo.c.

Here is the call graph for this function:

◆ mem_tm_invariant()

static bool mem_tm_invariant ( const struct m0_net_transfer_mc tm)
static

Definition at line 183 of file mem_xprt_xo.c.

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

◆ mem_wi_add()

static void mem_wi_add ( struct m0_net_bulk_mem_work_item wi,
struct m0_net_bulk_mem_tm_pvt tp 
)
static

Add a work item to the work list

Definition at line 137 of file mem_xprt_xo.c.

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

◆ mem_wi_post_buffer_event()

static void mem_wi_post_buffer_event ( struct m0_net_bulk_mem_work_item wi)
static

Post a buffer event.

Definition at line 147 of file mem_xprt_xo.c.

Here is the call graph for this function: