mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu_command.c: move QEMU_CAPS_VIRTIO_TX_ALG check to qemu_validate.c
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
a40659eb82
commit
37c6d4a62c
@ -3330,10 +3330,6 @@ qemuBuildNicDevStr(virDomainDefPtr def,
|
|||||||
net->driver.virtio.txmode);
|
net->driver.virtio.txmode);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
_("virtio-net-pci 'tx' option not supported in this QEMU binary"));
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (usingVirtio) {
|
if (usingVirtio) {
|
||||||
|
@ -1253,6 +1253,14 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainNetIsVirtioModel(net)) {
|
if (virDomainNetIsVirtioModel(net)) {
|
||||||
|
if (net->driver.virtio.txmode &&
|
||||||
|
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_TX_ALG)) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("virtio-net-pci 'tx' option not supported in "
|
||||||
|
"this QEMU binary"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (net->driver.virtio.rx_queue_size & (net->driver.virtio.rx_queue_size - 1)) {
|
if (net->driver.virtio.rx_queue_size & (net->driver.virtio.rx_queue_size - 1)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("rx_queue_size has to be a power of two"));
|
_("rx_queue_size has to be a power of two"));
|
||||||
|
@ -467,7 +467,7 @@ mymain(void)
|
|||||||
DO_TEST("net-user", NONE);
|
DO_TEST("net-user", NONE);
|
||||||
DO_TEST("net-user-addr", NONE);
|
DO_TEST("net-user-addr", NONE);
|
||||||
DO_TEST("net-virtio", NONE);
|
DO_TEST("net-virtio", NONE);
|
||||||
DO_TEST("net-virtio-device", NONE);
|
DO_TEST("net-virtio-device", QEMU_CAPS_VIRTIO_TX_ALG);
|
||||||
DO_TEST("net-virtio-disable-offloads", NONE);
|
DO_TEST("net-virtio-disable-offloads", NONE);
|
||||||
DO_TEST("net-eth", NONE);
|
DO_TEST("net-eth", NONE);
|
||||||
DO_TEST("net-eth-ifname", NONE);
|
DO_TEST("net-eth-ifname", NONE);
|
||||||
@ -795,7 +795,7 @@ mymain(void)
|
|||||||
DO_TEST("numad-auto-memory-vcpu-no-cpuset-and-placement", NONE);
|
DO_TEST("numad-auto-memory-vcpu-no-cpuset-and-placement", NONE);
|
||||||
DO_TEST("numad-auto-memory-vcpu-cpuset", NONE);
|
DO_TEST("numad-auto-memory-vcpu-cpuset", NONE);
|
||||||
DO_TEST("usb-ich9-ehci-addr", NONE);
|
DO_TEST("usb-ich9-ehci-addr", NONE);
|
||||||
DO_TEST("disk-copy_on_read", NONE);
|
DO_TEST("disk-copy_on_read", QEMU_CAPS_VIRTIO_TX_ALG);
|
||||||
DO_TEST_CAPS_LATEST("tpm-passthrough");
|
DO_TEST_CAPS_LATEST("tpm-passthrough");
|
||||||
DO_TEST_CAPS_LATEST("tpm-passthrough-crb");
|
DO_TEST_CAPS_LATEST("tpm-passthrough-crb");
|
||||||
DO_TEST_CAPS_LATEST("tpm-emulator");
|
DO_TEST_CAPS_LATEST("tpm-emulator");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user