Re: [PATCH 2/4] hotplug: Create helper to remove vport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 28, 2017 at 07:37:36 -0400, John Ferlan wrote:
> Combine and "clean up" a bit two places that are removing the vport
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_hotplug.c | 41 +++++++++++++++++++----------------------
>  1 file changed, 19 insertions(+), 22 deletions(-)
> 
> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
> index a486fb4..1af85be 100644
> --- a/src/qemu/qemu_hotplug.c
> +++ b/src/qemu/qemu_hotplug.c
> @@ -937,6 +937,23 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
>  }
>  
>  
> +static void
> +qemuDomainNetDeviceVportRemove(virDomainNetDefPtr net)
> +{
> +    virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(net);
> +
> +    if (!vport)
> +        return;
> +
> +    if (vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_MIDONET) {
> +        ignore_value(virNetDevMidonetUnbindPort(vport));
> +    } else if (vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) {
> +        const char *brname = virDomainNetGetActualBridgeName(net);

Declare this variable at the top level along with vport.

> +        ignore_value(virNetDevOpenvswitchRemovePort(brname, net->ifname));
> +    }
> +}

ACK

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux