WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] libxl: use preferred syntax for network device creat

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxl: use preferred syntax for network device creation with upstream qemu
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Wed, 25 May 2011 09:20:46 +0100
Cc: Markus Armbruster <armbru@xxxxxxxxxx>
Delivery-date: Wed, 25 May 2011 01:21:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1306311631 -3600
# Node ID 6b1fe0cba8a2f0bcc1274c8e777da5b6c198b45d
# Parent  8258c5a0ba35de937597e2c516bc88f8ebe1be35
libxl: use preferred syntax for network device creation with upstream qemu

Markus Armbruster points out in <m3r582pzc1.fsf@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxx>
Cc: Markus Armbruster <armbru@xxxxxxxxxx>

diff -r 8258c5a0ba35 -r 6b1fe0cba8a2 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Tue May 24 16:28:07 2011 +0100
+++ b/tools/libxl/libxl_dm.c    Wed May 25 09:20:31 2011 +0100
@@ -336,11 +336,11 @@ static char ** libxl__build_device_model
                 } 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",
+                flexarray_append(dm_args, "-device");
+                flexarray_append(dm_args, libxl__sprintf(gc, 
"%s,netdev=net%d,mac=%s",
+                                                         vifs[i].model, 
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++;
             }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel