Motr  M0
Network Module Internals
Collaboration diagram for Network Module Internals:

Functions

M0_INTERNAL bool m0_net__qtype_is_valid (enum m0_net_queue_type qt)
 
M0_INTERNAL bool m0_net__tm_state_is_valid (enum m0_net_tm_state ts)
 
M0_INTERNAL bool m0_net__tm_event_invariant (const struct m0_net_tm_event *ev)
 
M0_INTERNAL bool m0_net__tm_ev_type_is_valid (enum m0_net_tm_ev_type et)
 
M0_INTERNAL bool m0_net__buffer_event_invariant (const struct m0_net_buffer_event *ev)
 
M0_INTERNAL bool m0_net__buffer_invariant (const struct m0_net_buffer *buf)
 
M0_INTERNAL int m0_net__buffer_add (struct m0_net_buffer *buf, struct m0_net_transfer_mc *tm)
 
M0_INTERNAL bool m0_net__ep_invariant (struct m0_net_end_point *ep, struct m0_net_transfer_mc *tm, bool under_tm_mutex)
 
M0_INTERNAL bool m0_net__tm_invariant (const struct m0_net_transfer_mc *tm)
 
M0_INTERNAL int m0_net__tm_provision_buf (struct m0_net_transfer_mc *tm)
 
M0_INTERNAL void m0_net__tm_provision_recv_q (struct m0_net_transfer_mc *tm)
 
M0_INTERNAL int m0_net__tm_stats_get (struct m0_net_transfer_mc *tm, enum m0_net_queue_type qtype, struct m0_net_qstats *qs, bool reset)
 
M0_INTERNAL void m0_net__tm_post_callback (struct m0_net_transfer_mc *tm)
 
M0_INTERNAL void m0_net__tm_cancel (struct m0_net_transfer_mc *tm)
 

Variables

struct m0_mutex m0_net_mutex
 

Detailed Description

Private interfaces used within the Network module.

Function Documentation

◆ m0_net__buffer_add()

M0_INTERNAL int m0_net__buffer_add ( struct m0_net_buffer buf,
struct m0_net_transfer_mc tm 
)

Internal version of m0_net_buffer_add() that must be invoked holding the TM mutex.

Todo:
should be m0_net_desc_free()?

Definition at line 130 of file buf.c.

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

◆ m0_net__buffer_event_invariant()

M0_INTERNAL bool m0_net__buffer_event_invariant ( const struct m0_net_buffer_event ev)

Buffer event invariant.

Definition at line 297 of file buf.c.

Here is the caller graph for this function:

◆ m0_net__buffer_invariant()

M0_INTERNAL bool m0_net__buffer_invariant ( const struct m0_net_buffer buf)

Buffer checks for a registered buffer. Must be called within the domain or transfer machine mutex.

Definition at line 46 of file buf.c.

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

◆ m0_net__ep_invariant()

M0_INTERNAL bool m0_net__ep_invariant ( struct m0_net_end_point ep,
struct m0_net_transfer_mc tm,
bool  under_tm_mutex 
)

Invariant checks for an end point. No mutex necessary. Extra checks if under_tm_mutex set to true.

Definition at line 42 of file ep.c.

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

◆ m0_net__qtype_is_valid()

M0_INTERNAL bool m0_net__qtype_is_valid ( enum m0_net_queue_type  qt)

Validates the value of buffer queue type.

Definition at line 41 of file buf.c.

Here is the caller graph for this function:

◆ m0_net__tm_cancel()

M0_INTERNAL void m0_net__tm_cancel ( struct m0_net_transfer_mc tm)

Cancels all buffers posted to the machine queues.

Precondition
m0_mutex_is_locked(&tm->ntm_mutex)

Definition at line 145 of file tm.c.

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

◆ m0_net__tm_ev_type_is_valid()

M0_INTERNAL bool m0_net__tm_ev_type_is_valid ( enum m0_net_tm_ev_type  et)

Validates the TM event type.

Definition at line 49 of file tm.c.

Here is the caller graph for this function:

◆ m0_net__tm_event_invariant()

M0_INTERNAL bool m0_net__tm_event_invariant ( const struct m0_net_tm_event ev)

TM event invariant.

Definition at line 54 of file tm.c.

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

◆ m0_net__tm_invariant()

M0_INTERNAL bool m0_net__tm_invariant ( const struct m0_net_transfer_mc tm)

Validates tm state. Must be called within the domain or transfer machine mutex.

Definition at line 67 of file tm.c.

Here is the caller graph for this function:

◆ m0_net__tm_post_callback()

M0_INTERNAL void m0_net__tm_post_callback ( struct m0_net_transfer_mc tm)

Common part of post-callback processing for m0_net_tm_event_post() and m0_net_buffer_event_post().

Under tm mutex: decrement ref counts, signal waiters

Definition at line 123 of file tm.c.

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

◆ m0_net__tm_provision_buf()

M0_INTERNAL int m0_net__tm_provision_buf ( struct m0_net_transfer_mc tm)

Definition at line 414 of file tm_provision.c.

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

◆ m0_net__tm_provision_recv_q()

M0_INTERNAL void m0_net__tm_provision_recv_q ( struct m0_net_transfer_mc tm)

Internal subroutine to provision the receive queue of a transfer machine from its associated buffer pool.

Precondition
m0_mutex_is_not_locked(&tm->ntm_mutex) && tm->ntm_callback_counter > 0
m0_net_buffer_pool_is_not_locked(&tm->ntm_recv_pool))
Postcondition
Length of receive queue >= tm->ntm_recv_queue_min_length && tm->ntm_recv_queue_deficit == 0 || Length of receive queue + tm->ntm_recv_queue_deficit == tm->ntm_recv_queue_min_length

Definition at line 509 of file tm_provision.c.

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

◆ m0_net__tm_state_is_valid()

M0_INTERNAL bool m0_net__tm_state_is_valid ( enum m0_net_tm_state  ts)

Validates transfer machine state.

Definition at line 44 of file tm.c.

Here is the caller graph for this function:

◆ m0_net__tm_stats_get()

M0_INTERNAL int m0_net__tm_stats_get ( struct m0_net_transfer_mc tm,
enum m0_net_queue_type  qtype,
struct m0_net_qstats qs,
bool  reset 
)

Internal sub variant to get TM statistics from within the TM mutex.

Precondition
m0_mutex_is_locked(&tm->ntm_mutex)

Definition at line 320 of file tm.c.

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

Variable Documentation

◆ m0_net_mutex

struct m0_mutex m0_net_mutex

Network module global mutex. This mutex is used to serialize domain init and fini. It is defined here so that it can get initialized and fini'd by the general initialization mechanism. Transport that deal with multiple domains can rely on this mutex being held across their xo_dom_init() and xo_dom_fini() methods.

Definition at line 59 of file net.c.