mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
ca736c8e74
commit
f0c07c7c7b
7 changed files with 27 additions and 7 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "elf.h"
|
||||
#include "hw/virtio.h"
|
||||
#include "hw/virtio-serial.h"
|
||||
#include "hw/virtio-net.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "kvm.h"
|
||||
|
||||
|
@ -110,7 +111,7 @@ static int s390_virtio_net_init(VirtIOS390Device *dev)
|
|||
{
|
||||
VirtIODevice *vdev;
|
||||
|
||||
vdev = virtio_net_init((DeviceState *)dev, &dev->nic);
|
||||
vdev = virtio_net_init((DeviceState *)dev, &dev->nic, &dev->net);
|
||||
if (!vdev) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -327,6 +328,8 @@ static VirtIOS390DeviceInfo s390_virtio_net = {
|
|||
.qdev.size = sizeof(VirtIOS390Device),
|
||||
.qdev.props = (Property[]) {
|
||||
DEFINE_NIC_PROPERTIES(VirtIOS390Device, nic),
|
||||
DEFINE_PROP_UINT32("x-txtimer", VirtIOS390Device,
|
||||
net.txtimer, TX_TIMER_INTERVAL),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue