summary refs log tree commit diff stats
path: root/hw/virtio-net.h
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/virtio-net.h
parentca736c8e748e3bf77abe401231a412b9cdccb9d3 (diff)
downloadfocaccia-qemu-f0c07c7c7b4fe4f9b63c88341fd32707def5a058.tar.gz
focaccia-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/virtio-net.h')
-rw-r--r--hw/virtio-net.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/virtio-net.h b/hw/virtio-net.h
index 235f1a9fa8..46a2e1c57d 100644
--- a/hw/virtio-net.h
+++ b/hw/virtio-net.h
@@ -49,6 +49,11 @@
 
 #define TX_TIMER_INTERVAL 150000 /* 150 us */
 
+typedef struct virtio_net_conf
+{
+    uint32_t txtimer;
+} virtio_net_conf;
+
 /* Maximum packet size we can receive from tap device: header + 64k */
 #define VIRTIO_NET_MAX_BUFSIZE (sizeof(struct virtio_net_hdr) + (64 << 10))