summaryrefslogtreecommitdiff
path: root/hw/s390-virtio-bus.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2010-09-02 09:00:50 -0600
committerMichael S. Tsirkin <mst@redhat.com>2010-09-07 20:29:24 +0300
commitf0c07c7c7b4fe4f9b63c88341fd32707def5a058 (patch)
tree189a2c3e3a0a4877cf5e18c9e5968443eb3482c9 /hw/s390-virtio-bus.c
parentca736c8e748e3bf77abe401231a412b9cdccb9d3 (diff)
downloadqemu-f0c07c7c7b4fe4f9b63c88341fd32707def5a058.tar.gz
qemu-f0c07c7c7b4fe4f9b63c88341fd32707def5a058.tar.bz2
qemu-f0c07c7c7b4fe4f9b63c88341fd32707def5a058.zip
virtio-net: Make tx_timer timeout configurable
Add an option to make the TX mitigation timer adjustable as a device option. The 150us hard coded default used currently is reasonable, but may not be suitable for all workloads, this gives us a way to adjust it using a single binary. We can't support any random option though, so use the "x-" prefix to indicate this is a developer option. Usage: -device virtio-net-pci,x-txtimer=500000,... # .5ms timeout Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/s390-virtio-bus.c')
-rw-r--r--hw/s390-virtio-bus.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index fe6884d47d..d5cb24ec77 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -27,6 +27,7 @@
#include "elf.h"
#include "hw/virtio.h"
#include "hw/virtio-serial.h"
+#include "hw/virtio-net.h"
#include "hw/sysbus.h"
#include "kvm.h"
@@ -110,7 +111,7 @@ static int s390_virtio_net_init(VirtIOS390Device *dev)
{
VirtIODevice *vdev;
- vdev = virtio_net_init((DeviceState *)dev, &dev->nic);
+ vdev = virtio_net_init((DeviceState *)dev, &dev->nic, &dev->net);
if (!vdev) {
return -1;
}
@@ -327,6 +328,8 @@ static VirtIOS390DeviceInfo s390_virtio_net = {
.qdev.size = sizeof(VirtIOS390Device),
.qdev.props = (Property[]) {
DEFINE_NIC_PROPERTIES(VirtIOS390Device, nic),
+ DEFINE_PROP_UINT32("x-txtimer", VirtIOS390Device,
+ net.txtimer, TX_TIMER_INTERVAL),
DEFINE_PROP_END_OF_LIST(),
},
};