aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-05-26 17:16:47 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-05-26 17:16:47 +0100
commit2d680dadf189da1774c086f6eed72e5da564eb1e (patch)
treede01279b376e9dcddbade1c45eb3925d27bbacf1
parentf92337d9494efbab0918eb0e055d129fce5c3227 (diff)
downloadxen-2d680dadf189da1774c086f6eed72e5da564eb1e.tar.gz
xen-2d680dadf189da1774c086f6eed72e5da564eb1e.tar.bz2
xen-2d680dadf189da1774c086f6eed72e5da564eb1e.zip
libxl: use preferred syntax for network device creation with upstream qemu
Markus Armbruster points out in <m3r582pzc1.fsf@blackfin.pond.sub.org> on qemu-devel that this is the prefered syntax going forward. Using it avoid needlessly instantiating a qemu "vlan" and instead creates a simply host end point and device. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--tools/libxl/libxl_dm.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index a47dd532f3..5e80bc865e 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -373,12 +373,16 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
} else {
ifname = vifs[i].ifname;
}
- flexarray_append(dm_args, "-net");
- flexarray_append(dm_args, libxl__sprintf(gc, "nic,vlan=%d,macaddr=%s,model=%s",
- vifs[i].devid, smac, vifs[i].model));
- flexarray_append(dm_args, "-net");
- flexarray_append(dm_args, libxl__sprintf(gc, "tap,vlan=%d,ifname=%s,script=%s",
- vifs[i].devid, ifname, libxl_tapif_script(gc)));
+ flexarray_append(dm_args, "-device");
+ flexarray_append(dm_args,
+ libxl__sprintf(gc, "%s,id=nic%d,netdev=net%d,mac=%s",
+ vifs[i].model, vifs[i].devid,
+ vifs[i].devid, smac));
+ flexarray_append(dm_args, "-netdev");
+ flexarray_append(dm_args,
+ libxl__sprintf(gc, "type=tap,id=net%d,ifname=%s,script=%s",
+ vifs[i].devid, ifname,
+ libxl_tapif_script(gc)));
ioemu_vifs++;
}
}