diff options
author | Anthony Liguori | 2010-09-08 21:26:14 +0200 |
---|---|---|
committer | Anthony Liguori | 2010-09-08 21:26:14 +0200 |
commit | dccbe6fbab47c9a2589f436e0592933b47cbe40b (patch) | |
tree | e5a851b48a3801dd28282eb17533975cade7ac23 /hw/virtio-net.h | |
parent | virtio-9p: Change handling of flags in open() path for 9P2000.L (diff) | |
parent | virtio-net: Introduce a new bottom half packet TX (diff) | |
download | qemu-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.h | 14 |
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)) |