diff options
author | Damjan Marion <damarion@cisco.com> | 2017-11-24 20:15:23 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-11-27 14:53:23 +0000 |
commit | c8a26c6d239554bac96c481c840b3f5b3d8a17af (patch) | |
tree | 4ad52a5fd5bbbd7c3dd1ca976d5cd9e9b2c03cd5 /src/vlib/mc.c | |
parent | 8b9a5d198cc316d36b93f19fee7a351fc3922e4a (diff) |
vlib: make vlib_buffer_alloc inline function
Currently, every alloc involves callback function call. With this change
callback function is called only if there is no empty buffers on the
free list.
Change-Id: I2238c19ece7ce182c49ba0f2485add52f335f3b6
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/mc.c')
-rw-r--r-- | src/vlib/mc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/mc.c b/src/vlib/mc.c index e57962c94de..a289871f570 100644 --- a/src/vlib/mc.c +++ b/src/vlib/mc.c @@ -109,7 +109,7 @@ mc_seq_cmp (u32 x, u32 y) void * mc_get_vlib_buffer (vlib_main_t * vm, u32 n_bytes, u32 * bi_return) { - u32 n_alloc, bi; + u32 n_alloc, bi = 0; vlib_buffer_t *b; n_alloc = vlib_buffer_alloc (vm, &bi, 1); |