* [patch 4/5] xen: netback mac selection
@ 2005-01-31 22:33 Jody Belka
2005-02-01 22:27 ` Ian Pratt
0 siblings, 1 reply; 9+ messages in thread
From: Jody Belka @ 2005-01-31 22:33 UTC (permalink / raw)
To: xen-devel
Allow specification of backend vif MAC addresses. If a backend
MAC is not provided, generate one as before
Signed-off-by: Jody Belka <knew-xen@pimb.org>
diffstat:
linux-2.6.10-xen-sparse/drivers/xen/netback/common.h | 2 +
linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c | 25 +++++++++++-----
tools/python/xen/lowlevel/xu/xu.c | 6 +++
tools/python/xen/xend/server/messages.py | 4 +-
tools/python/xen/xend/server/netif.py | 22 +++++++++++++-
tools/python/xen/xm/create.py | 10 +++++-
xen/include/public/io/domain_controller.h | 6 ++-
7 files changed, 61 insertions(+), 14 deletions(-)
diff -drNU2 xen.orig/linux-2.6.10-xen-sparse/drivers/xen/netback/common.h xen/linux-2.6.10-xen-sparse/drivers/xen/netback/common.h
--- xen.orig/linux-2.6.10-xen-sparse/drivers/xen/netback/common.h 2005-01-30 00:46:28.000000000 +0100
+++ xen/linux-2.6.10-xen-sparse/drivers/xen/netback/common.h 2005-01-31 18:40:52.936589384 +0100
@@ -36,4 +36,6 @@
unsigned int handle;
+ u8 fe_dev_addr[6];
+
/* Physical parameters of the comms window. */
unsigned long tx_shmem_frame;
diff -drNU2 xen.orig/linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c xen/linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c
--- xen.orig/linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c 2005-01-30 00:46:28.000000000 +0100
+++ xen/linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c 2005-01-31 18:40:52.947587712 +0100
@@ -164,11 +164,22 @@
dev->tx_queue_len = 0;
- /*
- * Initialise a dummy MAC address. We choose the numerically largest
- * non-broadcast address to prevent the address getting stolen by an
- * Ethernet bridge for STP purposes. (FE:FF:FF:FF:FF:FF)
- */
- memset(dev->dev_addr, 0xFF, ETH_ALEN);
- dev->dev_addr[0] &= ~0x01;
+ if ( (create->be_mac[0] == 0) && (create->be_mac[1] == 0) &&
+ (create->be_mac[2] == 0) && (create->be_mac[3] == 0) &&
+ (create->be_mac[4] == 0) && (create->be_mac[5] == 0) )
+ {
+ /*
+ * Initialise a dummy MAC address. We choose the numerically largest
+ * non-broadcast address to prevent the address getting stolen by an
+ * Ethernet bridge for STP purposes. (FE:FF:FF:FF:FF:FF)
+ */
+ memset(dev->dev_addr, 0xFF, ETH_ALEN);
+ dev->dev_addr[0] &= ~0x01;
+ }
+ else
+ {
+ memcpy(dev->dev_addr, create->be_mac, ETH_ALEN);
+ }
+
+ memcpy(netif->fe_dev_addr, create->mac, ETH_ALEN);
rtnl_lock();
diff -drNU2 xen.orig/tools/python/xen/lowlevel/xu/xu.c xen/tools/python/xen/lowlevel/xu/xu.c
--- xen.orig/tools/python/xen/lowlevel/xu/xu.c 2005-01-30 00:46:29.000000000 +0100
+++ xen/tools/python/xen/lowlevel/xu/xu.c 2005-01-31 18:40:52.957586192 +0100
@@ -624,4 +624,10 @@
P2C(netif_be_create_t, mac[4], u8);
P2C(netif_be_create_t, mac[5], u8);
+ P2C(netif_be_create_t, be_mac[0], u8);
+ P2C(netif_be_create_t, be_mac[1], u8);
+ P2C(netif_be_create_t, be_mac[2], u8);
+ P2C(netif_be_create_t, be_mac[3], u8);
+ P2C(netif_be_create_t, be_mac[4], u8);
+ P2C(netif_be_create_t, be_mac[5], u8);
break;
case TYPE(CMSG_NETIF_BE, CMSG_NETIF_BE_DESTROY):
diff -drNU2 xen.orig/tools/python/xen/xend/server/messages.py xen/tools/python/xen/xend/server/messages.py
--- xen.orig/tools/python/xen/xend/server/messages.py 2005-01-30 00:46:29.000000000 +0100
+++ xen/tools/python/xen/xend/server/messages.py 2005-01-31 18:40:52.969584368 +0100
@@ -267,7 +267,7 @@
args = {}
for (k, v) in params.items():
- if k == 'mac':
+ if k in ['mac', 'be_mac']:
for i in range(0, 6):
- args['mac[%d]' % i] = v[i]
+ args['%s[%d]' % (k, i)] = v[i]
else:
args[k] = v
diff -drNU2 xen.orig/tools/python/xen/xend/server/netif.py xen/tools/python/xen/xend/server/netif.py
--- xen.orig/tools/python/xen/xend/server/netif.py 2005-01-30 00:46:29.000000000 +0100
+++ xen/tools/python/xen/xend/server/netif.py 2005-01-31 18:40:52.980582696 +0100
@@ -110,5 +110,12 @@
if not vmac: return None
mac = [ int(x, 16) for x in vmac.split(':') ]
- if len(mac) != 6: raise XendError("invalid mac")
+ if len(mac) != 6: raise XendError("invalid mac: %s" % vmac)
+ return mac
+
+ def _get_config_be_mac(self, config):
+ vmac = sxp.child_value(config, 'be_mac')
+ if not vmac: return None
+ mac = [ int(x, 16) for x in vmac.split(':') ]
+ if len(mac) != 6: raise XendError("invalid backend mac: %s" % vmac)
return mac
@@ -128,4 +135,5 @@
self.config = config
self.mac = None
+ self.be_mac = None
self.bridge = None
self.script = None
@@ -136,4 +144,5 @@
raise XendError("invalid mac")
self.mac = mac
+ self.be_mac = self._get_config_be_mac(config)
self.bridge = sxp.child_value(config, 'bridge')
self.script = sxp.child_value(config, 'script')
@@ -160,4 +169,5 @@
changes = {}
mac = self._get_config_mac(config)
+ be_mac = self._get_config_be_mac(config)
bridge = sxp.child_value(config, 'bridge')
script = sxp.child_value(config, 'script')
@@ -167,4 +177,6 @@
if (mac is not None) and (mac != self.mac):
raise XendError("cannot change mac")
+ if (be_mac is not None) and (be_mac != self.be_mac):
+ raise XendError("cannot change backend mac")
if (backendDomain is not None) and (backendDomain != str(self.backendDomain)):
raise XendError("cannot change backend")
@@ -191,4 +203,6 @@
['vif', vif],
['mac', mac]]
+ if self.be_mac:
+ val.append(['be_mac', self.get_be_mac()])
if self.bridge:
val.append(['bridge', self.bridge])
@@ -215,4 +229,9 @@
return ':'.join(map(lambda x: "%02x" % x, self.mac))
+ def get_be_mac(self):
+ """Get the backend MAC address as a string.
+ """
+ return ':'.join(map(lambda x: "%02x" % x, self.be_mac))
+
def vifctl_params(self, vmname=None):
"""Get the parameters to pass to vifctl.
@@ -268,4 +287,5 @@
{ 'domid' : self.controller.dom,
'netif_handle' : self.vif,
+ 'be_mac' : self.be_mac or [0, 0, 0, 0, 0, 0],
'mac' : self.mac })
self.getBackendInterface().writeRequest(msg, response=d)
diff -drNU2 xen.orig/tools/python/xen/xm/create.py xen/tools/python/xen/xm/create.py
--- xen.orig/tools/python/xen/xm/create.py 2005-01-30 00:46:29.000000000 +0100
+++ xen/tools/python/xen/xm/create.py 2005-01-31 18:40:52.990581176 +0100
@@ -152,9 +152,11 @@
use="Add an IP address to the domain.")
-gopts.var('vif', val="mac=MAC,bridge=BRIDGE,script=SCRIPT,backend=DOM",
+gopts.var('vif', val="mac=MAC,be_mac=MAC,bridge=BRIDGE,script=SCRIPT,backend=DOM",
fn=append_value, default=[],
use="""Add a network interface with the given MAC address and bridge.
The vif is configured by calling the given configuration script.
If mac is not specified a random MAC address is used.
+ The MAC address of the backend interface can be selected with be_mac.
+ If not specified then the network backend chooses it's own MAC address.
If bridge is not specified the default bridge is used.
If script is not specified the default script is used.
@@ -286,4 +288,5 @@
if not mac:
mac = randomMAC()
+ be_mac = d.get('be_mac')
bridge = d.get('bridge')
script = d.get('script')
@@ -292,4 +295,5 @@
else:
mac = randomMAC()
+ be_mac = None
bridge = None
script = None
@@ -298,4 +302,6 @@
config_vif = ['vif']
config_vif.append(['mac', mac])
+ if be_mac:
+ config_vif.append(['be_mac', be_mac])
if bridge:
config_vif.append(['bridge', bridge])
@@ -384,5 +390,5 @@
k = k.strip()
v = v.strip()
- if k not in ['mac', 'bridge', 'script', 'backend', 'ip']:
+ if k not in ['mac', 'be_mac', 'bridge', 'script', 'backend', 'ip']:
opts.err('Invalid vif specifier: ' + vif)
d[k] = v
diff -drNU2 xen.orig/xen/include/public/io/domain_controller.h xen/xen/include/public/io/domain_controller.h
--- xen.orig/xen/include/public/io/domain_controller.h 2005-01-30 00:46:29.000000000 +0100
+++ xen/xen/include/public/io/domain_controller.h 2005-01-31 18:40:53.000579656 +0100
@@ -479,7 +479,9 @@
u8 mac[6]; /* 8 */
u16 __pad1; /* 14 */
+ u8 be_mac[6]; /* 16 */
+ u16 __pad2; /* 22 */
/* OUT */
- u32 status; /* 16 */
-} PACKED netif_be_create_t; /* 20 bytes */
+ u32 status; /* 24 */
+} PACKED netif_be_create_t; /* 28 bytes */
/*
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [patch 4/5] xen: netback mac selection
@ 2005-01-31 23:11 Ian Pratt
2005-01-31 23:28 ` Jody Belka
0 siblings, 1 reply; 9+ messages in thread
From: Ian Pratt @ 2005-01-31 23:11 UTC (permalink / raw)
To: Jody Belka, xen-devel
Out of interest, why do you care about the backend's address? It doesn't
appear on any packets. Does this patch also pass new parameters into the
vif-bridge script?
Thanks,
Ian
> Allow specification of backend vif MAC addresses. If a backend
> MAC is not provided, generate one as before
>
> Signed-off-by: Jody Belka <knew-xen@pimb.org>
>
>
> diffstat:
> linux-2.6.10-xen-sparse/drivers/xen/netback/common.h | 2 +
> linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c |
> 25 +++++++++++-----
> tools/python/xen/lowlevel/xu/xu.c | 6 +++
> tools/python/xen/xend/server/messages.py | 4 +-
> tools/python/xen/xend/server/netif.py |
> 22 +++++++++++++-
> tools/python/xen/xm/create.py | 10 +++++-
> xen/include/public/io/domain_controller.h | 6 ++-
> 7 files changed, 61 insertions(+), 14 deletions(-)
>
>
> diff -drNU2
> xen.orig/linux-2.6.10-xen-sparse/drivers/xen/netback/common.h
> xen/linux-2.6.10-xen-sparse/drivers/xen/netback/common.h
> ---
> xen.orig/linux-2.6.10-xen-sparse/drivers/xen/netback/common.h
> 2005-01-30 00:46:28.000000000 +0100
> +++ xen/linux-2.6.10-xen-sparse/drivers/xen/netback/common.h
> 2005-01-31 18:40:52.936589384 +0100
> @@ -36,4 +36,6 @@
> unsigned int handle;
>
> + u8 fe_dev_addr[6];
> +
> /* Physical parameters of the comms window. */
> unsigned long tx_shmem_frame;
> diff -drNU2
> xen.orig/linux-2.6.10-xen-sparse/drivers/xen/netback/interface
> .c xen/linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c
> ---
> xen.orig/linux-2.6.10-xen-sparse/drivers/xen/netback/inte
> rface.c 2005-01-30 00:46:28.000000000 +0100
> +++
> xen/linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c
> 2005-01-31 18:40:52.947587712 +0100
> @@ -164,11 +164,22 @@
> dev->tx_queue_len = 0;
>
> - /*
> - * Initialise a dummy MAC address. We choose the
> numerically largest
> - * non-broadcast address to prevent the address getting
> stolen by an
> - * Ethernet bridge for STP purposes. (FE:FF:FF:FF:FF:FF)
> - */
> - memset(dev->dev_addr, 0xFF, ETH_ALEN);
> - dev->dev_addr[0] &= ~0x01;
> + if ( (create->be_mac[0] == 0) && (create->be_mac[1] == 0) &&
> + (create->be_mac[2] == 0) && (create->be_mac[3] == 0) &&
> + (create->be_mac[4] == 0) && (create->be_mac[5] == 0) )
> + {
> + /*
> + * Initialise a dummy MAC address. We choose the
> numerically largest
> + * non-broadcast address to prevent the address
> getting stolen by an
> + * Ethernet bridge for STP purposes. (FE:FF:FF:FF:FF:FF)
> + */
> + memset(dev->dev_addr, 0xFF, ETH_ALEN);
> + dev->dev_addr[0] &= ~0x01;
> + }
> + else
> + {
> + memcpy(dev->dev_addr, create->be_mac, ETH_ALEN);
> + }
> +
> + memcpy(netif->fe_dev_addr, create->mac, ETH_ALEN);
>
> rtnl_lock();
> diff -drNU2 xen.orig/tools/python/xen/lowlevel/xu/xu.c
> xen/tools/python/xen/lowlevel/xu/xu.c
> --- xen.orig/tools/python/xen/lowlevel/xu/xu.c
> 2005-01-30 00:46:29.000000000 +0100
> +++ xen/tools/python/xen/lowlevel/xu/xu.c 2005-01-31
> 18:40:52.957586192 +0100
> @@ -624,4 +624,10 @@
> P2C(netif_be_create_t, mac[4], u8);
> P2C(netif_be_create_t, mac[5], u8);
> + P2C(netif_be_create_t, be_mac[0], u8);
> + P2C(netif_be_create_t, be_mac[1], u8);
> + P2C(netif_be_create_t, be_mac[2], u8);
> + P2C(netif_be_create_t, be_mac[3], u8);
> + P2C(netif_be_create_t, be_mac[4], u8);
> + P2C(netif_be_create_t, be_mac[5], u8);
> break;
> case TYPE(CMSG_NETIF_BE, CMSG_NETIF_BE_DESTROY):
> diff -drNU2 xen.orig/tools/python/xen/xend/server/messages.py
> xen/tools/python/xen/xend/server/messages.py
> --- xen.orig/tools/python/xen/xend/server/messages.py
> 2005-01-30 00:46:29.000000000 +0100
> +++ xen/tools/python/xen/xend/server/messages.py
> 2005-01-31 18:40:52.969584368 +0100
> @@ -267,7 +267,7 @@
> args = {}
> for (k, v) in params.items():
> - if k == 'mac':
> + if k in ['mac', 'be_mac']:
> for i in range(0, 6):
> - args['mac[%d]' % i] = v[i]
> + args['%s[%d]' % (k, i)] = v[i]
> else:
> args[k] = v
> diff -drNU2 xen.orig/tools/python/xen/xend/server/netif.py
> xen/tools/python/xen/xend/server/netif.py
> --- xen.orig/tools/python/xen/xend/server/netif.py
> 2005-01-30 00:46:29.000000000 +0100
> +++ xen/tools/python/xen/xend/server/netif.py 2005-01-31
> 18:40:52.980582696 +0100
> @@ -110,5 +110,12 @@
> if not vmac: return None
> mac = [ int(x, 16) for x in vmac.split(':') ]
> - if len(mac) != 6: raise XendError("invalid mac")
> + if len(mac) != 6: raise XendError("invalid mac: %s" % vmac)
> + return mac
> +
> + def _get_config_be_mac(self, config):
> + vmac = sxp.child_value(config, 'be_mac')
> + if not vmac: return None
> + mac = [ int(x, 16) for x in vmac.split(':') ]
> + if len(mac) != 6: raise XendError("invalid backend
> mac: %s" % vmac)
> return mac
>
> @@ -128,4 +135,5 @@
> self.config = config
> self.mac = None
> + self.be_mac = None
> self.bridge = None
> self.script = None
> @@ -136,4 +144,5 @@
> raise XendError("invalid mac")
> self.mac = mac
> + self.be_mac = self._get_config_be_mac(config)
> self.bridge = sxp.child_value(config, 'bridge')
> self.script = sxp.child_value(config, 'script')
> @@ -160,4 +169,5 @@
> changes = {}
> mac = self._get_config_mac(config)
> + be_mac = self._get_config_be_mac(config)
> bridge = sxp.child_value(config, 'bridge')
> script = sxp.child_value(config, 'script')
> @@ -167,4 +177,6 @@
> if (mac is not None) and (mac != self.mac):
> raise XendError("cannot change mac")
> + if (be_mac is not None) and (be_mac != self.be_mac):
> + raise XendError("cannot change backend mac")
> if (backendDomain is not None) and (backendDomain !=
> str(self.backendDomain)):
> raise XendError("cannot change backend")
> @@ -191,4 +203,6 @@
> ['vif', vif],
> ['mac', mac]]
> + if self.be_mac:
> + val.append(['be_mac', self.get_be_mac()])
> if self.bridge:
> val.append(['bridge', self.bridge])
> @@ -215,4 +229,9 @@
> return ':'.join(map(lambda x: "%02x" % x, self.mac))
>
> + def get_be_mac(self):
> + """Get the backend MAC address as a string.
> + """
> + return ':'.join(map(lambda x: "%02x" % x, self.be_mac))
> +
> def vifctl_params(self, vmname=None):
> """Get the parameters to pass to vifctl.
> @@ -268,4 +287,5 @@
> { 'domid' : self.controller.dom,
> 'netif_handle' : self.vif,
> + 'be_mac' : self.be_mac or [0,
> 0, 0, 0, 0, 0],
> 'mac' : self.mac })
> self.getBackendInterface().writeRequest(msg, response=d)
> diff -drNU2 xen.orig/tools/python/xen/xm/create.py
> xen/tools/python/xen/xm/create.py
> --- xen.orig/tools/python/xen/xm/create.py 2005-01-30
> 00:46:29.000000000 +0100
> +++ xen/tools/python/xen/xm/create.py 2005-01-31
> 18:40:52.990581176 +0100
> @@ -152,9 +152,11 @@
> use="Add an IP address to the domain.")
>
> -gopts.var('vif',
> val="mac=MAC,bridge=BRIDGE,script=SCRIPT,backend=DOM",
> +gopts.var('vif',
> val="mac=MAC,be_mac=MAC,bridge=BRIDGE,script=SCRIPT,backend=DOM",
> fn=append_value, default=[],
> use="""Add a network interface with the given MAC
> address and bridge.
> The vif is configured by calling the given
> configuration script.
> If mac is not specified a random MAC address is used.
> + The MAC address of the backend interface can be
> selected with be_mac.
> + If not specified then the network backend chooses
> it's own MAC address.
> If bridge is not specified the default bridge is used.
> If script is not specified the default script is used.
> @@ -286,4 +288,5 @@
> if not mac:
> mac = randomMAC()
> + be_mac = d.get('be_mac')
> bridge = d.get('bridge')
> script = d.get('script')
> @@ -292,4 +295,5 @@
> else:
> mac = randomMAC()
> + be_mac = None
> bridge = None
> script = None
> @@ -298,4 +302,6 @@
> config_vif = ['vif']
> config_vif.append(['mac', mac])
> + if be_mac:
> + config_vif.append(['be_mac', be_mac])
> if bridge:
> config_vif.append(['bridge', bridge])
> @@ -384,5 +390,5 @@
> k = k.strip()
> v = v.strip()
> - if k not in ['mac', 'bridge', 'script', 'backend', 'ip']:
> + if k not in ['mac', 'be_mac', 'bridge',
> 'script', 'backend', 'ip']:
> opts.err('Invalid vif specifier: ' + vif)
> d[k] = v
> diff -drNU2
> xen.orig/xen/include/public/io/domain_controller.h
> xen/xen/include/public/io/domain_controller.h
> --- xen.orig/xen/include/public/io/domain_controller.h
> 2005-01-30 00:46:29.000000000 +0100
> +++ xen/xen/include/public/io/domain_controller.h
> 2005-01-31 18:40:53.000579656 +0100
> @@ -479,7 +479,9 @@
> u8 mac[6]; /* 8 */
> u16 __pad1; /* 14 */
> + u8 be_mac[6]; /* 16 */
> + u16 __pad2; /* 22 */
> /* OUT */
> - u32 status; /* 16 */
> -} PACKED netif_be_create_t; /* 20 bytes */
> + u32 status; /* 24 */
> +} PACKED netif_be_create_t; /* 28 bytes */
>
> /*
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive
> Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
>
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 4/5] xen: netback mac selection
2005-01-31 23:11 Ian Pratt
@ 2005-01-31 23:28 ` Jody Belka
0 siblings, 0 replies; 9+ messages in thread
From: Jody Belka @ 2005-01-31 23:28 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Pratt
On Mon, Jan 31, 2005 at 11:11:15PM -0000, Ian Pratt wrote:
> Out of interest, why do you care about the backend's address? It doesn't
> appear on any packets. Does this patch also pass new parameters into the
> vif-bridge script?
Because if the netback you're connecting to isn't in dom0, it's nice to
actually be able to distingush the interfaces one from another, so that
you know what to do with them *g*
J
--
Jody Belka
knew (at) pimb (dot) org
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [patch 4/5] xen: netback mac selection
@ 2005-01-31 23:47 Ian Pratt
2005-02-01 0:02 ` Jody Belka
2005-02-01 0:56 ` Christian Limpach
0 siblings, 2 replies; 9+ messages in thread
From: Ian Pratt @ 2005-01-31 23:47 UTC (permalink / raw)
To: Jody Belka, xen-devel
> On Mon, Jan 31, 2005 at 11:11:15PM -0000, Ian Pratt wrote:
> > Out of interest, why do you care about the backend's
> address? It doesn't
> > appear on any packets. Does this patch also pass new
> parameters into the
> > vif-bridge script?
>
> Because if the netback you're connecting to isn't in dom0,
> it's nice to
> actually be able to distingush the interfaces one from
> another, so that
> you know what to do with them *g*
OK, though I guess my preferred way of doing this would be to allow
arbitrary parameters to be passed from the config file into the vif
script e.g. foo=bar baz=bar2
What do you think?
Ian
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 4/5] xen: netback mac selection
2005-01-31 23:47 [patch 4/5] xen: netback mac selection Ian Pratt
@ 2005-02-01 0:02 ` Jody Belka
2005-02-01 0:56 ` Christian Limpach
1 sibling, 0 replies; 9+ messages in thread
From: Jody Belka @ 2005-02-01 0:02 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Pratt
On Mon, Jan 31, 2005 at 11:47:24PM -0000, Ian Pratt wrote:
> > Because if the netback you're connecting to isn't in dom0,
> > it's nice to
> > actually be able to distingush the interfaces one from
> > another, so that
> > you know what to do with them *g*
>
> OK, though I guess my preferred way of doing this would be to allow
> arbitrary parameters to be passed from the config file into the vif
> script e.g. foo=bar baz=bar2
The vif script only runs in dom0 though, not in any other netback
domains you might have set up :) I'm actually thinking of stopping
using the vif script even in dom0 now, and just using the standard
network hotplug system instead.
J
--
Jody Belka
knew (at) pimb (dot) org
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 4/5] xen: netback mac selection
[not found] <A95E2296287EAD4EB592B5DEEFCE0E9D12361B@liverpoolst.ad.cl.cam.ac.uk>
@ 2005-02-01 0:40 ` Jody Belka
2005-02-01 0:47 ` Jody Belka
0 siblings, 1 reply; 9+ messages in thread
From: Jody Belka @ 2005-02-01 0:40 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Pratt
On Tue, Feb 01, 2005 at 12:08:38AM -0000, Ian Pratt wrote:
> > The vif script only runs in dom0 though, not in any other netback
> > domains you might have set up :) I'm actually thinking of stopping
> > using the vif script even in dom0 now, and just using the standard
> > network hotplug system instead.
>
> I'd be interested to hear how you intend to hook into the hotplug
> system.
Already doing it in my test netback domain. It "just works", without
any real work. When the interface is registered by the driver, hotplug
gets called with the information, which then calls the hotplug network
script. Now, on debian-based systems that then calls ifup for the interface
with "=hotplug" added, which leads to the hotplug mapping stanza if it's
defined. In my test domain i have the following:
-----
mapping hotplug
script /usr/local/sbin/get-mac-address
map fe:ff:ff:01:01:ff subnet6
map fe:ff:ff:01:02:ff subnet7
iface subnet6 inet static
address 192.168.6.1
netmask 255.255.255.0
network 192.168.6.0
broadcast 192.168.6.255
iface subnet7 inet static
address 192.168.7.1
netmask 255.255.255.0
network 192.168.7.0
broadcast 192.168.7.255
-----
> Our intention was that it should be possible to have driver domains with
> very small root filesystem -- just an initrd. We discussed a mechanism
> whereby a shell script to run would be passed over a secondary console
> connection and executed in the driver domain.
Well, the standard hotplug system is just all shell scripts anyway, not
particularly big or anything. And it's completely replaceable; you can
put anything there you care to write.
J
--
Jody Belka
knew (at) pimb (dot) org
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 4/5] xen: netback mac selection
2005-02-01 0:40 ` Jody Belka
@ 2005-02-01 0:47 ` Jody Belka
0 siblings, 0 replies; 9+ messages in thread
From: Jody Belka @ 2005-02-01 0:47 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Pratt
On Tue, Feb 01, 2005 at 01:40:02AM +0100, Jody Belka wrote:
> On Tue, Feb 01, 2005 at 12:08:38AM -0000, Ian Pratt wrote:
> > I'd be interested to hear how you intend to hook into the hotplug
> > system.
>
> Already doing it in my test netback domain. It "just works", without
> any real work. When the interface is registered by the driver, hotplug
> gets called with the information, which then calls the hotplug network
> script. Now, on debian-based systems that then calls ifup for the interface
> with "=hotplug" added, which leads to the hotplug mapping stanza if it's
> defined. In my test domain i have the following:
Oh, another alternative (with debian anyway, again), is to set up an
/etc/iftab file. The debian network hotplug script calls ifrename
before running ifup, so with that you can rename the interfaces to
something else, and then use the new names in the /etc/network/interfaces
file. In fact, i think i'll do that instead of using the mapping stanza,
as it feels a bit cleaner.
J
--
Jody Belka
knew (at) pimb (dot) org
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 4/5] xen: netback mac selection
2005-01-31 23:47 [patch 4/5] xen: netback mac selection Ian Pratt
2005-02-01 0:02 ` Jody Belka
@ 2005-02-01 0:56 ` Christian Limpach
1 sibling, 0 replies; 9+ messages in thread
From: Christian Limpach @ 2005-02-01 0:56 UTC (permalink / raw)
To: Ian Pratt; +Cc: Jody Belka, xen-devel
On Mon, 31 Jan 2005 23:47:24 -0000, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:
> > On Mon, Jan 31, 2005 at 11:11:15PM -0000, Ian Pratt wrote:
> > > Out of interest, why do you care about the backend's
> > address? It doesn't
> > > appear on any packets. Does this patch also pass new
> > parameters into the
> > > vif-bridge script?
> >
> > Because if the netback you're connecting to isn't in dom0,
> > it's nice to
> > actually be able to distingush the interfaces one from
> > another, so that
> > you know what to do with them *g*
>
> OK, though I guess my preferred way of doing this would be to allow
> arbitrary parameters to be passed from the config file into the vif
> script e.g. foo=bar baz=bar2
>
> What do you think?
I like the option of being able to specify different backend
addresses. And as Jody mentioned, the information is readily
available in a driver domain without any additional channels.
christian
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 4/5] xen: netback mac selection
2005-01-31 22:33 Jody Belka
@ 2005-02-01 22:27 ` Ian Pratt
0 siblings, 0 replies; 9+ messages in thread
From: Ian Pratt @ 2005-02-01 22:27 UTC (permalink / raw)
To: Jody Belka; +Cc: xen-devel, Ian.Pratt
> Allow specification of backend vif MAC addresses. If a backend
> MAC is not provided, generate one as before
Jody, since this patch (4) changes one of the message formats I'm
applying it to just 'unstable' rather than 2.0-testing.
I've applied 1 and 2, and I think we came to mutual agreement on
dropping 5. The 'sysfs' parts of 5 may still be worthwhile, or
are they superseded by the proposed new 'xen bus' sysfs stuff?
Patch 3 is definitely worthwhile, though I'd appreciate it if you
could rework it as discussed. At the very least, we should seed
the random number generator off something better than system time
in seconds! It would be ideal if it was seeded from a string
containing the config file and all the variables passed to it.
Ian
01-blkfront-vbd-bugfix.patch
Fix incorrect result-check in xlvbd_init_device
02-xm-blkif-ide-dev-numbers.patch
Fix the device number calculation for /dev/hd* device names;
ide device numbering works differently to scsi
03-xm-create-mac-selection.patch
Check for duplicate supplied vif MACs, and make sure
that randomly generated MACs for a domain are all different
04-netback-mac-selection.patch
Allow specification of backend vif MAC addresses. If a backend
MAC is not provided, generate one as before
05-net-features.patch
Allow (1) the making of both frontend and backend vif MACs read-only
(independently), (2) the addition of some xen-specific sysfs attributes
on front/back vifs, (3) an option to set several vif defaults in a domain
config file, for ease of use when creating multiple vifs.
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-02-01 22:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 23:47 [patch 4/5] xen: netback mac selection Ian Pratt
2005-02-01 0:02 ` Jody Belka
2005-02-01 0:56 ` Christian Limpach
[not found] <A95E2296287EAD4EB592B5DEEFCE0E9D12361B@liverpoolst.ad.cl.cam.ac.uk>
2005-02-01 0:40 ` Jody Belka
2005-02-01 0:47 ` Jody Belka
-- strict thread matches above, loose matches on Subject: below --
2005-01-31 23:11 Ian Pratt
2005-01-31 23:28 ` Jody Belka
2005-01-31 22:33 Jody Belka
2005-02-01 22:27 ` Ian Pratt
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.