summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/devices/virtio/vhost-user.h
diff options
context:
space:
mode:
authorPierre Pfister <ppfister@cisco.com>2016-07-27 16:38:20 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2016-09-07 17:19:11 +0000
commitba1d04641454beaae04a6c9ca7146d5f3205068f (patch)
tree0cc15d5505a88b426045fd683b03da7d6c01e54d /vnet/vnet/devices/virtio/vhost-user.h
parent24704851584a2b1db4545a2a3cd3fc73dff2ce5f (diff)
Vhost-User: Implement Indirect Descriptors
One of the main issue with virtio is the small queue size. VPP can quickly fill the queue before Linux could empty it, resulting in packet losses. Virtio indirect descriptors double the number of packet which may fit in the virtio queue (From 128 to 256 with standard qemu which hardcodes queue size to 256). Linux will not use such descriptors if the virtio MRG feature is enabled. You may add mrg_rxbuff=off option to qemu commandline when starting the VM such as to disable this feature. This way, Linux will use indirect buffers to receive packets. But it seems that Linux never uses indirect buffers to send packets. This patch also includes some optimization modifications. Change-Id: I26940d41ce6b7e3a08d5516018a8c46c5316ce1c Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Diffstat (limited to 'vnet/vnet/devices/virtio/vhost-user.h')
-rw-r--r--vnet/vnet/devices/virtio/vhost-user.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/vnet/vnet/devices/virtio/vhost-user.h b/vnet/vnet/devices/virtio/vhost-user.h
index 4934a8c0c1e..fa41403874b 100644
--- a/vnet/vnet/devices/virtio/vhost-user.h
+++ b/vnet/vnet/devices/virtio/vhost-user.h
@@ -24,6 +24,7 @@
#define VHOST_NET_VRING_NUM 2
#define VIRTQ_DESC_F_NEXT 1
+#define VIRTQ_DESC_F_INDIRECT 4
#define VHOST_USER_REPLY_MASK (0x1 << 2)
#define VHOST_USER_PROTOCOL_F_MQ 0
@@ -51,6 +52,7 @@
#define foreach_virtio_net_feature \
_ (VIRTIO_NET_F_MRG_RXBUF, 15) \
_ (VIRTIO_F_ANY_LAYOUT, 27) \
+ _ (VIRTIO_F_INDIRECT_DESC, 28) \
_ (VHOST_F_LOG_ALL, 26) \
_ (VIRTIO_NET_F_GUEST_ANNOUNCE, 21) \
_ (VHOST_USER_F_PROTOCOL_FEATURES, 30)