summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ping.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-02-06 14:22:32 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-02-06 18:00:17 +0000
commit5de3fec531691a81b3f77ed965488dc8dbf1e9a1 (patch)
tree57b8dde55804ab52a6ef40767f1fe705c1968d2a /src/vnet/ip/ping.c
parent672ab690182f3d4941d2640c68bb6ced38880bc3 (diff)
buffers: make buffer data size configurable from startup config
Example: buffers { default data-size 1536 } Change-Id: I5b4436850ca18025c9fdcfc7ed648c2c2732d660 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/ip/ping.c')
-rwxr-xr-xsrc/vnet/ip/ping.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/ip/ping.c b/src/vnet/ip/ping.c
index 890285f2606..90314b541c4 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_BUFFER_DATA_SIZE - l34_len;
+ int max_data_len = vlib_bufer_get_default_size (vm) - l34_len;
int first_buf_data_len = data_len < max_data_len ? data_len : max_data_len;
@@ -403,7 +403,8 @@ init_icmp46_echo_request (vlib_main_t * vm, vlib_buffer_t * b0,
{
int this_buf_data_len =
remaining_data_len <
- VLIB_BUFFER_DATA_SIZE ? remaining_data_len : VLIB_BUFFER_DATA_SIZE;
+ vlib_bufer_get_default_size (vm) ? remaining_data_len :
+ vlib_bufer_get_default_size (vm);
int n_alloc = vlib_buffer_alloc (vm, &b0->next_buffer, 1);
if (n_alloc < 1)
{