On Wed, Jun 06, 2012 at 02:30:34PM +0300, Elo Matias wrote: > Do you have any plans to update the libvirt patch in near future? The current > patch is for libvirt version 0.8.7, which doesn't work anymore with the newer > KVM revisions. > I have updated the patch to libvirt v.0.9.0. The compilation is clean but I have no time to test it now. The patch is here attached (just below my signature). Elo, can you please test it for me? (If there are other volunteers online, please feel free to contribute, too) If I have a positive feedback I'll add it to the svn repository.
renzo ---- diff -Naur a/src/conf/domain_conf.c b/src/conf/domain_conf.c --- a/src/conf/domain_conf.c 2011-03-29 16:18:53.000000000 +0200 +++ b/src/conf/domain_conf.c 2012-06-12 12:13:37.148638922 +0200 @@ -191,7 +191,8 @@ "network", "bridge", "internal", - "direct") + "direct", + "vde") VIR_ENUM_IMPL(virDomainNetBackend, VIR_DOMAIN_NET_BACKEND_TYPE_LAST, "default", @@ -627,6 +628,10 @@ VIR_FREE(def->data.direct.linkdev); break; + case VIR_DOMAIN_NET_TYPE_VDE: + VIR_FREE(def->data.vde.vdeswitch); + break; + case VIR_DOMAIN_NET_TYPE_USER: case VIR_DOMAIN_NET_TYPE_LAST: break; @@ -2502,6 +2507,7 @@ char *internal = NULL; char *devaddr = NULL; char *mode = NULL; + char *vdeswitch = NULL; virNWFilterHashTablePtr filterparams = NULL; virVirtualPortProfileParams virtPort; bool virtPortParsed = false; @@ -2599,7 +2605,11 @@ if (virDomainDeviceBootParseXML(cur, &def->bootIndex, bootMap)) goto error; - } + } else if ((vdeswitch == NULL) && + def->type == VIR_DOMAIN_NET_TYPE_VDE && + xmlStrEqual(cur->name, BAD_CAST "switch")) { + vdeswitch = virXMLPropString(cur, "path"); + } } cur = cur->next; } @@ -2749,6 +2759,11 @@ break; + case VIR_DOMAIN_NET_TYPE_VDE: + def->data.vde.vdeswitch = vdeswitch; + vdeswitch = NULL; + break; + case VIR_DOMAIN_NET_TYPE_USER: case VIR_DOMAIN_NET_TYPE_LAST: break; @@ -7091,6 +7106,12 @@ " "); break; + case VIR_DOMAIN_NET_TYPE_VDE: + if (def->data.vde.vdeswitch) + virBufferEscapeString(buf, " <switch path='%s'/>\n", + def->data.vde.vdeswitch); + break; + case VIR_DOMAIN_NET_TYPE_USER: case VIR_DOMAIN_NET_TYPE_LAST: break; diff -Naur a/src/conf/domain_conf.h b/src/conf/domain_conf.h --- a/src/conf/domain_conf.h 2011-03-29 16:18:53.000000000 +0200 +++ b/src/conf/domain_conf.h 2012-06-12 12:12:18.623068519 +0200 @@ -308,6 +308,7 @@ VIR_DOMAIN_NET_TYPE_BRIDGE, VIR_DOMAIN_NET_TYPE_INTERNAL, VIR_DOMAIN_NET_TYPE_DIRECT, + VIR_DOMAIN_NET_TYPE_VDE, VIR_DOMAIN_NET_TYPE_LAST, }; @@ -379,6 +380,9 @@ int mode; virVirtualPortProfileParams virtPortProfile; } direct; + struct { + char *vdeswitch; + } vde; } data; struct { bool sndbuf_specified; diff -Naur a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c --- a/src/lxc/lxc_driver.c 2011-03-29 16:18:53.000000000 +0200 +++ b/src/lxc/lxc_driver.c 2012-06-12 12:12:18.619068439 +0200 @@ -1064,6 +1064,7 @@ case VIR_DOMAIN_NET_TYPE_INTERNAL: case VIR_DOMAIN_NET_TYPE_DIRECT: case VIR_DOMAIN_NET_TYPE_LAST: + case VIR_DOMAIN_NET_TYPE_VDE: break; } diff -Naur a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c --- a/src/qemu/qemu_command.c 2011-03-29 01:56:01.000000000 +0200 +++ b/src/qemu/qemu_command.c 2012-06-12 12:12:18.635068759 +0200 @@ -1738,12 +1738,21 @@ case VIR_DOMAIN_NET_TYPE_BRIDGE: case VIR_DOMAIN_NET_TYPE_INTERNAL: case VIR_DOMAIN_NET_TYPE_DIRECT: + case VIR_DOMAIN_NET_TYPE_VDE: case VIR_DOMAIN_NET_TYPE_LAST: break; } type_sep = ','; break; + case VIR_DOMAIN_NET_TYPE_VDE: + virBufferAddLit(&buf, "vde"); + if (net->data.vde.vdeswitch) + virBufferVSprintf(&buf, "%csock=%s", + type_sep, + net->data.vde.vdeswitch); + break; + case VIR_DOMAIN_NET_TYPE_USER: default: virBufferAddLit(&buf, "user"); diff -Naur a/src/uml/uml_conf.c b/src/uml/uml_conf.c --- a/src/uml/uml_conf.c 2011-03-01 08:03:32.000000000 +0100 +++ b/src/uml/uml_conf.c 2012-06-12 12:12:18.619068439 +0200 @@ -270,6 +270,14 @@ virBufferVSprintf(&buf, "tuntap,%s", def->ifname); break; + case VIR_DOMAIN_NET_TYPE_VDE: + /* ethNNN=vde,vde_switch,macaddr,port,group,mode,description */ + if (def->data.vde.vdeswitch) { + virBufferVSprintf(&buf, "vde,%s", def->data.vde.vdeswitch); + } else + virBufferAddLit(&buf, "vde"); + break; + case VIR_DOMAIN_NET_TYPE_INTERNAL: umlReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("internal networking type not supported")); ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ vde-users mailing list vde-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vde-users