aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/af_packet/node.c2
-rw-r--r--src/vnet/devices/netmap/node.c2
-rw-r--r--src/vnet/devices/virtio/node.c2
-rw-r--r--src/vnet/devices/virtio/vhost_user_input.c7
-rw-r--r--src/vnet/dhcp/dhcp6_proxy_node.c2
-rw-r--r--src/vnet/ip/ip_frag.c2
-rwxr-xr-xsrc/vnet/ip/ping.c6
-rw-r--r--src/vnet/ip/punt.c2
-rw-r--r--src/vnet/ipfix-export/flow_report.c2
-rw-r--r--src/vnet/pg/cli.c2
-rw-r--r--src/vnet/pg/input.c2
-rw-r--r--src/vnet/pg/stream.c2
-rw-r--r--src/vnet/sctp/sctp.c2
-rw-r--r--src/vnet/session/session_node.c2
-rw-r--r--src/vnet/tcp/tcp.c2
-rw-r--r--src/vnet/unix/tuntap.c4
16 files changed, 21 insertions, 22 deletions
diff --git a/src/vnet/devices/af_packet/node.c b/src/vnet/devices/af_packet/node.c
index 2fa7708ef21..2aa52e06a62 100644
--- a/src/vnet/devices/af_packet/node.c
+++ b/src/vnet/devices/af_packet/node.c
@@ -192,7 +192,7 @@ af_packet_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u8 *block_start = apif->rx_ring + block * block_size;
uword n_trace = vlib_get_trace_count (vm, node);
u32 thread_index = vm->thread_index;
- u32 n_buffer_bytes = vlib_bufer_get_default_size (vm);
+ u32 n_buffer_bytes = vlib_buffer_get_default_data_size (vm);
u32 min_bufs = apif->rx_req->tp_frame_size / n_buffer_bytes;
if (apif->per_interface_next_index != ~0)
diff --git a/src/vnet/devices/netmap/node.c b/src/vnet/devices/netmap/node.c
index 122d8c34c59..9293c0d811f 100644
--- a/src/vnet/devices/netmap/node.c
+++ b/src/vnet/devices/netmap/node.c
@@ -99,7 +99,7 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
struct netmap_ring *ring;
int cur_ring;
u32 thread_index = vm->thread_index;
- u32 n_buffer_bytes = vlib_bufer_get_default_size (vm);
+ u32 n_buffer_bytes = vlib_buffer_get_default_data_size (vm);
if (nif->per_interface_next_index != ~0)
next_index = nif->per_interface_next_index;
diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c
index fc369e5aea9..6b82c418ffb 100644
--- a/src/vnet/devices/virtio/node.c
+++ b/src/vnet/devices/virtio/node.c
@@ -120,7 +120,7 @@ more:
((vif->type == VIRTIO_IF_TYPE_PCI) ? vlib_buffer_get_current_pa (vm,
b) :
pointer_to_uword (vlib_buffer_get_current (b)));
- d->len = vlib_bufer_get_default_size (vm) + hdr_sz;
+ d->len = vlib_buffer_get_default_data_size (vm) + hdr_sz;
d->flags = VRING_DESC_F_WRITE;
vring->avail->ring[avail & mask] = next;
avail++;
diff --git a/src/vnet/devices/virtio/vhost_user_input.c b/src/vnet/devices/virtio/vhost_user_input.c
index 465ec4462a8..3c3d48e9ef4 100644
--- a/src/vnet/devices/virtio/vhost_user_input.c
+++ b/src/vnet/devices/virtio/vhost_user_input.c
@@ -258,6 +258,7 @@ vhost_user_if_input (vlib_main_t * vm,
u32 n_left_to_next, *to_next;
u32 next_index = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
u32 n_trace = vlib_get_trace_count (vm, node);
+ u32 buffer_data_size = vlib_buffer_get_default_data_size (vm);
u32 map_hint = 0;
vhost_cpu_t *cpu = &vum->cpus[vm->thread_index];
u16 copy_len = 0;
@@ -500,8 +501,7 @@ vhost_user_if_input (vlib_main_t * vm,
}
/* Get more output if necessary. Or end of packet. */
- if (PREDICT_FALSE
- (b_current->current_length == vlib_bufer_get_default_size (vm)))
+ if (PREDICT_FALSE (b_current->current_length == buffer_data_size))
{
if (PREDICT_FALSE (cpu->rx_buffers_len == 0))
{
@@ -534,8 +534,7 @@ vhost_user_if_input (vlib_main_t * vm,
vhost_copy_t *cpy = &cpu->copy[copy_len];
copy_len++;
u32 desc_data_l = desc_table[desc_current].len - desc_data_offset;
- cpy->len =
- vlib_bufer_get_default_size (vm) - b_current->current_length;
+ cpy->len = buffer_data_size - b_current->current_length;
cpy->len = (cpy->len > desc_data_l) ? desc_data_l : cpy->len;
cpy->dst = (uword) (vlib_buffer_get_current (b_current) +
b_current->current_length);
diff --git a/src/vnet/dhcp/dhcp6_proxy_node.c b/src/vnet/dhcp/dhcp6_proxy_node.c
index e4464e0b307..3958af86c20 100644
--- a/src/vnet/dhcp/dhcp6_proxy_node.c
+++ b/src/vnet/dhcp/dhcp6_proxy_node.c
@@ -316,7 +316,7 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm,
link_address_set:
if ((b0->current_length + sizeof (*id1) + sizeof (*vss1) +
- sizeof (*cmac)) > vlib_bufer_get_default_size (vm))
+ sizeof (*cmac)) > vlib_buffer_get_default_data_size (vm))
{
error0 = DHCPV6_PROXY_ERROR_PKT_TOO_BIG;
next0 = DHCPV6_PROXY_TO_SERVER_INPUT_NEXT_DROP;
diff --git a/src/vnet/ip/ip_frag.c b/src/vnet/ip/ip_frag.c
index 6ecaa3c4dce..fd5bc6fa0ba 100644
--- a/src/vnet/ip/ip_frag.c
+++ b/src/vnet/ip/ip_frag.c
@@ -106,7 +106,7 @@ ip4_frag_do_fragment (vlib_main_t * vm, u32 from_bi, u32 ** buffer,
rem = clib_net_to_host_u16 (ip4->length) - sizeof (ip4_header_t);
max =
- (clib_min (mtu, vlib_bufer_get_default_size (vm)) -
+ (clib_min (mtu, vlib_buffer_get_default_data_size (vm)) -
sizeof (ip4_header_t)) & ~0x7;
if (rem >
diff --git a/src/vnet/ip/ping.c b/src/vnet/ip/ping.c
index 90314b541c4..2376d9a2f5b 100755
--- a/src/vnet/ip/ping.c
+++ b/src/vnet/ip/ping.c
@@ -388,7 +388,7 @@ init_icmp46_echo_request (vlib_main_t * vm, vlib_buffer_t * b0,
int l34_len =
l4_header_offset + sizeof (icmp46_header_t) +
offsetof (icmp46_echo_request_t, data);
- int max_data_len = vlib_bufer_get_default_size (vm) - l34_len;
+ int max_data_len = vlib_buffer_get_default_data_size (vm) - l34_len;
int first_buf_data_len = data_len < max_data_len ? data_len : max_data_len;
@@ -403,8 +403,8 @@ init_icmp46_echo_request (vlib_main_t * vm, vlib_buffer_t * b0,
{
int this_buf_data_len =
remaining_data_len <
- vlib_bufer_get_default_size (vm) ? remaining_data_len :
- vlib_bufer_get_default_size (vm);
+ vlib_buffer_get_default_data_size (vm) ? remaining_data_len :
+ vlib_buffer_get_default_data_size (vm);
int n_alloc = vlib_buffer_alloc (vm, &b0->next_buffer, 1);
if (n_alloc < 1)
{
diff --git a/src/vnet/ip/punt.c b/src/vnet/ip/punt.c
index 8331a876dcb..6e2fcebf69e 100644
--- a/src/vnet/ip/punt.c
+++ b/src/vnet/ip/punt.c
@@ -497,7 +497,7 @@ format_punt_trace (u8 * s, va_list * va)
static uword
punt_socket_rx_fd (vlib_main_t * vm, vlib_node_runtime_t * node, u32 fd)
{
- const uword buffer_size = vlib_bufer_get_default_size (vm);
+ const uword buffer_size = vlib_buffer_get_default_data_size (vm);
u32 n_trace = vlib_get_trace_count (vm, node);
u32 next = node->cached_next_index;
u32 n_left_to_next, next_index;
diff --git a/src/vnet/ipfix-export/flow_report.c b/src/vnet/ipfix-export/flow_report.c
index 9d0834b36b6..103392ad81e 100644
--- a/src/vnet/ipfix-export/flow_report.c
+++ b/src/vnet/ipfix-export/flow_report.c
@@ -121,7 +121,7 @@ send_template_packet (flow_report_main_t * frm,
/* Initialize the buffer */
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
- ASSERT (vec_len (fr->rewrite) < vlib_bufer_get_default_size (vm));
+ ASSERT (vec_len (fr->rewrite) < vlib_buffer_get_default_data_size (vm));
clib_memcpy_fast (b0->data, fr->rewrite, vec_len (fr->rewrite));
b0->current_data = 0;
diff --git a/src/vnet/pg/cli.c b/src/vnet/pg/cli.c
index 4053887633d..803db129e00 100644
--- a/src/vnet/pg/cli.c
+++ b/src/vnet/pg/cli.c
@@ -341,7 +341,7 @@ new_stream (vlib_main_t * vm,
s.sw_if_index[VLIB_RX] = s.sw_if_index[VLIB_TX] = ~0;
s.node_index = ~0;
s.max_packet_bytes = s.min_packet_bytes = 64;
- s.buffer_bytes = vlib_bufer_get_default_size (vm);
+ s.buffer_bytes = vlib_buffer_get_default_data_size (vm);
s.if_id = 0;
pcap_file_name = 0;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c
index 6ef813f5807..138a5757c83 100644
--- a/src/vnet/pg/input.c
+++ b/src/vnet/pg/input.c
@@ -1199,7 +1199,7 @@ pg_stream_fill_replay (pg_main_t * pg, pg_stream_t * s, u32 n_alloc)
u32 *buffers;
vlib_main_t *vm = vlib_get_main ();
vnet_main_t *vnm = vnet_get_main ();
- u32 buf_sz = vlib_bufer_get_default_size (vm);
+ u32 buf_sz = vlib_buffer_get_default_data_size (vm);
vnet_interface_main_t *im = &vnm->interface_main;
vnet_sw_interface_t *si;
diff --git a/src/vnet/pg/stream.c b/src/vnet/pg/stream.c
index ba24912780b..c60c5845af6 100644
--- a/src/vnet/pg/stream.c
+++ b/src/vnet/pg/stream.c
@@ -437,7 +437,7 @@ pg_stream_add (pg_main_t * pg, pg_stream_t * s_init)
{
int n;
- s->buffer_bytes = vlib_bufer_get_default_size (vm);
+ s->buffer_bytes = vlib_buffer_get_default_data_size (vm);
n = s->max_packet_bytes / s->buffer_bytes;
n += (s->max_packet_bytes % s->buffer_bytes) != 0;
diff --git a/src/vnet/sctp/sctp.c b/src/vnet/sctp/sctp.c
index 21cc78bccca..f84996186e0 100644
--- a/src/vnet/sctp/sctp.c
+++ b/src/vnet/sctp/sctp.c
@@ -892,7 +892,7 @@ sctp_main_enable (vlib_main_t * vm)
vec_validate (tm->ip_lookup_tx_frames[0], num_threads - 1);
vec_validate (tm->ip_lookup_tx_frames[1], num_threads - 1);
- tm->bytes_per_buffer = vlib_bufer_get_default_size (vm);
+ tm->bytes_per_buffer = vlib_buffer_get_default_data_size (vm);
vec_validate (tm->time_now, num_threads - 1);
return error;
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 09adc596d23..2a8d9720069 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -605,7 +605,7 @@ session_tx_set_dequeue_params (vlib_main_t * vm, session_tx_context_t * ctx,
ctx->max_len_to_snd = max_segs * ctx->snd_mss;
}
- n_bytes_per_buf = vlib_bufer_get_default_size (vm);
+ n_bytes_per_buf = vlib_buffer_get_default_data_size (vm);
ASSERT (n_bytes_per_buf > TRANSPORT_MAX_HDRS_LEN);
n_bytes_per_seg = TRANSPORT_MAX_HDRS_LEN + ctx->snd_mss;
ctx->n_bufs_per_seg = ceil ((f64) n_bytes_per_seg / n_bytes_per_buf);
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index ee5f27579b3..81f209b5d7c 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1476,7 +1476,7 @@ tcp_main_enable (vlib_main_t * vm)
tcp_initialize_timer_wheels (tm);
tcp_initialize_iss_seed (tm);
- tm->bytes_per_buffer = vlib_bufer_get_default_size (vm);
+ tm->bytes_per_buffer = vlib_buffer_get_default_data_size (vm);
return error;
}
diff --git a/src/vnet/unix/tuntap.c b/src/vnet/unix/tuntap.c
index ce7b260f393..103b6496a34 100644
--- a/src/vnet/unix/tuntap.c
+++ b/src/vnet/unix/tuntap.c
@@ -243,7 +243,7 @@ tuntap_rx (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
tuntap_main_t *tm = &tuntap_main;
vlib_buffer_t *b;
u32 bi;
- const uword buffer_size = vlib_bufer_get_default_size (vm);
+ const uword buffer_size = vlib_buffer_get_default_data_size (vm);
u16 thread_index = vm->thread_index;
/** Make sure we have some RX buffers. */
@@ -490,7 +490,7 @@ tuntap_config (vlib_main_t * vm, unformat_input_t * input)
u8 *name;
int flags = IFF_TUN | IFF_NO_PI;
int is_enabled = 0, is_ether = 0, have_normal_interface = 0;
- const uword buffer_size = vlib_bufer_get_default_size (vm);
+ const uword buffer_size = vlib_buffer_get_default_data_size (vm);
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{