[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl: rename _IOEMU nic type to VIF_IOEMU


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Thu, 26 Jul 2012 20:55:16 +0000
  • Delivery-date: Thu, 26 Jul 2012 20:55:22 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxx>
# Date 1343295331 -3600
# Node ID 6572f993810a43364f4c72cf97bcf3c085b45b8b
# Parent  ab99fc63a22ea8fc3e73e12560d81326ffdf5636
libxl: rename _IOEMU nic type to VIF_IOEMU

This change will avoid the confusion caused by the fact that IOEMU
means both PV and TAP network interfaces.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r ab99fc63a22e -r 6572f993810a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Thu Jul 26 10:35:31 2012 +0100
+++ b/tools/libxl/libxl.c       Thu Jul 26 10:35:31 2012 +0100
@@ -2316,7 +2316,7 @@ int libxl__device_nic_setdefault(libxl__
                                   libxl__xen_script_dir_path()) < 0 )
         return ERROR_FAIL;
     if (!nic->nictype)
-        nic->nictype = LIBXL_NIC_TYPE_IOEMU;
+        nic->nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
     return 0;
 }
 
@@ -2470,7 +2470,7 @@ static void libxl__device_nic_from_xs_be
     nic->script = xs_read(ctx->xsh, XBT_NULL,
                       libxl__sprintf(gc, "%s/script", be_path), &len);
 
-    /* XXX ioemu nics are not in xenstore at all? */
+    /* vif_ioemu nics use the same xenstore entries as vif interfaces */
     nic->nictype = LIBXL_NIC_TYPE_VIF;
     nic->model = NULL; /* XXX Only for TYPE_IOEMU */
     nic->ifname = NULL; /* XXX Only for TYPE_IOEMU */
@@ -2603,7 +2603,7 @@ const char *libxl__device_nic_devname(li
     switch (type) {
     case LIBXL_NIC_TYPE_VIF:
         return GCSPRINTF("vif%u.%d", domid, devid);
-    case LIBXL_NIC_TYPE_IOEMU:
+    case LIBXL_NIC_TYPE_VIF_IOEMU:
         return GCSPRINTF("vif%u.%d" TAP_DEVICE_SUFFIX, domid, devid);
     default:
         abort();
diff -r ab99fc63a22e -r 6572f993810a tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Thu Jul 26 10:35:31 2012 +0100
+++ b/tools/libxl/libxl_dm.c    Thu Jul 26 10:35:31 2012 +0100
@@ -215,12 +215,12 @@ static char ** libxl__build_device_model
         free(s);
 
         for (i = 0; i < num_nics; i++) {
-            if (nics[i].nictype == LIBXL_NIC_TYPE_IOEMU) {
+            if (nics[i].nictype == LIBXL_NIC_TYPE_VIF_IOEMU) {
                 char *smac = libxl__sprintf(gc,
                                    LIBXL_MAC_FMT, 
LIBXL_MAC_BYTES(nics[i].mac));
                 const char *ifname = libxl__device_nic_devname(gc,
                                                 domid, nics[i].devid,
-                                                LIBXL_NIC_TYPE_IOEMU);
+                                                LIBXL_NIC_TYPE_VIF_IOEMU);
                 flexarray_vappend(dm_args,
                                   "-net",
                                   GCSPRINTF(
@@ -469,12 +469,12 @@ static char ** libxl__build_device_model
                                                          b_info->max_vcpus));
         }
         for (i = 0; i < num_nics; i++) {
-            if (nics[i].nictype == LIBXL_NIC_TYPE_IOEMU) {
+            if (nics[i].nictype == LIBXL_NIC_TYPE_VIF_IOEMU) {
                 char *smac = libxl__sprintf(gc,
                                 LIBXL_MAC_FMT, LIBXL_MAC_BYTES(nics[i].mac));
                 const char *ifname = libxl__device_nic_devname(gc,
                                                 guest_domid, nics[i].devid,
-                                                LIBXL_NIC_TYPE_IOEMU);
+                                                LIBXL_NIC_TYPE_VIF_IOEMU);
                 flexarray_append(dm_args, "-device");
                 flexarray_append(dm_args,
                    libxl__sprintf(gc, "%s,id=nic%d,netdev=net%d,mac=%s",
diff -r ab99fc63a22e -r 6572f993810a tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl       Thu Jul 26 10:35:31 2012 +0100
+++ b/tools/libxl/libxl_types.idl       Thu Jul 26 10:35:31 2012 +0100
@@ -60,7 +60,7 @@ libxl_disk_backend = Enumeration("disk_b
     ])
 
 libxl_nic_type = Enumeration("nic_type", [
-    (1, "IOEMU"),
+    (1, "VIF_IOEMU"),
     (2, "VIF"),
     ])
 
diff -r ab99fc63a22e -r 6572f993810a tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Thu Jul 26 10:35:31 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Thu Jul 26 10:35:31 2012 +0100
@@ -977,7 +977,7 @@ static void parse_config_data(const char
                     nic->bridge = strdup(p2 + 1);
                 } else if (!strcmp(p, "type")) {
                     if (!strcmp(p2 + 1, "ioemu"))
-                        nic->nictype = LIBXL_NIC_TYPE_IOEMU;
+                        nic->nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
                     else
                         nic->nictype = LIBXL_NIC_TYPE_VIF;
                 } else if (!strcmp(p, "ip")) {
@@ -5194,7 +5194,7 @@ int main_networkattach(int argc, char **
             if (!strcmp("vif", oparg)) {
                 nic.nictype = LIBXL_NIC_TYPE_VIF;
             } else if (!strcmp("ioemu", oparg)) {
-                nic.nictype = LIBXL_NIC_TYPE_IOEMU;
+                nic.nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
             } else {
                 fprintf(stderr, "Invalid parameter `type'.\n");
                 return 1;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.