]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: add/remove bridge fdb entries as guest CPUs are started/stopped
authorLaine Stump <laine@laine.org>
Wed, 10 Dec 2014 17:41:16 +0000 (12:41 -0500)
committerLaine Stump <laine@laine.org>
Mon, 15 Dec 2014 15:07:06 +0000 (10:07 -0500)
commit44292e48a0ffa76badf84d42ad33f885e67d30e9
tree0b8b3ad8f185e8583bd074e22bfea54aa3faca01
parent9603bce7b1379c9029f4373b6db17ef84923a1dd
qemu: add/remove bridge fdb entries as guest CPUs are started/stopped

When libvirt is managing a bridge's forwarding database (FDB)
(macTableManager='libvirt'), if we add FDB entries for a new guest
interface even before the qemu process is created, then in the case of
a migration any other guest attached to the "destination" bridge will
have its traffic immediately sent to the destination of the migration
even while the source domain is still running (and the destination, of
course, isn't). To make sure that traffic from other guests on the new
host continues flowing to the old guest until the new one is ready, we
have to wait until the new guest CPUs are started to add the FDB
entries.

Conversely, we need to remove the FDB entries from the bridge any time
the guest CPUs are stopped; among other things, this will assure
proper operation during a post-copy migration (which is just the
opposite of the problem described in the previous paragraph).
src/qemu/qemu_command.c
src/qemu/qemu_interface.c