aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user_input.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/devices/virtio/vhost_user_input.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/devices/virtio/vhost_user_input.c')
-rw-r--r--src/vnet/devices/virtio/vhost_user_input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/devices/virtio/vhost_user_input.c b/src/vnet/devices/virtio/vhost_user_input.c
index 812f9d3f6ab..465ec4462a8 100644
--- a/src/vnet/devices/virtio/vhost_user_input.c
+++ b/src/vnet/devices/virtio/vhost_user_input.c
@@ -501,7 +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_BUFFER_DATA_SIZE))
+ (b_current->current_length == vlib_bufer_get_default_size (vm)))
{
if (PREDICT_FALSE (cpu->rx_buffers_len == 0))
{
@@ -534,7 +534,8 @@ 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_BUFFER_DATA_SIZE - b_current->current_length;
+ cpy->len =
+ vlib_bufer_get_default_size (vm) - 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);