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 | |
| nm_len_t | nm_tactic_get_iov_threshold (void) |
| get the value of NMAD_DATA_IOV_THRESHOLD | |
| 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 | |
| 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 | |
| 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 | |
| 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. | |
| 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) |
Detailed Description
Function Documentation
◆ nm_tactic_get_iov_threshold()
| nm_len_t nm_tactic_get_iov_threshold | ( | void | ) |
get the value of NMAD_DATA_IOV_THRESHOLD
Referenced by nm_tactic_req_data_max_size().
◆ nm_tactic_pack_ctrl()
|
inlinestatic |
Try to pack a control chunk in a pw.
- Returns
- NM_ESUCCESS for success, -NM_EBUSY if pw full
- Note
- function takes ownership of p_ctrl_chunk
Definition at line 61 of file nm_tactics.h.
References nm_ctrl_chunk_s::ctrl, nm_core::ctrl_chunk_allocator, nm_gate_s::ctrl_chunk_list, nm_core_lock_assert(), NM_EBUSY, NM_ESUCCESS, NM_HEADER_CTRL_SIZE, nm_pw_add_control(), nm_pw_remaining_buf(), nm_gate_s::p_core, p_gate, nm_ctrl_chunk_s::p_payload, and nm_ctrl_chunk_s::size.

◆ nm_tactic_pack_rdv()
| 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_tactic_rdv_accept()
| void nm_tactic_rdv_accept | ( | struct nm_core * | p_core, |
| struct nm_pkt_wrap_s * | p_pw | ||
| ) |
◆ nm_tactic_req_data_max_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 46 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_HEADER_DATA_SIZE, nm_tactic_get_iov_threshold(), and nm_data_properties_s::size.

◆ nm_tactic_req_is_short()
|
inlinestatic |
checks whether req_chunk is a SHORT chunk for optimized protocol
Definition at line 29 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().
◆ nm_tactic_req_short_size()
|
inlinestatic |
returns size in pw for the given short req_chunk
Definition at line 38 of file nm_tactics.h.
References assert(), nm_req_chunk_s::chunk_len, NM_HEADER_SHORT_DATA_SIZE, and nm_tactic_req_is_short().

◆ nm_tactic_rtr_pack()
| 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 | ||
| ) |