nm_tactics.h
Go to the documentation of this file.
52 const nm_len_t max_header_blocks = (max_headers > p_req_chunk->chunk_props.blocks) ? p_req_chunk->chunk_props.blocks : max_headers;
53 const nm_len_t max_header_len = NM_HEADER_DATA_SIZE + max_header_blocks * sizeof(struct nm_header_pkt_data_chunk_s) + NM_ALIGN_FRONTIER;
103void 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);
static const struct nm_data_properties_s * nm_data_properties_get(const struct nm_data_s *p_data)
returns the properties block for the data
Definition nm_data.h:659
assert(p_data->ops.p_traversal !=NULL)
static void nm_core_lock_assert(struct nm_core *p_core)
assert that current thread holds the lock
static nm_len_t nm_pw_remaining_buf(struct nm_pkt_wrap_s *p_pw)
remaining space in pw buffer
Definition nm_pkt_wrap.h:270
int nm_pw_add_control(struct nm_pkt_wrap_s *p_pw, const union nm_header_ctrl_generic_s *p_ctrl, const void *p_payload)
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
Definition nm_tactics.h:29
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)
nm_len_t nm_tactic_get_iov_threshold(void)
get the value of NMAD_DATA_IOV_THRESHOLD
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)
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
Definition nm_tactics.h:38
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
Definition nm_tactics.h:46
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.
Definition nm_tactics.h:70
void nm_tactic_rdv_accept(struct nm_core *p_core, struct nm_pkt_wrap_s *p_pw)
static nm_len_t nm_tactic_req_data_density(const struct nm_req_chunk_s *p_req_chunk)
compute average block size
Definition nm_tactics.h:58
struct nm_ctrl_chunk_allocator_s ctrl_chunk_allocator
allocator for control chunks
Definition nm_core.h:70
struct nm_ctrl_chunk_list_s ctrl_chunk_list
control chunks posted to the gate
Definition nm_gate.h:137
nm_len_t chunk_offset
offset of the chunk relative to the full data in the req
Definition nm_core_interface.h:474
struct nm_data_properties_s chunk_props
properties of the data chunk
Definition nm_core_interface.h:476
struct nm_req_s * p_req
link to insert the req chunk as a core task
Definition nm_core_interface.h:472
struct nm_req_s::@15::@17 pack