Tactics i.e. More...
Go to the source code of this file.
Data Structures | |
struct | nm_rdv_chunk_s |
a chunk of rdv data. More... | |
Functions | |
static int | nm_tactic_req_is_short (const struct nm_req_chunk_s *p_req_chunk) |
checks whether req_chunk is a SHORT chunk for optimized protocol More... | |
static nm_len_t | nm_tactic_req_short_size (const struct nm_req_chunk_s *p_req_chunk) |
returns size in pw for the given short req_chunk More... | |
static nm_len_t | nm_tactic_req_data_max_size (const struct nm_req_chunk_s *p_req_chunk) |
returns max size in pw for given data req_chunk- value is a upper bound, actual size may be lower More... | |
static nm_len_t | nm_tactic_req_data_density (const struct nm_req_chunk_s *p_req_chunk) |
compute average block size More... | |
static int | nm_tactic_pack_ctrl (nm_gate_t p_gate, nm_drv_t p_drv __attribute__((unused)), struct nm_ctrl_chunk_s *p_ctrl_chunk, struct nm_pkt_wrap_s *p_pw) |
Try to pack a control chunk in a pw. More... | |
int | nm_tactic_pack_rdv (nm_gate_t p_gate, nm_drv_t p_drv, struct nm_req_chunk_list_s *p_req_chunk_list, struct nm_req_chunk_s *p_req_chunk, struct nm_pkt_wrap_s *p_pw) |
void | nm_tactic_rtr_pack (struct nm_core *p_core, struct nm_pkt_wrap_s *p_pw, int nb_chunks, const struct nm_rdv_chunk_s *p_chunks) |
void | nm_tactic_rdv_accept (struct nm_core *p_core, struct nm_pkt_wrap_s *p_pw) |
|
inlinestatic |
Try to pack a control chunk in a pw.
Definition at line 66 of file nm_tactics.h.
References nm_ctrl_chunk_s::ctrl, nm_core::ctrl_chunk_allocator, nm_gate_s::ctrl_chunk_list, NM_EBUSY, NM_ESUCCESS, NM_HEADER_CTRL_SIZE, nm_pw_add_control(), nm_pw_remaining_buf(), nm_gate_s::p_core, and p_gate.
int nm_tactic_pack_rdv | ( | nm_gate_t | p_gate, |
nm_drv_t | p_drv, | ||
struct nm_req_chunk_list_s * | p_req_chunk_list, | ||
struct nm_req_chunk_s * | p_req_chunk, | ||
struct nm_pkt_wrap_s * | p_pw | ||
) |
void nm_tactic_rdv_accept | ( | struct nm_core * | p_core, |
struct nm_pkt_wrap_s * | p_pw | ||
) |
|
inlinestatic |
compute average block size
Definition at line 54 of file nm_tactics.h.
References nm_data_properties_s::blocks, nm_req_s::data, nm_data_properties_get(), nm_req_chunk_s::p_req, and nm_data_properties_s::size.
|
inlinestatic |
returns max size in pw for given data req_chunk- value is a upper bound, actual size may be lower
Definition at line 42 of file nm_tactics.h.
References nm_data_properties_s::blocks, nm_req_chunk_s::chunk_len, chunk_len, nm_req_chunk_s::chunk_props, NM_ALIGN_FRONTIER, NM_DATA_IOV_THRESHOLD, NM_HEADER_DATA_SIZE, and nm_data_properties_s::size.
|
inlinestatic |
checks whether req_chunk is a SHORT chunk for optimized protocol
Definition at line 25 of file nm_tactics.h.
References nm_req_chunk_s::chunk_len, nm_req_chunk_s::chunk_offset, nm_req_s::len, NM_PROTO_FLAG_LASTCHUNK, nm_req_chunk_s::p_req, nm_req_s::pack, and nm_req_chunk_s::proto_flags.
Referenced by nm_tactic_req_short_size().
|
inlinestatic |
returns size in pw for the given short req_chunk
Definition at line 34 of file nm_tactics.h.
References nm_req_chunk_s::chunk_len, NM_HEADER_SHORT_DATA_SIZE, and nm_tactic_req_is_short().
void nm_tactic_rtr_pack | ( | struct nm_core * | p_core, |
struct nm_pkt_wrap_s * | p_pw, | ||
int | nb_chunks, | ||
const struct nm_rdv_chunk_s * | p_chunks | ||
) |