NewMadeleine

Documentation

nm_core_inline.h File Reference

Inline functions for nmad core. More...

#include <nm_private.h>
Include dependency graph for nm_core_inline.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static struct nm_trk_snm_gate_trk_get (nm_gate_t p_gate, nm_drv_t p_drv)
 Get the track per-gate data. More...
 
static struct nm_trk_snm_trk_get_by_index (nm_gate_t p_gate, int index)
 Get a driver given its id. More...
 
static nm_len_t nm_drv_max_small (const struct nm_drv_s *const p_drv)
 get maximum size for small messages for the given driver More...
 
static void nm_pw_assign (struct nm_pkt_wrap_s *p_pw, nm_trk_id_t trk_id, struct nm_drv_s *p_drv, nm_gate_t p_gate)
 assign packet to given driver, gate, and track More...
 
static void nm_pw_ref_inc (struct nm_pkt_wrap_s *p_pw)
 
static void nm_pw_ref_dec (struct nm_pkt_wrap_s *p_pw)
 
static int nm_gate_isactive (struct nm_gate_s *p_gate)
 
static int nm_gate_is_in_active_list (struct nm_core *p_core, struct nm_gate_s *p_gate)
 
static void nm_gate_set_active (struct nm_gate_s *p_gate)
 mark gate as having active requests More...
 
static void nm_core_task_enqueue (struct nm_core *p_core, int holding_lock, struct nm_core_task_s *p_core_task)
 
static void nm_strat_submit_req_chunk (nm_core_t p_core, nm_gate_t p_gate, struct nm_req_chunk_s *p_req_chunk, int front)
 
static void nm_strat_rdv_accept (nm_core_t p_core, nm_gate_t p_gate)
 process postponed rdv requests More...
 
static void nm_strat_gate_schedule (nm_core_t p_core, nm_gate_t p_gate)
 apply strategy on the given gate, for the case where strategy doesn't have global scheduling
More...
 
static void nm_strat_schedule (nm_core_t p_core, nm_gate_t p_gate)
 apply strategy on the given gate (all active gates if p_gate = NULL) More...
 
static void nm_strat_pack_ctrl (nm_gate_t p_gate, nm_header_ctrl_generic_t *p_header)
 
static void nm_pw_completed_enqueue (struct nm_core *p_core, struct nm_pkt_wrap_s *p_pw)
 enqueue a pw completion, or process immediately if possible More...
 
static void nm_req_chunk_submit (struct nm_core *p_core, struct nm_req_chunk_s *p_req_chunk)
 
static void nm_req_chunk_destroy (struct nm_core *p_core, struct nm_req_chunk_s *p_req_chunk)
 
static struct nm_req_chunk_snm_req_chunk_alloc (struct nm_core *p_core)
 
static void nm_req_chunk_init (struct nm_req_chunk_s *p_req_chunk, struct nm_req_s *p_req, nm_len_t chunk_offset, nm_len_t chunk_len)
 
static void nm_core_post_rtr (nm_gate_t p_gate, nm_core_tag_t tag, nm_seq_t seq, nm_trk_id_t trk_id, nm_len_t chunk_offset, nm_len_t chunk_len, const void *p_rdv_data)
 Post a ready-to-receive to accept chunk on given trk_id. More...
 
static void nm_core_post_ack (nm_gate_t p_gate, nm_core_tag_t tag, nm_seq_t seq)
 Post an ACK. More...
 
static void nm_core_post_msg (nm_gate_t p_gate, nm_core_tag_t tag, nm_seq_t seq, nm_len_t msg_len)
 
static void nm_core_polling_level (struct nm_core *p_core)
 dynamically adapt pioman polling frequency level depending on the number of pending requests More...
 
static struct nm_matching_wildcard_snm_matching_wildcard_bytag (struct nm_core *p_core, nm_core_tag_t core_tag)
 
static struct nm_matching_gsession_snm_matching_gsession_bytag (struct nm_gate_s *p_gate, nm_core_tag_t core_tag)
 

Detailed Description

Inline functions for nmad core.

These functions are defined inlined for performance.

Definition in file nm_core_inline.h.

Function Documentation

◆ nm_core_polling_level()

static void nm_core_polling_level ( struct nm_core p_core)
inlinestatic

dynamically adapt pioman polling frequency level depending on the number of pending requests

Definition at line 389 of file nm_core_inline.h.

References nm_core::n_packs, nm_core::n_unpacks, nm_core_lock_assert(), and nm_core::pending_tasks.

Here is the call graph for this function:

◆ nm_core_post_ack()

static void nm_core_post_ack ( nm_gate_t  p_gate,
nm_core_tag_t  tag,
nm_seq_t  seq 
)
inlinestatic

Post an ACK.

Definition at line 374 of file nm_core_inline.h.

References h, nm_header_init_ack(), nm_strat_pack_ctrl(), p_gate, seq, and tag.

Here is the call graph for this function:

◆ nm_core_post_msg()

static void nm_core_post_msg ( nm_gate_t  p_gate,
nm_core_tag_t  tag,
nm_seq_t  seq,
nm_len_t  msg_len 
)
inlinestatic

Definition at line 381 of file nm_core_inline.h.

References h, msg_len, nm_header_init_msg(), nm_strat_pack_ctrl(), p_gate, seq, and tag.

Here is the call graph for this function:

◆ nm_core_post_rtr()

static void nm_core_post_rtr ( nm_gate_t  p_gate,
nm_core_tag_t  tag,
nm_seq_t  seq,
nm_trk_id_t  trk_id,
nm_len_t  chunk_offset,
nm_len_t  chunk_len,
const void *  p_rdv_data 
)
inlinestatic

Post a ready-to-receive to accept chunk on given trk_id.

Definition at line 359 of file nm_core_inline.h.

References chunk_len, chunk_offset, h, NM_FATAL, nm_header_init_rtr(), nm_strat_pack_ctrl(), p_gate, seq, tag, and trk_id.

Here is the call graph for this function:

◆ nm_core_task_enqueue()

static void nm_core_task_enqueue ( struct nm_core p_core,
int  holding_lock,
struct nm_core_task_s p_core_task 
)
inlinestatic

Definition at line 129 of file nm_core_inline.h.

References nm_core_lock_assert(), nm_core_nolock_assert(), nm_core_task_flush(), nm_core_trylock(), nm_core_unlock(), and nm_core::pending_tasks.

Referenced by nm_pw_completed_enqueue(), and nm_req_chunk_submit().

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

◆ nm_drv_max_small()

static nm_len_t nm_drv_max_small ( const struct nm_drv_s *const  p_drv)
inlinestatic

◆ nm_gate_is_in_active_list()

static int nm_gate_is_in_active_list ( struct nm_core p_core,
struct nm_gate_s p_gate 
)
inlinestatic

Definition at line 108 of file nm_core_inline.h.

References nm_core::active_gates, and p_gate.

Referenced by nm_gate_set_active().

Here is the caller graph for this function:

◆ nm_gate_isactive()

static int nm_gate_isactive ( struct nm_gate_s p_gate)
inlinestatic

Definition at line 100 of file nm_core_inline.h.

References nm_gate_s::ctrl_chunk_list, p_gate, nm_gate_s::pending_large_recv, nm_gate_s::req_chunk_list, and nm_gate_s::strat_todo.

Referenced by nm_gate_set_active(), and nm_strat_schedule().

Here is the caller graph for this function:

◆ nm_gate_set_active()

static void nm_gate_set_active ( struct nm_gate_s p_gate)
inlinestatic

mark gate as having active requests

Definition at line 115 of file nm_core_inline.h.

References nm_core::active_gates, nm_core_lock_assert(), nm_gate_is_in_active_list(), nm_gate_isactive(), nm_gate_s::p_core, and p_gate.

Referenced by nm_strat_pack_ctrl(), nm_strat_rdv_accept(), and nm_strat_submit_req_chunk().

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

◆ nm_gate_trk_get()

static struct nm_trk_s * nm_gate_trk_get ( nm_gate_t  p_gate,
nm_drv_t  p_drv 
)
inlinestatic

Get the track per-gate data.

Definition at line 29 of file nm_core_inline.h.

References nm_gate_s::n_trks, nm_trk_s::p_drv, p_gate, and nm_gate_s::trks.

◆ nm_matching_gsession_bytag()

static struct nm_matching_gsession_s * nm_matching_gsession_bytag ( struct nm_gate_s p_gate,
nm_core_tag_t  core_tag 
)
inlinestatic

Definition at line 412 of file nm_core_inline.h.

References nm_gate_s::gsessions, nm_core_tag_build(), nm_core_tag_get_hashcode(), and p_gate.

Here is the call graph for this function:

◆ nm_matching_wildcard_bytag()

static struct nm_matching_wildcard_s * nm_matching_wildcard_bytag ( struct nm_core p_core,
nm_core_tag_t  core_tag 
)
inlinestatic

Definition at line 405 of file nm_core_inline.h.

References nm_core_tag_build(), nm_core_tag_get_hashcode(), nm_matching_wildcard_get(), and nm_core::wildcard_table.

Here is the call graph for this function:

◆ nm_pw_assign()

static void nm_pw_assign ( struct nm_pkt_wrap_s p_pw,
nm_trk_id_t  trk_id,
struct nm_drv_s p_drv,
nm_gate_t  p_gate 
)
inlinestatic

◆ nm_pw_completed_enqueue()

static void nm_pw_completed_enqueue ( struct nm_core p_core,
struct nm_pkt_wrap_s p_pw 
)
inlinestatic

enqueue a pw completion, or process immediately if possible

Definition at line 288 of file nm_core_inline.h.

References nm_core_task_s::completed_pw, nm_core_task_s::content, nm_pkt_wrap_s::core_task, nm_pkt_wrap_s::flags, nm_core_task_s::kind, nm_core_nolock_assert(), NM_CORE_TASK_COMPLETED_PW, nm_core_task_enqueue(), NM_PW_COMPLETED, and nm_core_task_s::p_pw.

Here is the call graph for this function:

◆ nm_pw_ref_dec()

static void nm_pw_ref_dec ( struct nm_pkt_wrap_s p_pw)
inlinestatic

Definition at line 87 of file nm_core_inline.h.

References count, nm_atomic_dec(), nm_pw_free(), nm_drv_s::p_core, nm_pkt_wrap_s::p_drv, and nm_pkt_wrap_s::ref_count.

Here is the call graph for this function:

◆ nm_pw_ref_inc()

static void nm_pw_ref_inc ( struct nm_pkt_wrap_s p_pw)
inlinestatic

Definition at line 83 of file nm_core_inline.h.

References nm_atomic_inc(), and nm_pkt_wrap_s::ref_count.

Here is the call graph for this function:

◆ nm_req_chunk_alloc()

static struct nm_req_chunk_s * nm_req_chunk_alloc ( struct nm_core p_core)
inlinestatic

Definition at line 330 of file nm_core_inline.h.

References nm_core::req_chunk_allocator.

◆ nm_req_chunk_destroy()

static void nm_req_chunk_destroy ( struct nm_core p_core,
struct nm_req_chunk_s p_req_chunk 
)
inlinestatic

◆ nm_req_chunk_init()

◆ nm_req_chunk_submit()

static void nm_req_chunk_submit ( struct nm_core p_core,
struct nm_req_chunk_s p_req_chunk 
)
inlinestatic

◆ nm_strat_gate_schedule()

static void nm_strat_gate_schedule ( nm_core_t  p_core,
nm_gate_t  p_gate 
)
inlinestatic

apply strategy on the given gate, for the case where strategy doesn't have global scheduling

Definition at line 209 of file nm_core_inline.h.

References nm_core_lock_assert(), nm_profile_inc, nm_strat_rdv_accept(), nm_gate_s::p_core, p_gate, nm_strategy_iface_s::schedule, nm_core::strategy_iface, and nm_gate_s::strategy_receptacle.

Referenced by nm_strat_schedule().

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

◆ nm_strat_pack_ctrl()

static void nm_strat_pack_ctrl ( nm_gate_t  p_gate,
nm_header_ctrl_generic_t p_header 
)
inlinestatic

◆ nm_strat_rdv_accept()

static void nm_strat_rdv_accept ( nm_core_t  p_core,
nm_gate_t  p_gate 
)
inlinestatic

process postponed rdv requests

Definition at line 194 of file nm_core_inline.h.

References nm_core_lock_assert(), nm_gate_set_active(), p_gate, nm_gate_s::pending_large_recv, and nm_gate_s::strategy_receptacle.

Referenced by nm_strat_gate_schedule().

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

◆ nm_strat_schedule()

static void nm_strat_schedule ( nm_core_t  p_core,
nm_gate_t  p_gate 
)
inlinestatic

apply strategy on the given gate (all active gates if p_gate = NULL)

Definition at line 222 of file nm_core_inline.h.

References nm_core::active_gates, nm_core_lock_assert(), nm_gate_isactive(), NM_GATE_STATUS_CONNECTED, nm_strat_gate_schedule(), p_gate, nm_strategy_iface_s::schedule, nm_gate_s::status, nm_core::strategy_context, and nm_core::strategy_iface.

Here is the call graph for this function:

◆ nm_strat_submit_req_chunk()

static void nm_strat_submit_req_chunk ( nm_core_t  p_core,
nm_gate_t  p_gate,
struct nm_req_chunk_s p_req_chunk,
int  front 
)
inlinestatic

◆ nm_trk_get_by_index()

static struct nm_trk_s * nm_trk_get_by_index ( nm_gate_t  p_gate,
int  index 
)
inlinestatic

Get a driver given its id.

Definition at line 43 of file nm_core_inline.h.

References nm_gate_s::n_trks, p_gate, and nm_gate_s::trks.