]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't raise error upon interface update without <frames/> for <rx/> in coalesce
authorKristina Hanicova <khanicov@redhat.com>
Wed, 10 Mar 2021 17:01:17 +0000 (18:01 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 23 Mar 2021 14:37:45 +0000 (15:37 +0100)
commit511bdb0bb2f4779b48c4b72461c29bc8504fcebe
treea4471c06041e22988bf3b5c98d4da7d756e3ff18
parente2602f2bb186da100116a5668d95ca829b7f2767
qemu: don't raise error upon interface update without <frames/> for <rx/> in coalesce

With this, incomplete XML without <frames/> for <rx/> in coalesce
won't raise error as before. It will leave the coalesce parameter
empty, thanks to passing it as a parameter and return an integer
to indicate error state - previously it returned pointer (or NULL
for both error and incomplete XML).
I also added a test case to test this functionality in the
qemuxml2xmltest.

The code went through some refactoring:
* change of a condition
* addition of a parameter
* change of order, that allowed removal of VIR_FREE
* removal of redundant labels and variables

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1535930
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/domain_conf.c
tests/qemuxml2argvdata/net-coalesce.xml
tests/qemuxml2xmloutdata/net-coalesce.xml