aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-07-27 04:01:24 -0400
committerDave Barach <openvpp@barachs.net>2017-07-27 10:50:34 +0000
commit6b0f5892833254438adaaf786b7195c82e3fdd30 (patch)
tree358073f74b31a877f39e25d76d4ee96b447e531b /src/vlib/buffer.c
parent2ee2d57c3ac63c8fdcdae53366e29b7dcdb2014d (diff)
Thread safe internal buffer manager
Change-Id: I45845b952aa42a854e1c2c396b85f905de987020 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer.c')
-rw-r--r--src/vlib/buffer.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 53b60c165c1..a5c955c76e6 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -305,12 +305,6 @@ vlib_buffer_validate_alloc_free (vlib_main_t * vm,
if (CLIB_DEBUG == 0)
return;
- ASSERT (vlib_get_thread_index () == 0);
-
- /* smp disaster check */
- if (vec_len (vlib_mains) > 1)
- ASSERT (vm == vlib_mains[0]);
-
is_free = expected_state == VLIB_BUFFER_KNOWN_ALLOCATED;
b = buffers;
for (i = 0; i < n_buffers; i++)
@@ -1050,6 +1044,7 @@ vlib_buffer_cb_init (struct vlib_main_t *vm)
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);
}
/** @endcond */