diff options
Diffstat (limited to 'hw/virtio-net.h')
-rw-r--r-- | hw/virtio-net.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 46a2e1c57d..a2d1545e4c 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -49,9 +49,17 @@ #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; } virtio_net_conf; /* Maximum packet size we can receive from tap device: header + 64k */ |