aboutsummaryrefslogtreecommitdiff
path: root/include/hw/virtio/virtio-net.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2016-08-10 17:47:16 +0300
committerJason Wang <jasowang@redhat.com>2016-09-27 17:54:21 +0800
commit1c0fbfa3dedf49115e194e533a7b6a640a28447c (patch)
tree6a65f7edfeffcb40819ee5fb2fec058b631e6583 /include/hw/virtio/virtio-net.h
parent7cfdc02dae0d2ff58c897496cfdbbafc0eda0f3f (diff)
downloadqemu-1c0fbfa3dedf49115e194e533a7b6a640a28447c.zip
qemu-1c0fbfa3dedf49115e194e533a7b6a640a28447c.tar.gz
qemu-1c0fbfa3dedf49115e194e533a7b6a640a28447c.tar.bz2
virtio-net: allow increasing rx queue size
This allows increasing the rx queue size up to 1024: unlike with tx, guests don't put in huge S/G lists into RX so the risk of running into the max 1024 limitation due to some off-by-one seems small. It's helpful for users like OVS-DPDK which don't do any buffering on the host - 1K roughly matches 500 entries in tun + 256 in the current rx queue, which seems to work reasonably well. We could probably make do with ~750 entries but virtio spec limits us to powers of two. It might be a good idea to specify an s/g size limit in a future version. It also might be possible to make the queue size smaller down the road, 64 seems like the minimal value which will still work (as guests seem to assume a queue full of 1.5K buffers is enough to process the largest incoming packet, which is ~64K). No one actually asked for this, and with virtio 1 guests can reduce ring size without need for host configuration, so don't bother with this for now. Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Jason Wang <jasowang@redhat.com> Suggested-by: Patrik Hermansson <phermansson@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio-net.h')
-rw-r--r--include/hw/virtio/virtio-net.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index 91ed97c..0ced975 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -35,6 +35,7 @@ typedef struct virtio_net_conf
uint32_t txtimer;
int32_t txburst;
char *tx;
+ uint16_t rx_queue_size;
} virtio_net_conf;
/* Maximum packet size we can receive from tap device: header + 64k */