summaryrefslogtreecommitdiffstats
path: root/hw/virtio-net.h
diff options
context:
space:
mode:
authorAnthony Liguori2010-09-08 21:26:14 +0200
committerAnthony Liguori2010-09-08 21:26:14 +0200
commitdccbe6fbab47c9a2589f436e0592933b47cbe40b (patch)
treee5a851b48a3801dd28282eb17533975cade7ac23 /hw/virtio-net.h
parentvirtio-9p: Change handling of flags in open() path for 9P2000.L (diff)
parentvirtio-net: Introduce a new bottom half packet TX (diff)
downloadqemu-dccbe6fbab47c9a2589f436e0592933b47cbe40b.tar.gz
qemu-dccbe6fbab47c9a2589f436e0592933b47cbe40b.tar.xz
qemu-dccbe6fbab47c9a2589f436e0592933b47cbe40b.zip
Merge remote branch 'mst/for_anthony' into staging
Diffstat (limited to 'hw/virtio-net.h')
-rw-r--r--hw/virtio-net.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/virtio-net.h b/hw/virtio-net.h
index 235f1a9fa8..8af9a1ce55 100644
--- a/hw/virtio-net.h
+++ b/hw/virtio-net.h
@@ -49,6 +49,20 @@
#define TX_TIMER_INTERVAL 150000 /* 150 us */
+/* Limit the number of packets that can be sent via a single flush
+ * of the TX queue. This gives us a guaranteed exit condition and
+ * ensures fairness in the io path. 256 conveniently matches the
+ * length of the TX queue and shows a good balance of performance
+ * and latency. */
+#define TX_BURST 256
+
+typedef struct virtio_net_conf
+{
+ uint32_t txtimer;
+ int32_t txburst;
+ char *tx;
+} 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))