aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/buffer.h')
-rw-r--r--src/vlib/buffer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vlib/buffer.h b/src/vlib/buffer.h
index c8761af4d20..c2ca8214162 100644
--- a/src/vlib/buffer.h
+++ b/src/vlib/buffer.h
@@ -411,12 +411,15 @@ vlib_buffer_pull (vlib_buffer_t * b, u8 size)
/* Forward declaration. */
struct vlib_main_t;
+#define VLIB_BUFFER_POOL_PER_THREAD_CACHE_SZ 512
+
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
- u32 *cached_buffers;
- u32 n_alloc;
+ u32 cached_buffers[VLIB_BUFFER_POOL_PER_THREAD_CACHE_SZ];
+ u32 n_cached;
} vlib_buffer_pool_thread_t;
+
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
@@ -428,6 +431,7 @@ typedef struct
u32 physmem_map_index;
u32 data_size;
u32 n_buffers;
+ u32 n_avail;
u32 *buffers;
u8 *name;
clib_spinlock_t lock;