From: Jim Fehlig <jfehlig@novell.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: static vif/tap names
Date: Wed, 14 Oct 2009 12:31:18 -0600 [thread overview]
Message-ID: <4AD618F6.1080804@novell.com> (raw)
In-Reply-To: <C6FB32E6.175A7%keir.fraser@eu.citrix.com>
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
Keir Fraser wrote:
> On 14/10/2009 06:30, "Jim Fehlig" <jfehlig@novell.com> wrote:
>
>
>> 1. Appending vifname, if specified, to "tap" (tap-<vifname>), otherwise
>> use current dynamic tapX.Y
>> 2. Add a 'tapname=' parameter to vif config. This would allow
>> controlling the vif and tap interface names independently.
>>
>> Is once of these solutions acceptable? Any alternate suggestions?
>>
>
> Option (1) sounds nice and straightforward.
>
Thanks. Patch attached.
Regards,
Jim
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
[-- Attachment #2: vifname.patch --]
[-- Type: text/x-patch, Size: 880 bytes --]
diff -r 18758847bf31 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Wed Oct 14 09:09:23 2009 +0100
+++ b/tools/python/xen/xend/image.py Wed Oct 14 12:28:35 2009 -0600
@@ -869,9 +869,14 @@
ret.append("-net")
ret.append("nic,vlan=%d,macaddr=%s,model=%s" %
(nics, mac, model))
+ vifname = devinfo.get('vifname')
+ if vifname:
+ vifname = "tap-" + vifname
+ else:
+ vifname = "tap%d.%d" % (self.vm.getDomid(), nics-1)
ret.append("-net")
- ret.append("tap,vlan=%d,ifname=tap%d.%d,bridge=%s" %
- (nics, self.vm.getDomid(), nics-1, bridge))
+ ret.append("tap,vlan=%d,ifname=%s,bridge=%s" %
+ (nics, vifname, bridge))
if nics == 0:
ret.append("-net")
[-- Attachment #3: 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:[~2009-10-14 18:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 5:30 static vif/tap names Jim Fehlig
2009-10-14 6:48 ` Keir Fraser
2009-10-14 18:31 ` Jim Fehlig [this message]
2009-10-16 4:54 ` Fischer, Anna
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=4AD618F6.1080804@novell.com \
--to=jfehlig@novell.com \
--cc=keir.fraser@eu.citrix.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.