#include <svm/ssvm.h>
#include <vppinfra/clib.h>
#include <vppinfra/rbtree.h>
+#include <vppinfra/lock.h>
#define SVM_FIFO_TRACE (0)
#define SVM_FIFO_MAX_EVT_SUBSCRIBERS 7
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 *num_chunks; /**< Allocated chunks by chunk size */
uword n_fl_chunk_bytes; /**< Chunk bytes on freelist */
+ uword virtual_mem; /**< Slice sum of all fifo sizes */
clib_spinlock_t chunk_lock;
} fifo_segment_slice_t;
fifo_segment_slice_t *slices; /** Fixed array of slices */
ssvm_shared_header_t *ssvm_sh; /**< Pointer to fs ssvm shared hdr */
uword n_free_bytes; /**< Segment free bytes */
+ uword n_cached_bytes; /**< Cached 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 */
+ u8 high_watermark; /**< Memory pressure watermark high */
+ u8 low_watermark; /**< Memory pressure watermark low */
+ u8 pct_first_alloc; /**< Pct of fifo size to alloc */
};
+void fsh_virtual_mem_update (fifo_segment_header_t * fsh, u32 slice_index,
+ int n_bytes);
+
#endif /* SRC_SVM_FIFO_TYPES_H_ */
/*