15 #ifndef __included_ssvm_fifo_segment_h__ 16 #define __included_ssvm_fifo_segment_h__ 30 #define FIFO_SEGMENT_MIN_FIFO_SIZE 4096 31 #define FIFO_SEGMENT_MAX_FIFO_SIZE (2 << 30) 32 #define FIFO_SEGMENT_ALLOC_CHUNK_SIZE 32 34 #define FIFO_SEGMENT_F_IS_PREALLOCATED (1 << 0) 35 #define FIFO_SEGMENT_F_WILL_DELETE (1 << 1) 73 #define svm_fifo_segment_flags(_seg) _seg->h->flags 85 return fifo_segment->
h->
fifos != 0;
91 return fifo_segment->
h->
fifos;
106 u32 data_size_in_bytes,
115 fifo_segment,
u32 fifo_size_in_bytes);
svm_fifo_segment_freelist_t
svm_fifo_segment_private_t * svm_fifo_segment_segments_pool(void)
Retrieve svm segments pool.
struct _svm_fifo svm_fifo_t
enum ssvm_segment_type_ ssvm_segment_type_t
u32 svm_fifo_segment_index(svm_fifo_segment_private_t *s)
format_function_t format_svm_fifo_segment
ssvm_segment_type_t segment_type
void svm_fifo_segment_delete(svm_fifo_segment_private_t *s)
svm_fifo_t * svm_fifo_segment_alloc_fifo(svm_fifo_segment_private_t *s, u32 data_size_in_bytes, svm_fifo_segment_freelist_t index)
Allocate fifo in svm segment.
static svm_fifo_t * svm_fifo_segment_get_fifo_list(svm_fifo_segment_private_t *fifo_segment)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
svm_fifo_segment_main_t svm_fifo_segment_main
svm_fifo_segment_header_t * h
format_function_t format_svm_fifo_segment_type
int svm_fifo_segment_create(svm_fifo_segment_create_args_t *a)
Create an svm fifo segment and initialize as master.
static u8 svm_fifo_segment_has_fifos(svm_fifo_segment_private_t *fifo_segment)
void svm_fifo_segment_free_fifo(svm_fifo_segment_private_t *s, svm_fifo_t *f, svm_fifo_segment_freelist_t index)
u32 * new_segment_indices
int svm_fifo_segment_init(svm_fifo_segment_private_t *s)
Initialize svm fifo segment shared header.
static svm_fifo_segment_private_t * svm_fifo_segment_get_segment(u32 segment_index)
int svm_fifo_segment_create_process_private(svm_fifo_segment_create_args_t *a)
Create an svm fifo segment in process-private memory.
u32 svm_fifo_segment_num_free_fifos(svm_fifo_segment_private_t *fifo_segment, u32 fifo_size_in_bytes)
void svm_fifo_segment_info(svm_fifo_segment_private_t *seg, uword *address, u64 *size)
int svm_fifo_segment_attach(svm_fifo_segment_create_args_t *a)
Attach as slave to an svm fifo segment.
void svm_fifo_segment_main_init(u64 baseva, u32 timeout_in_seconds)
svm_fifo_segment_private_t * segments
pool of segments
void svm_fifo_segment_preallocate_fifo_pairs(svm_fifo_segment_private_t *s, u32 rx_fifo_size, u32 tx_fifo_size, u32 *n_fifo_pairs)
Pre-allocates fifo pairs in fifo segment.
u32 svm_fifo_segment_num_fifos(svm_fifo_segment_private_t *fifo_segment)
Get number of active fifos.