summaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer_funcs.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-02-28 23:16:11 +0100
committerNeale Ranns <nranns@cisco.com>2019-03-04 12:22:56 +0000
commitb592d1b64140e248f91dc76ce17da65ea90a4798 (patch)
tree6e5110580fa352165ec20ac02fec694cd5927d35 /src/vlib/buffer_funcs.h
parent470a3704e38d710018f1aa55c8bf857e55fbc069 (diff)
buffers: support cases where numa node memory is not available
Change-Id: I550ef893e41d86310d4e5af16d6100b8e557b68a Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer_funcs.h')
-rw-r--r--src/vlib/buffer_funcs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h
index 04f775da1f5..3e0234b6b51 100644
--- a/src/vlib/buffer_funcs.h
+++ b/src/vlib/buffer_funcs.h
@@ -126,8 +126,8 @@ vlib_buffer_copy_template (vlib_buffer_t * b, vlib_buffer_t * bt)
always_inline u8
vlib_buffer_pool_get_default_for_numa (vlib_main_t * vm, u32 numa_node)
{
- ASSERT (numa_node < vm->buffer_main->n_numa_nodes);
- return numa_node;
+ ASSERT (numa_node < VLIB_BUFFER_MAX_NUMA_NODES);
+ return vm->buffer_main->default_buffer_pool_index_for_numa[numa_node];
}
/** \brief Translate array of buffer indices into buffer pointers with offset