if (swMap == null) {
// May be accessed by REST API so we need to make it thread safe
swMap = Collections.synchronizedMap(new LRULinkedHashMap<MacVlanPair,Short>(MAX_MACS_PER_SWITCH));
macVlanToSwitchPortMap.put(sw, swMap);
}
swMap.put(new MacVlanPair(mac, vlan), portVal);
}