From b67196d8233ee89e79e0e6b05c3fa95a5fb6a579 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Sun, 20 Jan 2019 01:48:05 +0100 Subject: buffers: remove vlib_buffer_delete_free_list Change-Id: I5fe01e918b534d1ac1d47f0d7610536f45c3158c Signed-off-by: Damjan Marion --- src/plugins/dpdk/buffer.c | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'src/plugins/dpdk') diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c index 626bea2e345..827e7e85923 100644 --- a/src/plugins/dpdk/buffer.c +++ b/src/plugins/dpdk/buffer.c @@ -123,52 +123,6 @@ next: } } -#ifndef CLIB_MARCH_VARIANT -static void -del_free_list (vlib_main_t * vm, vlib_buffer_free_list_t * f) -{ - u32 i; - vlib_buffer_t *b; - u32 thread_index = vlib_get_thread_index (); - - for (i = 0; i < vec_len (f->buffers); i++) - { - b = vlib_get_buffer (vm, f->buffers[i]); - dpdk_rte_pktmbuf_free (vm, thread_index, b, 1); - } - - vec_free (f->name); - vec_free (f->buffers); - /* Poison it. */ - clib_memset (f, 0xab, sizeof (f[0])); -} - -/* Add buffer free list. */ -static void -dpdk_buffer_delete_free_list (vlib_main_t * vm, - vlib_buffer_free_list_index_t free_list_index) -{ - vlib_buffer_free_list_t *f; - int i; - - ASSERT (vlib_get_thread_index () == 0); - - f = vlib_buffer_get_free_list (vm, free_list_index); - - 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], free_list_index); - del_free_list (wvm, f); - pool_put (wvm->buffer_free_list_pool, f); - } -} -#endif - /* Make sure free list has at least given number of free buffers. */ uword CLIB_MULTIARCH_FN (dpdk_buffer_fill_free_list) (vlib_main_t * vm, @@ -608,7 +562,6 @@ VLIB_BUFFER_REGISTER_CALLBACKS (dpdk, static) = { .vlib_buffer_fill_free_list_cb = &dpdk_buffer_fill_free_list, .vlib_buffer_free_cb = &dpdk_buffer_free, .vlib_buffer_free_no_next_cb = &dpdk_buffer_free_no_next, - .vlib_buffer_delete_free_list_cb = &dpdk_buffer_delete_free_list, }; /* *INDENT-ON* */ -- cgit 1.2.3-korg