diff options
Diffstat (limited to 'src/svm/svm_fifo_segment.h')
-rw-r--r-- | src/svm/svm_fifo_segment.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/svm/svm_fifo_segment.h b/src/svm/svm_fifo_segment.h index 405df934578..0e86c25deab 100644 --- a/src/svm/svm_fifo_segment.h +++ b/src/svm/svm_fifo_segment.h @@ -34,11 +34,11 @@ typedef enum #define FIFO_SEGMENT_F_IS_PRIVATE 1 << 0 /* Private segment */ #define FIFO_SEGMENT_F_IS_MAIN_HEAP 1 << 1 /* Segment is main heap */ #define FIFO_SEGMENT_F_IS_PREALLOCATED 1 << 2 /* Segment is preallocated */ +#define FIFO_SEGMENT_F_WILL_DELETE 1 << 3 /* Segment will be removed */ typedef struct { svm_fifo_t *fifos; /**< Linked list of active RX fifos */ - u8 *segment_name; /**< Segment name */ svm_fifo_t **free_fifos; /**< Freelists, by fifo size */ u32 n_active_fifos; /**< Number of active fifos */ u8 flags; /**< Segment flags */ @@ -65,6 +65,7 @@ extern svm_fifo_segment_main_t svm_fifo_segment_main; typedef struct { + ssvm_segment_type_t segment_type; char *segment_name; u32 segment_size; u32 *new_segment_indices; @@ -72,13 +73,15 @@ typedef struct u32 tx_fifo_size; u32 preallocated_fifo_pairs; u32 private_segment_count; + u32 seg_protected_space; + int memfd_fd; } svm_fifo_segment_create_args_t; static inline svm_fifo_segment_private_t * svm_fifo_segment_get_segment (u32 segment_index) { svm_fifo_segment_main_t *ssm = &svm_fifo_segment_main; - return vec_elt_at_index (ssm->segments, segment_index); + return pool_elt_at_index (ssm->segments, segment_index); } static inline u8 @@ -120,9 +123,13 @@ u32 svm_fifo_segment_index (svm_fifo_segment_private_t * s); u32 svm_fifo_segment_num_fifos (svm_fifo_segment_private_t * fifo_segment); 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); svm_fifo_segment_private_t *svm_fifo_segment_segments_pool (void); + format_function_t format_svm_fifo_segment; +format_function_t format_svm_fifo_segment_type; #endif /* __included_ssvm_fifo_segment_h__ */ |