summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices')
-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.c5
4 files changed, 6 insertions, 5 deletions
diff --git a/src/vnet/devices/af_packet/node.c b/src/vnet/devices/af_packet/node.c
index 243a38a42b1..2fa7708ef21 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_BUFFER_DATA_SIZE;
+ u32 n_buffer_bytes = vlib_bufer_get_default_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 577d4a394b2..122d8c34c59 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_BUFFER_DATA_SIZE;
+ u32 n_buffer_bytes = vlib_bufer_get_default_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 78d071a24ed..fc369e5aea9 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_BUFFER_DATA_SIZE + hdr_sz;
+ d->len = vlib_bufer_get_default_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 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);