]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Move parts of NIC_RX_FILTER_CHANGED event handling into a function
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 30 Sep 2022 14:01:38 +0000 (16:01 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 20 Oct 2022 06:47:31 +0000 (08:47 +0200)
commitebb1e41b3a18e417b569c49678b1dbfdef25e670
tree2c40a3f7e8cd928d5610c31eaec90d7a7f5acc85
parent1eaf118ce1108c06c6593797c56d4a41078d1723
qemu: Move parts of NIC_RX_FILTER_CHANGED event handling into a function

Parts of the code that responds to the NIC_RX_FILTER_CHANGED
event are going to be re-used. Separate them into a function
(qemuDomainSyncRxFilter()) and move the code into qemu_domain.c
so that it can be re-used from other places of the driver.

There's one slight change though: instead of passing device alias
from the just received event to qemuMonitorQueryRxFilter(), I've
switched to using the alias stored in our domain definition. But
these two are guaranteed to be equal. virDomainDefFindDevice()
made sure about that, if nothing else.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c