{
FIFO_SEGMENT_F_IS_PREALLOCATED = 1 << 0,
FIFO_SEGMENT_F_WILL_DELETE = 1 << 1,
+ FIFO_SEGMENT_F_MEM_LIMIT = 1 << 2,
} fifo_segment_flags_t;
typedef struct fifo_segment_slice_
svm_fifo_t *fifos; /**< Linked list of active RX fifos */
svm_fifo_t *free_fifos; /**< Freelists by fifo size */
svm_fifo_chunk_t **free_chunks; /**< Freelists by chunk size */
- u32 n_fl_chunk_bytes; /**< Chunk bytes on freelist */
+ uword n_fl_chunk_bytes; /**< Chunk bytes on freelist */
} fifo_segment_slice_t;
typedef struct
ssvm_shared_header_t *ssvm_sh; /**< Pointer to fs ssvm shared hdr */
uword n_free_bytes; /**< Segment free bytes */
u32 n_active_fifos; /**< Number of active fifos */
+ u32 n_reserved_bytes; /**< Bytes not to be allocated */
u32 max_log2_chunk_size; /**< Max log2(chunk size) for fs */
u8 flags; /**< Segment flags */
u8 n_slices; /**< Number of slices */
typedef struct
{
fifo_segment_t *segments; /**< pool of fifo segments */
- u64 next_baseva; /**< Where to put the next one */
+ uword next_baseva; /**< Where to put the next one */
u32 timeout_in_seconds; /**< Time to wait during attach */
} fifo_segment_main_t;
* @param fs fifo segment
* @return free bytes estimate
*/
-u32 fifo_segment_free_bytes (fifo_segment_t * fs);
+uword fifo_segment_free_bytes (fifo_segment_t * fs);
/**
* Update fifo segment free bytes estimate