From: Florian Manschwetus <florianmanschwetus@gmx.de>
To: xen-devel@lists.xensource.com
Subject: Re: [PATCH 2/2] libxl: write vifname in xenstore if set.
Date: Tue, 03 Jan 2012 17:20:17 +0100 [thread overview]
Message-ID: <4F032AC1.5090800@gmx.de> (raw)
In-Reply-To: <1325587168.24422.68.camel@liuw-desktop>
[-- Attachment #1.1: Type: text/plain, Size: 2112 bytes --]
This applies against 4.1.2, but untested, as I still have my Athlon X2
xen boot trouble.
diff --git tools/libxl/libxl.c tools/libxl/libxl.c
index 2b8f8f4..3c086d5 100644
--- tools/libxl/libxl.c
+++ tools/libxl/libxl.c
@@ -1229,6 +1229,12 @@ int libxl_device_nic_add(libxl_ctx *ctx, uint32_t
domid, libxl_device_nic *nic)
flexarray_append(back, libxl__sprintf(&gc, "%d", 1));
flexarray_append(back, "script");
flexarray_append(back, nic->script);
+
+ if (nic->ifname) {
+ flexarray_append(back, "vifname");
+ flexarray_append(back, nic->ifname);
+ }
+
flexarray_append(back, "mac");
flexarray_append(back, libxl__sprintf(&gc,
"%02x:%02x:%02x:%02x:%02x:%02x",
nic->mac[0],
nic->mac[1], nic->mac[2],
diff --git tools/libxl/xl_cmdimpl.c tools/libxl/xl_cmdimpl.c
index 8270f34..8da8b88 100644
--- tools/libxl/xl_cmdimpl.c
+++ tools/libxl/xl_cmdimpl.c
@@ -393,6 +393,8 @@
for (i = 0; i < d_config->num_vifs; i++) {
printf("\t(device\n");
printf("\t\t(vif\n");
+ if (d_config->vifs[i].ifname)
+ printf("\t\t\t(vifname %s)\n", d_config->vifs[i].ifname);
printf("\t\t\t(backend_domid %d)\n",
d_config->vifs[i].backend_domid);
printf("\t\t\t(frontend_domid %d)\n", domid);
printf("\t\t\t(devid %d)\n", d_config->vifs[i].devid);
Am 03.01.2012 11:39, schrieb Wei Liu:
> On Tue, 2012-01-03 at 10:16 +0000, Ian Campbell wrote:
>> On Thu, 2011-12-29 at 11:14 +0000, Wei Liu wrote:
>>> Simple fix to enable user to specify vif names.
>>
>> Thanks. It is worth noting that the naming of the vif is implemented by
>> the hotplug scripts and not by netback (which always uses vifX.Y).
>>
>
> Yes, I knew that after digging into hotplug scripts. :)
>
> It seems that we need to backport these patches to earlier versions as
> well.
>
>
> Wei.
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
[-- Attachment #1.2: S/MIME Kryptografische Unterschrift --]
[-- Type: application/pkcs7-signature, Size: 2332 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2012-01-03 16:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 11:14 libxl: simple fix to enable user to configure vif names Wei Liu
2011-12-29 11:14 ` [PATCH 1/2] libxl: print out vifname in create dryrun Wei Liu
2012-01-03 10:16 ` Ian Campbell
2011-12-29 11:14 ` [PATCH 2/2] libxl: write vifname in xenstore if set Wei Liu
2012-01-03 10:16 ` Ian Campbell
2012-01-03 10:39 ` Wei Liu
2012-01-03 16:20 ` Florian Manschwetus [this message]
2012-01-05 17:14 ` Ian Jackson
2011-12-31 15:01 ` libxl: simple fix to enable user to configure vif names Florian Heigl
2012-01-01 11:56 ` Wei Liu
2012-01-04 12:42 ` Wei Liu
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=4F032AC1.5090800@gmx.de \
--to=florianmanschwetus@gmx.de \
--cc=xen-devel@lists.xensource.com \
/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).