Added rss, hash and rss+hash xml2argv tests. virtio-options tests was used for xml2xml test. Signed-off-by: Andrew Melnychenko <andrew@xxxxxxxxxx> --- .../net-virtio-rss.x86_64-latest.args | 43 +++++++++++++++++++ tests/qemuxml2argvdata/net-virtio-rss.xml | 39 +++++++++++++++++ .../virtio-options.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/virtio-options.xml | 2 +- tests/qemuxml2argvtest.c | 2 + 5 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 tests/qemuxml2argvdata/net-virtio-rss.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/net-virtio-rss.xml diff --git a/tests/qemuxml2argvdata/net-virtio-rss.x86_64-latest.args b/tests/qemuxml2argvdata/net-virtio-rss.x86_64-latest.args new file mode 100644 index 0000000000..af35b2cc5a --- /dev/null +++ b/tests/qemuxml2argvdata/net-virtio-rss.x86_64-latest.args @@ -0,0 +1,43 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-i386 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \ +-netdev user,id=hostnet0 \ +-device '{"driver":"virtio-net-pci","rss":true,"netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \ +-netdev user,id=hostnet1 \ +-device '{"driver":"virtio-net-pci","hash":true,"netdev":"hostnet1","id":"net1","mac":"00:11:22:33:44:66","bus":"pci.0","addr":"0x3"}' \ +-netdev user,id=hostnet2 \ +-device '{"driver":"virtio-net-pci","rss":false,"hash":true,"netdev":"hostnet2","id":"net2","mac":"00:11:22:33:44:77","bus":"pci.0","addr":"0x4"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/net-virtio-rss.xml b/tests/qemuxml2argvdata/net-virtio-rss.xml new file mode 100644 index 0000000000..98e761962d --- /dev/null +++ b/tests/qemuxml2argvdata/net-virtio-rss.xml @@ -0,0 +1,39 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-i386</emulator> + <disk type='block' device='disk'> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='hda' bus='ide'/> + </disk> + <controller type='usb' index='0'/> + <interface type='user'> + <mac address='00:11:22:33:44:55'/> + <model type='virtio'/> + <driver rss='on'/> + </interface> + <interface type='user'> + <mac address='00:11:22:33:44:66'/> + <model type='virtio'/> + <driver rss_hash_report='on'/> + </interface> + <interface type='user'> + <mac address='00:11:22:33:44:77'/> + <model type='virtio'/> + <driver rss='off' rss_hash_report='on'/> + </interface> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-options.x86_64-latest.args index 48f6b23c0d..ff21b4bf4a 100644 --- a/tests/qemuxml2argvdata/virtio-options.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-options.x86_64-latest.args @@ -38,7 +38,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -fsdev local,security_model=mapped,writeout=immediate,id=fsdev-fs1,path=/export/fs2 \ -device '{"driver":"virtio-9p-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"fs1","fsdev":"fsdev-fs1","mount_tag":"fs2","bus":"pci.0","addr":"0x4"}' \ -netdev user,id=hostnet0 \ --device '{"driver":"virtio-net-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"netdev":"hostnet0","id":"net0","mac":"52:54:56:58:5a:5c","bus":"pci.0","addr":"0x6"}' \ +-device '{"driver":"virtio-net-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"rss":true,"hash":true,"netdev":"hostnet0","id":"net0","mac":"52:54:56:58:5a:5c","bus":"pci.0","addr":"0x6"}' \ -device '{"driver":"virtio-mouse-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"input0","bus":"pci.0","addr":"0xe"}' \ -device '{"driver":"virtio-keyboard-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"input1","bus":"pci.0","addr":"0x10"}' \ -device '{"driver":"virtio-tablet-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"input2","bus":"pci.0","addr":"0x11"}' \ diff --git a/tests/qemuxml2argvdata/virtio-options.xml b/tests/qemuxml2argvdata/virtio-options.xml index 59e293d8e9..486bc453a1 100644 --- a/tests/qemuxml2argvdata/virtio-options.xml +++ b/tests/qemuxml2argvdata/virtio-options.xml @@ -53,7 +53,7 @@ <interface type='user'> <mac address='52:54:56:58:5a:5c'/> <model type='virtio'/> - <driver iommu='on' ats='on' packed='on' page_per_vq='on'/> + <driver rss='on' rss_hash_report='on' iommu='on' ats='on' packed='on' page_per_vq='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </interface> <input type='mouse' bus='virtio'> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6c67b36d5c..5227f76dce 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3500,6 +3500,8 @@ mymain(void) DO_TEST_CAPS_LATEST("devices-acpi-index"); + DO_TEST_CAPS_LATEST("net-virtio-rss"); + if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL) virFileDeleteTree(fakerootdir); -- 2.34.1