summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/buffer.c14
-rw-r--r--src/vlib/buffer_funcs.h8
-rw-r--r--src/vlib/unix/mc_socket.c6
3 files changed, 15 insertions, 13 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index a45b9bf2fc7..c44d8e49d40 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -192,9 +192,10 @@ vlib_validate_buffer_helper (vlib_main_t * vm,
if ((signed) b->current_data < (signed) -VLIB_BUFFER_PRE_DATA_SIZE)
return format (0, "current data %d before pre-data", b->current_data);
- if (b->current_data + b->current_length > vlib_bufer_get_default_size (vm))
+ if (b->current_data + b->current_length >
+ vlib_buffer_get_default_data_size (vm))
return format (0, "%d-%d beyond end of buffer %d", b->current_data,
- b->current_length, vlib_bufer_get_default_size (vm));
+ b->current_length, vlib_buffer_get_default_data_size (vm));
if (follow_buffer_next && (b->flags & VLIB_BUFFER_NEXT_PRESENT))
{
@@ -407,7 +408,7 @@ vlib_buffer_add_data (vlib_main_t * vm, u32 * buffer_index, void *data,
d = data;
n_left = n_data_bytes;
- n_buffer_bytes = vlib_bufer_get_default_size (vm);
+ n_buffer_bytes = vlib_buffer_get_default_data_size (vm);
b = vlib_get_buffer (vm, bi);
b->flags &= ~VLIB_BUFFER_TOTAL_LENGTH_VALID;
@@ -455,7 +456,7 @@ vlib_buffer_chain_append_data_with_alloc (vlib_main_t * vm,
u16 data_len)
{
vlib_buffer_t *l = *last;
- u32 n_buffer_bytes = vlib_bufer_get_default_size (vm);
+ u32 n_buffer_bytes = vlib_buffer_get_default_data_size (vm);
u16 copied = 0;
ASSERT (n_buffer_bytes >= l->current_length + l->current_data);
while (data_len)
@@ -655,7 +656,8 @@ vlib_buffer_main_init_numa_node (struct vlib_main_t *vm, u32 numa_node)
u32 buffers_per_numa;
u32 buffer_size = CLIB_CACHE_LINE_ROUND (bm->ext_hdr_size +
sizeof (vlib_buffer_t) +
- vlib_bufer_get_default_size (vm));
+ vlib_buffer_get_default_data_size
+ (vm));
u8 *name;
pagesize = clib_mem_get_default_hugepage_size ();
@@ -690,7 +692,7 @@ retry:
name = format (name, "default-numa-%d%c", numa_node, 0);
return vlib_buffer_pool_create (vm, numa_node, (char *) name,
- vlib_bufer_get_default_size (vm),
+ vlib_buffer_get_default_data_size (vm),
physmem_map_index);
}
diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h
index 97b687b8cc6..1600905564c 100644
--- a/src/vlib/buffer_funcs.h
+++ b/src/vlib/buffer_funcs.h
@@ -89,7 +89,7 @@ vlib_get_buffer (vlib_main_t * vm, u32 buffer_index)
}
static_always_inline u32
-vlib_bufer_get_default_size (vlib_main_t * vm)
+vlib_buffer_get_default_data_size (vlib_main_t * vm)
{
return vm->buffer_main->default_data_size;
}
@@ -1162,7 +1162,7 @@ vlib_buffer_chain_append_data (vlib_main_t * vm,
vlib_buffer_t * first,
vlib_buffer_t * last, void *data, u16 data_len)
{
- u32 n_buffer_bytes = vlib_bufer_get_default_size (vm);
+ u32 n_buffer_bytes = vlib_buffer_get_default_data_size (vm);
ASSERT (n_buffer_bytes >= last->current_length + last->current_data);
u16 len = clib_min (data_len,
n_buffer_bytes - last->current_length -
@@ -1237,7 +1237,7 @@ vlib_buffer_chain_compress (vlib_main_t * vm,
}
u32 want_first_size = clib_min (VLIB_BUFFER_CLONE_HEAD_SIZE,
- vlib_bufer_get_default_size (vm) -
+ vlib_buffer_get_default_data_size (vm) -
first->current_data);
do
{
@@ -1284,7 +1284,7 @@ always_inline int
vlib_buffer_chain_linearize (vlib_main_t * vm, vlib_buffer_t * first)
{
vlib_buffer_t *b = first;
- u32 buf_len = vlib_bufer_get_default_size (vm);
+ u32 buf_len = vlib_buffer_get_default_data_size (vm);
// free buffer chain starting from the second buffer
int free_count = (b->flags & VLIB_BUFFER_NEXT_PRESENT) != 0;
u32 chain_to_free = b->next_buffer;
diff --git a/src/vlib/unix/mc_socket.c b/src/vlib/unix/mc_socket.c
index d4f4a7fe7e3..86ee4361900 100644
--- a/src/vlib/unix/mc_socket.c
+++ b/src/vlib/unix/mc_socket.c
@@ -165,7 +165,7 @@ recvmsg_helper (mc_socket_main_t * msm,
vlib_main_t *vm = msm->mc_main.vlib_main;
vlib_buffer_t *b;
uword n_left, n_alloc, n_mtu, i, i_rx;
- const uword buffer_size = vlib_bufer_get_default_size (vm);
+ const uword buffer_size = vlib_buffer_get_default_data_size (vm);
word n_bytes_left;
/* Make sure we have at least a MTU worth of buffers. */
@@ -1012,9 +1012,9 @@ mc_socket_main_init (mc_socket_main_t * msm, char **intfc_probe_list,
msm->rx_mtu_n_bytes = mtu;
msm->rx_mtu_n_buffers =
- msm->rx_mtu_n_bytes / vlib_bufer_get_default_size (vm);
+ msm->rx_mtu_n_bytes / vlib_buffer_get_default_data_size (vm);
msm->rx_mtu_n_buffers +=
- (msm->rx_mtu_n_bytes % vlib_bufer_get_default_size (vm)) != 0;
+ (msm->rx_mtu_n_bytes % vlib_buffer_get_default_data_size (vm)) != 0;
error = socket_setup (msm);
if (error)