[ovs-dev] [PATCH] Rename "xs-vif-mac" external_ids key to "peer-mac", for generality.
Ben Pfaff
blp at nicira.com
Wed Sep 1 22:00:56 UTC 2010
On Wed, Sep 01, 2010 at 02:15:09PM -0700, Jesse Gross wrote:
> On Wed, Sep 1, 2010 at 1:03 PM, Ben Pfaff <blp at nicira.com> wrote:
> > diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
> > index 38dc6a1..1d8cbaf 100644
> > --- a/vswitchd/vswitch.xml
> > +++ b/vswitchd/vswitch.xml
> > @@ -665,11 +665,18 @@
> > integrators should either use the Open vSwitch development
> > mailing list to coordinate on common key-value definitions, or
> > choose key names that are likely to be unique. The currently
> > - defined common key-value pair is:
> > + defined common key-value pairs are:
> > <dl>
> > <dt><code>iface-id</code></dt>
> > <dd>A system-unique identifier for the interface. On XenServer,
> > this will commonly be the same as <code>xs-vif-uuid</code>.</dd>
> > + <dt><code>peer-mac</code></dt>
> > + <dd>
> > + For a point-to-point interface, the MAC address of the remote side,
> > + in the form
> > + <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
> > + For Citrix XenServer, this is the value of the <code>MAC</code>
> > + field in the VIF record for this interface.</dd>
>
> I think this a good idea in theory but the name and description
> initially made me think that this was for PPP or something. I know
> that VIF is somewhat Xen centric but I think the name and description
> were better as they were before, just without the xs prefix. In
> practice, I'm pretty certain that this field will always be used for
> hypervisors, so I'm not sure there is much value in making it more
> generic beyond that.
OK.
How's this:
--8<--------------------------cut here-------------------------->8--
From: Ben Pfaff <blp at nicira.com>
Date: Wed, 1 Sep 2010 14:59:23 -0700
Subject: [PATCH] Rename "xs-vif-mac" external_ids key to "vif-mac", for generality.
This can be useful on systems other than XenServer so there is no reason
to make it looks XenServer-specific.
CC: Jeremy Stribling <strib at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
vswitchd/vswitch.xml | 15 ++++++++-------
xenserver/etc_xensource_scripts_vif | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 38dc6a1..46efa36 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -665,11 +665,18 @@
integrators should either use the Open vSwitch development
mailing list to coordinate on common key-value definitions, or
choose key names that are likely to be unique. The currently
- defined common key-value pair is:
+ defined common key-value pairs are:
<dl>
<dt><code>iface-id</code></dt>
<dd>A system-unique identifier for the interface. On XenServer,
this will commonly be the same as <code>xs-vif-uuid</code>.</dd>
+ <dt><code>vif-mac</code></dt>
+ <dd>
+ The MAC address programmed into the ``virtual hardware'' for this
+ interface, in the form
+ <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
+ For Citrix XenServer, this is the value of the <code>MAC</code>
+ field in the VIF record for this interface.</dd>
</dl>
<p>
Additionally the following key-value pairs specifically
@@ -689,12 +696,6 @@
<dd>The virtual network to which this interface is attached.</dd>
<dt><code>xs-vm-uuid</code></dt>
<dd>The VM to which this interface belongs.</dd>
- <dt><code>xs-vif-mac</code></dt>
- <dd>The MAC address programmed into the "virtual hardware" for this
- interface, in the
- form <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
- For Citrix XenServer, this is the value of the <code>MAC</code>
- field in the VIF record for this interface.</dd>
</dl>
</column>
diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif
index 91b75c1..939fbda 100755
--- a/xenserver/etc_xensource_scripts_vif
+++ b/xenserver/etc_xensource_scripts_vif
@@ -114,7 +114,7 @@ handle_vswitch_vif_details()
local address=$(xenstore-read "/local/domain/$DOMID/device/vif/$DEVID/mac" 2>/dev/null)
if [ -n "${address}" ] ; then
- set_vif_external_id "xs-vif-mac" "${address}"
+ set_vif_external_id "vif-mac" "${address}"
fi
if $xs550; then
--
1.7.1
More information about the dev
mailing list