aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/buffer.c43
-rw-r--r--src/vlib/buffer.h3
-rw-r--r--src/vlib/buffer_funcs.h16
3 files changed, 0 insertions, 62 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 419d7e2e172..9459551a0fc 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -430,47 +430,6 @@ vlib_buffer_create_free_list (vlib_main_t * vm, u32 n_data_bytes,
name);
}
-static void
-del_free_list (vlib_main_t * vm, vlib_buffer_free_list_t * f)
-{
- vlib_buffer_pool_t *bp = vlib_buffer_pool_get (vm, f->buffer_pool_index);
-
- vec_add_aligned (bp->buffers, f->buffers, vec_len (f->buffers),
- CLIB_CACHE_LINE_BYTES);
- vec_free (f->name);
- vec_free (f->buffers);
-
- /* Poison it. */
- clib_memset (f, 0xab, sizeof (f[0]));
-}
-
-/* Add buffer free list. */
-void
-vlib_buffer_delete_free_list_internal (vlib_main_t * vm,
- vlib_buffer_free_list_index_t index)
-{
- vlib_buffer_free_list_t *f;
- int i;
-
- ASSERT (vlib_get_thread_index () == 0);
-
- f = vlib_buffer_get_free_list (vm, index);
-
- ASSERT (vec_len (f->buffers) == f->n_alloc);
-
- del_free_list (vm, f);
-
- pool_put (vm->buffer_free_list_pool, f);
-
- for (i = 1; i < vec_len (vlib_mains); i++)
- {
- vlib_main_t *wvm = vlib_mains[i];
- f = vlib_buffer_get_free_list (vlib_mains[i], index);
- del_free_list (wvm, f);
- pool_put (wvm->buffer_free_list_pool, f);
- }
-}
-
static_always_inline void *
vlib_buffer_pool_get_buffer (vlib_main_t * vm, vlib_buffer_pool_t * bp)
{
@@ -916,8 +875,6 @@ vlib_buffer_main_init (struct vlib_main_t * vm)
bm->cb.vlib_buffer_fill_free_list_cb = &vlib_buffer_fill_free_list_internal;
bm->cb.vlib_buffer_free_cb = &vlib_buffer_free_internal;
bm->cb.vlib_buffer_free_no_next_cb = &vlib_buffer_free_no_next_internal;
- bm->cb.vlib_buffer_delete_free_list_cb =
- &vlib_buffer_delete_free_list_internal;
clib_spinlock_init (&bm->buffer_known_hash_lockp);
retry:
diff --git a/src/vlib/buffer.h b/src/vlib/buffer.h
index 672131b935d..af9df685376 100644
--- a/src/vlib/buffer.h
+++ b/src/vlib/buffer.h
@@ -407,9 +407,6 @@ typedef struct
vlib_buffer_fill_free_list_cb_t *vlib_buffer_fill_free_list_cb;
vlib_buffer_free_cb_t *vlib_buffer_free_cb;
vlib_buffer_free_no_next_cb_t *vlib_buffer_free_no_next_cb;
- void (*vlib_buffer_delete_free_list_cb) (struct vlib_main_t * vm,
- vlib_buffer_free_list_index_t
- free_list_index);
} vlib_buffer_callbacks_t;
extern vlib_buffer_callbacks_t *vlib_buffer_callbacks;
diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h
index 199dad03176..db1d9611005 100644
--- a/src/vlib/buffer_funcs.h
+++ b/src/vlib/buffer_funcs.h
@@ -613,22 +613,6 @@ vlib_buffer_free_from_ring_no_next (vlib_main_t * vm, u32 * ring, u32 start,
vlib_buffer_free_list_index_t vlib_buffer_create_free_list (vlib_main_t * vm,
u32 n_data_bytes,
char *fmt, ...);
-always_inline void
-vlib_buffer_delete_free_list (vlib_main_t * vm,
- vlib_buffer_free_list_index_t free_list_index)
-{
- vlib_buffer_main_t *bm = vm->buffer_main;
-
- ASSERT (bm->cb.vlib_buffer_delete_free_list_cb);
-
- bm->cb.vlib_buffer_delete_free_list_cb (vm, free_list_index);
-}
-
-/* Make sure we have at least given number of unaligned buffers. */
-void vlib_buffer_free_list_fill_unaligned (vlib_main_t * vm,
- vlib_buffer_free_list_t *
- free_list,
- uword n_unaligned_buffers);
always_inline vlib_buffer_free_list_t *
vlib_buffer_get_free_list (vlib_main_t * vm,