diff --git a/libxl-ovswitch-config-format-conversions.patch b/0a1b5653-xenconfig-support-openvswitch.patch similarity index 93% rename from libxl-ovswitch-config-format-conversions.patch rename to 0a1b5653-xenconfig-support-openvswitch.patch index 29c6340..97ade80 100644 --- a/libxl-ovswitch-config-format-conversions.patch +++ b/0a1b5653-xenconfig-support-openvswitch.patch @@ -1,4 +1,4 @@ -commit 17c45f4014eb4f98cca86a944b61e0393d597059 +commit 0a1b5653825bf67d3893a9177e188a131daba157 Author: Jim Fehlig Date: Fri Nov 16 13:08:23 2018 -0700 @@ -17,12 +17,13 @@ Date: Fri Nov 16 13:08:23 2018 -0700 trunked VLAN configuration. Signed-off-by: Jim Fehlig + ACKed-by: Michal Privoznik Index: libvirt-4.10.0/src/xenconfig/xen_common.c =================================================================== --- libvirt-4.10.0.orig/src/xenconfig/xen_common.c +++ libvirt-4.10.0/src/xenconfig/xen_common.c -@@ -856,6 +856,84 @@ xenParseCharDev(virConfPtr conf, virDoma +@@ -856,6 +856,80 @@ xenParseCharDev(virConfPtr conf, virDoma } @@ -32,9 +33,8 @@ Index: libvirt-4.10.0/src/xenconfig/xen_common.c + char *vlanstr; + unsigned int tag; + -+ /* 'bridge' string contains a bridge name and single vlan tag */ -+ vlanstr = strchr(bridge, '.'); -+ if (vlanstr) { ++ if ((vlanstr = strchr(bridge, '.'))) { ++ /* 'bridge' string contains a bridge name and single vlan tag */ + if (VIR_STRNDUP(net->data.bridge.brname, bridge, vlanstr - bridge) < 0) + return -1; + @@ -53,11 +53,8 @@ Index: libvirt-4.10.0/src/xenconfig/xen_common.c + + net->virtPortProfile->virtPortType = VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH; + return 0; -+ } -+ -+ /* 'bridge' string contains a bridge name and one or more vlan trunks */ -+ vlanstr = strchr(bridge, ':'); -+ if (vlanstr) { ++ } else if ((vlanstr = strchr(bridge, ':'))) { ++ /* 'bridge' string contains a bridge name and one or more vlan trunks */ + size_t i; + size_t nvlans = 0; + char **vlanstr_list = virStringSplit(bridge, ":", 0); @@ -94,12 +91,12 @@ Index: libvirt-4.10.0/src/xenconfig/xen_common.c + + net->virtPortProfile->virtPortType = VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH; + return 0; ++ } else { ++ /* 'bridge' string only contains the bridge name */ ++ if (VIR_STRDUP(net->data.bridge.brname, bridge) < 0) ++ return -1; + } + -+ /* 'bridge' string only contains the bridge name */ -+ if (VIR_STRDUP(net->data.bridge.brname, bridge) < 0) -+ return -1; -+ + return 0; +} + @@ -107,7 +104,7 @@ Index: libvirt-4.10.0/src/xenconfig/xen_common.c static virDomainNetDefPtr xenParseVif(char *entry, const char *vif_typename) { -@@ -974,8 +1052,8 @@ xenParseVif(char *entry, const char *vif +@@ -974,8 +1048,8 @@ xenParseVif(char *entry, const char *vif net->type = VIR_DOMAIN_NET_TYPE_ETHERNET; } @@ -118,7 +115,7 @@ Index: libvirt-4.10.0/src/xenconfig/xen_common.c goto cleanup; } if (ip[0]) { -@@ -1264,14 +1342,41 @@ xenFormatNet(virConnectPtr conn, +@@ -1264,14 +1338,41 @@ xenFormatNet(virConnectPtr conn, switch (net->type) { case VIR_DOMAIN_NET_TYPE_BRIDGE: diff --git a/libxl-support-ovswitch.patch b/de09ae2f-libxl-support-openvswitch.patch similarity index 96% rename from libxl-support-ovswitch.patch rename to de09ae2f-libxl-support-openvswitch.patch index 1069e08..6a5260f 100644 --- a/libxl-support-ovswitch.patch +++ b/de09ae2f-libxl-support-openvswitch.patch @@ -1,4 +1,4 @@ -commit 2f5d4894a9d8680461883161beb97b6602734726 +commit de09ae2f4676dd521f558d383d33f4b4c026984c Author: Jim Fehlig Date: Tue Jun 28 14:20:02 2016 -0600 @@ -32,6 +32,7 @@ Date: Tue Jun 28 14:20:02 2016 -0600 https://wiki.xenproject.org/wiki/Xen_Networking#Open_vSwitch Signed-off-by: Jim Fehlig + ACKed-by: Michal Privoznik Index: libvirt-4.10.0/src/libxl/libxl_conf.c =================================================================== @@ -66,7 +67,7 @@ Index: libvirt-4.10.0/src/libxl/libxl_conf.c + script = l_nic->script; switch (actual_type) { case VIR_DOMAIN_NET_TYPE_BRIDGE: -+ virBufferAsprintf(&buf, "%s", virDomainNetGetActualBridgeName(l_nic)); ++ virBufferAddStr(&buf, virDomainNetGetActualBridgeName(l_nic)); + /* + * A bit of special handling if vif will be connected to an + * openvswitch bridge diff --git a/libvirt.changes b/libvirt.changes index a271f88..e97db95 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -10,8 +10,8 @@ Mon Dec 3 21:58:53 UTC 2018 - James Fehlig da4b0fd9-libxl-support-soft-reset.patch, libxl-qemu-emulator-caps.patch - Added patches: - libxl-support-ovswitch.patch, - libxl-ovswitch-config-format-conversions.patch + de09ae2f-libxl-support-openvswitch.patch, + 0a1b5653-xenconfig-support-openvswitch.patch - FATE#320928, FATE#325817, FATE#326380, FATE#326698 ------------------------------------------------------------------- diff --git a/libvirt.spec b/libvirt.spec index 3756182..03b273d 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -339,11 +339,11 @@ Source6: libvirtd-relocation-server.xml Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches +Patch0: de09ae2f-libxl-support-openvswitch.patch +Patch1: 0a1b5653-xenconfig-support-openvswitch.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch -Patch102: libxl-support-ovswitch.patch -Patch103: libxl-ovswitch-config-format-conversions.patch # Need to go upstream Patch150: xen-pv-cdrom.patch Patch151: blockcopy-check-dst-identical-device.patch @@ -902,10 +902,10 @@ libvirt plugin for NSS for translating domain names into IP addresses. %prep %setup -q +%patch0 -p1 +%patch1 -p1 %patch100 -p1 %patch101 -p1 -%patch102 -p1 -%patch103 -p1 %patch150 -p1 %patch151 -p1 %patch152 -p1