[libvirt] [PATCH 2/4] hotplug: Create helper to remove vport
Peter Krempa
pkrempa at redhat.com
Wed Jun 28 12:05:00 UTC 2017
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 at redhat.com>
> ---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170628/e8fcc71c/attachment-0001.sig>
More information about the libvir-list
mailing list