[libvirt] [PATCHv2 8/9] qemu: always use virDomainNetGetActualBridgeName to get interface's bridge

John Ferlan jferlan at redhat.com
Tue Dec 2 22:00:29 UTC 2014



On 12/02/2014 12:08 PM, Laine Stump wrote:
> qemuNetworkIfaceConnect() used to have a special case for
> actualType='network' (a network with forward mode of route, nat, or
> isolated) to call the libvirt public API to retrieve the bridge being
> used by a network. That is no longer necessary - since all network
> types that use a bridge and tap device now get the bridge name stored
> in the ActualNetDef, we can just always use
> virDomainNetGetActualBridgeName() instead.
> 
> (an audit of the two callers to qemuNetworkIfaceConnect() confirms
> that it is never called for any other type of network, so the dead
> code in the else statement (logging an internal error if it is called
> for any other type of network) is eliminated in the process.)
> ---
> 
> Change from V1: This can now actually be applied with no ill side
> effects, due to Patch 4/9 setting actual.brname during a libvirtd
> restart)
> 
>  src/qemu/qemu_command.c | 35 +++++------------------------
>  src/qemu/qemu_hotplug.c | 60 ++++++-------------------------------------------
>  2 files changed, 13 insertions(+), 82 deletions(-)
> 

This didn't apply cleanly via git am for me because of my virXXXFree to
virObjectUnref changes that you hadn't yet merged in...


But it wasn't difficult to figure out what to do!

ACK,

John




More information about the libvir-list mailing list