svm: fix max fifo size
[vpp.git] / src / svm / fifo_segment.h
index 00914e6..d3ce59c 100644 (file)
@@ -29,7 +29,7 @@ typedef enum
 
 #define FIFO_SEGMENT_MIN_LOG2_FIFO_SIZE 12     /**< 4kB min fifo size */
 #define FIFO_SEGMENT_MIN_FIFO_SIZE 4096                /**< 4kB min fifo size */
-#define FIFO_SEGMENT_MAX_FIFO_SIZE (2 << 30)   /**< 2GB max fifo size */
+#define FIFO_SEGMENT_MAX_FIFO_SIZE (2ULL << 30)        /**< 2GB max fifo size */
 #define FIFO_SEGMENT_ALLOC_BATCH_SIZE 32       /* Allocation quantum */
 
 typedef enum fifo_segment_flags_
@@ -120,6 +120,10 @@ svm_fifo_t *fifo_segment_alloc_fifo_w_slice (fifo_segment_t * fs,
  */
 void fifo_segment_free_fifo (fifo_segment_t * fs, svm_fifo_t * f);
 
+void fifo_segment_detach_fifo (fifo_segment_t * fs, svm_fifo_t * f);
+void fifo_segment_attach_fifo (fifo_segment_t * fs, svm_fifo_t * f,
+                              u32 slice_index);
+
 /**
  * Try to preallocate fifo headers
  *
@@ -243,6 +247,8 @@ void fifo_segment_update_free_bytes (fifo_segment_t * fs);
  */
 uword fifo_segment_cached_bytes (fifo_segment_t * fs);
 
+uword fifo_segment_available_bytes (fifo_segment_t * fs);
+
 /**
  * Number of bytes on chunk free lists
  *