From: Ben Pfaff Date: Tue, 8 Nov 2011 21:53:38 +0000 (-0800) Subject: vswitchd: Remove special case for VLAN devices. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03eae5f86ce277700323b607fb19a0b8e4aca64d;p=openvswitch vswitchd: Remove special case for VLAN devices. 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. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index ce3a7887..ca106c5c 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -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