[ovs-dev] [VLAN splinters 05/16] vswitchd: Remove special case for VLAN devices.

Ben Pfaff blp at nicira.com
Wed Nov 16 01:17:03 UTC 2011


We introduced this special case before the XenServer integration was
complete.  At that point, we were using VLAN devices on XenServer, with a
separate bridge for each VLAN, so we needed this special case.  But no
version of OVS for any supported XenServer version uses VLAN devices this
way, so we can delete the special case.
---
 vswitchd/bridge.c |   27 ++-------------------------
 1 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 8736962..67360ea 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -1360,33 +1360,10 @@ bridge_pick_datapath_id(struct bridge *br,
         return dpid;
     }
 
-    if (hw_addr_iface) {
-        int vlan;
-        if (!netdev_get_vlan_vid(hw_addr_iface->netdev, &vlan)) {
-            /*
-             * A bridge whose MAC address is taken from a VLAN network device
-             * (that is, a network device created with vconfig(8) or similar
-             * tool) will have the same MAC address as a bridge on the VLAN
-             * device's physical network device.
-             *
-             * Handle this case by hashing the physical network device MAC
-             * along with the VLAN identifier.
-             */
-            uint8_t buf[ETH_ADDR_LEN + 2];
-            memcpy(buf, bridge_ea, ETH_ADDR_LEN);
-            buf[ETH_ADDR_LEN] = vlan >> 8;
-            buf[ETH_ADDR_LEN + 1] = vlan;
-            return dpid_from_hash(buf, sizeof buf);
-        } else {
-            /*
-             * Assume that this bridge's MAC address is unique, since it
-             * doesn't fit any of the cases we handle specially.
-             */
-        }
-    } else {
+    if (!hw_addr_iface) {
         /*
          * A purely internal bridge, that is, one that has no non-virtual
-         * network devices on it at all, is more difficult because it has no
+         * network devices on it at all, is difficult because it has no
          * natural unique identifier at all.
          *
          * When the host is a XenServer, we handle this case by hashing the
-- 
1.7.4.4




More information about the dev mailing list