bfd: reset peer discriminator on timeout
[vpp.git] / src / svm / fifo_segment.h
index ff36f45..02d45d3 100644 (file)
@@ -35,6 +35,7 @@ typedef enum fifo_segment_flags_
 {
   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_
@@ -42,7 +43,7 @@ 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
@@ -51,6 +52,7 @@ 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 */
@@ -66,7 +68,7 @@ typedef struct
 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;
 
@@ -186,7 +188,7 @@ int fifo_segment_collect_fifo_chunks (fifo_segment_t * fs, svm_fifo_t * f);
  * @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