|
static segment_manager_props_t * | segment_manager_properties_get (segment_manager_t *sm) |
|
segment_manager_props_t * | segment_manager_props_init (segment_manager_props_t *props) |
|
static u8 | segment_manager_app_detached (segment_manager_t *sm) |
|
void | segment_manager_app_detach (segment_manager_t *sm) |
|
static u32 | segment_manager_segment_index (segment_manager_t *sm, fifo_segment_t *seg) |
|
int | segment_manager_add_segment (segment_manager_t *sm, uword segment_size) |
| Adds segment to segment manager's pool. More...
|
|
void | segment_manager_del_segment (segment_manager_t *sm, fifo_segment_t *fs) |
| Remove segment without lock. More...
|
|
static void | segment_manager_lock_and_del_segment (segment_manager_t *sm, u32 fs_index) |
| Removes segment after acquiring writer lock. More...
|
|
fifo_segment_t * | segment_manager_get_segment (segment_manager_t *sm, u32 segment_index) |
| Reads a segment from the segment manager's pool without lock. More...
|
|
u64 | segment_manager_segment_handle (segment_manager_t *sm, fifo_segment_t *segment) |
|
static void | segment_manager_parse_segment_handle (u64 segment_handle, u32 *sm_index, u32 *segment_index) |
|
u64 | segment_manager_make_segment_handle (u32 segment_manager_index, u32 segment_index) |
|
fifo_segment_t * | segment_manager_get_segment_w_handle (u64 segment_handle) |
|
fifo_segment_t * | segment_manager_get_segment_w_lock (segment_manager_t *sm, u32 segment_index) |
| Reads a segment from the segment manager's pool and acquires reader lock. More...
|
|
void | segment_manager_segment_reader_unlock (segment_manager_t *sm) |
|
void | segment_manager_segment_writer_unlock (segment_manager_t *sm) |
|
segment_manager_t * | segment_manager_alloc (void) |
|
int | segment_manager_init (segment_manager_t *sm, uword first_seg_size, u32 prealloc_fifo_pairs) |
| Initializes segment manager based on options provided. More...
|
|
void | segment_manager_free (segment_manager_t *sm) |
| Cleanup segment manager. More...
|
|
void | segment_manager_init_free (segment_manager_t *sm) |
| Initiate segment manager cleanup. More...
|
|
segment_manager_t * | segment_manager_get (u32 index) |
|
segment_manager_t * | segment_manager_get_if_valid (u32 index) |
|
u32 | segment_manager_index (segment_manager_t *sm) |
|
u8 | segment_manager_has_fifos (segment_manager_t *sm) |
|
void | segment_manager_del_sessions (segment_manager_t *sm) |
| Initiate disconnects for all sessions 'owned' by a segment manager. More...
|
|
int | segment_manager_try_alloc_fifos (fifo_segment_t *fifo_segment, u32 thread_index, u32 rx_fifo_size, u32 tx_fifo_size, svm_fifo_t **rx_fifo, svm_fifo_t **tx_fifo) |
|
int | segment_manager_alloc_session_fifos (segment_manager_t *sm, u32 thread_index, svm_fifo_t **rx_fifo, svm_fifo_t **tx_fifo) |
|
void | segment_manager_dealloc_fifos (svm_fifo_t *rx_fifo, svm_fifo_t *tx_fifo) |
|
int | segment_manager_grow_fifo (segment_manager_t *sm, svm_fifo_t *f, u32 size) |
| Grows fifo owned by segment manager. More...
|
|
int | segment_manager_collect_fifo_chunks (segment_manager_t *sm, svm_fifo_t *f) |
| Collect fifo chunks that are no longer used. More...
|
|
int | segment_manager_shrink_fifo (segment_manager_t *sm, svm_fifo_t *f, u32 size, u8 is_producer) |
| Request to shrink fifo owned by segment manager. More...
|
|
u32 | segment_manager_evt_q_expected_size (u32 q_len) |
|
svm_msg_q_t * | segment_manager_alloc_queue (fifo_segment_t *segment, segment_manager_props_t *props) |
| Allocates shm queue in the first segment. More...
|
|
svm_msg_q_t * | segment_manager_event_queue (segment_manager_t *sm) |
|
void | segment_manager_dealloc_queue (segment_manager_t *sm, svm_queue_t *q) |
| Frees shm queue allocated in the first segment. More...
|
|
void | segment_manager_main_init (segment_manager_main_init_args_t *a) |
|
static clib_error_t * | segment_manager_show_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
void | segment_manager_format_sessions (segment_manager_t *sm, int verbose) |
|
Request to shrink fifo owned by segment manager.
If this is not called by the producer, no attempt is made to reduce the size until the producer tries to enqueue more data. To collect the chunks that are to be removed call segment_manager_collect_fifo_chunks
Size reduction does not affect fifo chunk boundaries. Therefore chunks are not split and the amount of bytes to be removed can be equal to or less than what was requested.
- Parameters
-
sm | segment manager that owns the fifo |
f | fifo to be shrunk |
size | amount of bytes to remove from fifo |
is_producer | flag that indicates is caller is the producer for the fifo. |
- Returns
- actual number of bytes to be removed
Definition at line 716 of file segment_manager.c.