vswitchd: Remove special case for VLAN devices.
authorBen Pfaff <blp@nicira.com>
Tue, 8 Nov 2011 21:53:38 +0000 (13:53 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 23 Nov 2011 21:19:53 +0000 (13:19 -0800)
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

index ce3a788..ca106c5 100644 (file)
@@ -1361,33 +1361,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