diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2010-09-08 14:26:14 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-09-08 14:26:14 -0500 |
| commit | dccbe6fbab47c9a2589f436e0592933b47cbe40b (patch) | |
| tree | e5a851b48a3801dd28282eb17533975cade7ac23 /hw/virtio-net.h | |
| parent | 630c26893d6dc7713c0fcfc3c09d6bfe536a6ce3 (diff) | |
| parent | a697a334b3c4d3250e6420f5d38550ea10eb5319 (diff) | |
| download | focaccia-qemu-dccbe6fbab47c9a2589f436e0592933b47cbe40b.tar.gz focaccia-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)) |