OSDN Git Service

virtio-net: enable configurable tx queue size
authorWei Wang <wei.w.wang@intel.com>
Wed, 28 Jun 2017 02:37:59 +0000 (10:37 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 3 Jul 2017 19:29:48 +0000 (22:29 +0300)
commit9b02e1618cf26aa52cf786f215d757506dda14f8
tree75f6fe4ee12e8b7fb3acabf49f599fd5c79807e8
parentfd479c60f5766f7fb247ad146b9e3c33d03d2055
virtio-net: enable configurable tx queue size

This patch enables the virtio-net tx queue size to be configurable
between 256 (the default queue size) and 1024 by the user when the
vhost-user backend is used.

Currently, the maximum tx queue size for other backends is 512 due
to the following limitations:
- QEMU backend: the QEMU backend implementation in some cases may
send 1024+1 iovs to writev.
- Vhost_net backend: there are possibilities that the guest sends
a vring_desc of memory which crosses a MemoryRegion thereby
generating more than 1024 iovs after translation from guest-physical
address in the backend.

Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/virtio-net.c
include/hw/virtio/virtio-net.h