From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v11 08/17] libxl: rename _IOEMU nic type to VIF_IOEMU
Date: Mon, 23 Jul 2012 18:27:36 +0100 [thread overview]
Message-ID: <1343064465-17864-9-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1343064465-17864-1-git-send-email-roger.pau@citrix.com>
This change will avoid the confusion caused by the fact that IOEMU
means both PV and TAP network interfaces.
Changes since v10:
* Fixed a comment in libxl__device_nic_from_xs_be.
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
tools/libxl/libxl.c | 6 +++---
tools/libxl/libxl_dm.c | 8 ++++----
tools/libxl/libxl_types.idl | 2 +-
tools/libxl/xl_cmdimpl.c | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index cf523a6..e6c857e 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -2410,7 +2410,7 @@ int libxl__device_nic_setdefault(libxl__gc *gc, libxl_device_nic *nic)
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;
}
@@ -2573,7 +2573,7 @@ static void libxl__device_nic_from_xs_be(libxl__gc *gc,
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 */
@@ -2706,7 +2706,7 @@ const char *libxl__device_nic_devname(libxl__gc *gc,
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 --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 4daf664..9a2b247 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -215,12 +215,12 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
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_args_new(libxl__gc *gc,
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 --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 9c83436..1a6c4a2 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -60,7 +60,7 @@ libxl_disk_backend = Enumeration("disk_backend", [
])
libxl_nic_type = Enumeration("nic_type", [
- (1, "IOEMU"),
+ (1, "VIF_IOEMU"),
(2, "VIF"),
])
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 1f36e80..4028f54 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -978,7 +978,7 @@ static void parse_config_data(const char *config_source,
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")) {
@@ -5195,7 +5195,7 @@ int main_networkattach(int argc, char **argv)
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;
--
1.7.7.5 (Apple Git-26)
next prev parent reply other threads:[~2012-07-23 17:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 17:27 [PATCH v11 0/17] execute hotplug scripts from libxl Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 01/17] libxl: fix stubdom console destruction Roger Pau Monne
2012-07-24 7:50 ` Ian Campbell
2012-07-24 8:39 ` Roger Pau Monne
2012-07-24 10:16 ` Stefano Stabellini
2012-07-24 10:54 ` Roger Pau Monne
2012-07-24 10:57 ` Ian Campbell
2012-07-24 11:01 ` Roger Pau Monne
2012-07-24 11:58 ` Stefano Stabellini
2012-07-24 12:14 ` Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 02/17] libxl: refactor disk addition to take a helper Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 03/17] libxl: convert libxl__device_disk_local_attach to an async op Roger Pau Monne
2012-07-24 15:19 ` Ian Jackson
2012-07-24 16:09 ` Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 04/17] libxl: rename vifs to nics Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 05/17] libxl: convert libxl_device_disk_add to an async op Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 06/17] libxl: convert libxl_device_nic_add to an async operation Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 07/17] libxl: add option to choose who executes hotplug scripts Roger Pau Monne
2012-07-23 17:27 ` Roger Pau Monne [this message]
2012-07-23 17:27 ` [PATCH v11 09/17] libxl: set nic type of stub to PV instead of copying from the parent Roger Pau Monne
2012-07-24 15:27 ` Ian Jackson
2012-07-24 15:32 ` Ian Campbell
2012-07-24 16:05 ` Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 10/17] libxl: set correct nic type depending on the guest Roger Pau Monne
2012-07-24 15:28 ` Ian Jackson
2012-07-24 16:02 ` Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 11/17] libxl: use libxl__xs_path_cleanup on device_destroy Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 12/17] libxl: call hotplug scripts for disk devices from libxl Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 13/17] libxl: call hotplug scripts for nic " Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 14/17] libxl: convert libxl_device_vkb_add to an async operation Roger Pau Monne
2012-07-23 17:27 ` [PATCH v11 15/17] libxl: convert libxl_device_vfb_add " Roger Pau Monne
2012-07-24 15:20 ` Ian Jackson
2012-07-25 11:00 ` Roger Pau Monne
2012-07-26 14:26 ` Ian Jackson
2012-07-23 17:27 ` [PATCH v11 16/17] xl: main_blockdetach don't call destroy if remove succeeds Roger Pau Monne
2012-07-24 15:29 ` Ian Jackson
2012-07-23 17:27 ` [PATCH v11 17/17] libxl: libxl__xs_path_cleanup don't print error if ENOENT Roger Pau Monne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343064465-17864-9-git-send-email-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).