* static vif/tap names @ 2009-10-14 5:30 Jim Fehlig 2009-10-14 6:48 ` Keir Fraser 0 siblings, 1 reply; 4+ messages in thread From: Jim Fehlig @ 2009-10-14 5:30 UTC (permalink / raw) To: xen-devel I have received user requests for static vif/tap names. The use case is certainly valid: dom0 tools require consistent and predefined names of virtual network interfaces. The Xen vifname parameter satisfies this use case for pv vifs, but emulated vifs are named dynamically, e.g. tapX.Y. My initial thought was to honor the vifname parameter when generating the qemu args, but there are cases when both pv and emulated vifs are created - e.g. when vif config contains no 'type=' param or when 'type=ioemu'. Two options I have considered are: 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? Regards, Jim ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: static vif/tap names 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 0 siblings, 1 reply; 4+ messages in thread From: Keir Fraser @ 2009-10-14 6:48 UTC (permalink / raw) To: Jim Fehlig, xen-devel 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. -- Keir ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: static vif/tap names 2009-10-14 6:48 ` Keir Fraser @ 2009-10-14 18:31 ` Jim Fehlig 2009-10-16 4:54 ` Fischer, Anna 0 siblings, 1 reply; 4+ messages in thread From: Jim Fehlig @ 2009-10-14 18:31 UTC (permalink / raw) To: Keir Fraser; +Cc: xen-devel [-- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: static vif/tap names 2009-10-14 18:31 ` Jim Fehlig @ 2009-10-16 4:54 ` Fischer, Anna 0 siblings, 0 replies; 4+ messages in thread From: Fischer, Anna @ 2009-10-16 4:54 UTC (permalink / raw) To: Keir Fraser, Jim Fehlig; +Cc: xen-devel > Subject: Re: [Xen-devel] static vif/tap names > > 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> Much better than the current solution. Acked-by: Anna Fischer <anna.fischer@hp.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-16 4:54 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2009-10-16 4:54 ` Fischer, Anna
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.