summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/virtio/pci.c')
-rw-r--r--src/vnet/devices/virtio/pci.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index df8e2bdaf68..71d813abfd7 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -1154,6 +1154,19 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args)
vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, vif->hw_if_index);
hw->flags |= VNET_HW_INTERFACE_FLAG_SUPPORTS_INT_MODE;
+
+ if (args->virtio_flags & VIRTIO_FLAG_BUFFERING)
+ {
+ error = virtio_set_packet_buffering (vif, args->buffering_size);
+ if (error)
+ {
+ args->rv = VNET_API_ERROR_INIT_FAILED;
+ virtio_log_error (vif,
+ "error encountered during packet buffering init");
+ goto error;
+ }
+ }
+
vnet_hw_interface_set_input_node (vnm, vif->hw_if_index,
virtio_input_node.index);
u32 i = 0;