diff --git a/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java b/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java index ad88dd6859506f53448d60270e7b3249e8649066..d72e16259bd8299d68412585a669a1b0e4e410c9 100644 --- a/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java +++ b/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java @@ -30,7 +30,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.*; -import java.util.Map.Entry; /** * A representation of a network topology. Used internally by @@ -179,11 +178,6 @@ public class TopologyInstance { // clusters as possible. calculateBroadcastNodePortsInClusters(); - // Step 4. Compute e2e shortest path trees on entire topology for unicast routing. - // The trees are rooted at the destination. - // Cost for tunnel links and direct links are the same. - calculateAllShortestPaths(); - // Step 4.1 Use Yens algorithm to compute multiple paths computeOrderedPaths(); @@ -830,46 +824,6 @@ public class TopologyInstance { } } - /* - * Modification of the calculateShortestPathTreeInClusters (dealing with whole topology, not individual clusters) - */ - private void calculateAllShortestPaths() { - this.broadcastNodePorts.clear(); - this.destinationRootedFullTrees.clear(); - Map<Link, Integer> linkCost = new HashMap<Link, Integer>(); - int tunnel_weight = switchPorts.size() + 1; - - for (NodePortTuple npt : tunnelPorts) { - if (allLinks.get(npt) == null) continue; - for (Link link : allLinks.get(npt)) { - if (link == null) continue; - linkCost.put(link, tunnel_weight); - } - } - - Map<DatapathId, Set<Link>> linkDpidMap = new HashMap<DatapathId, Set<Link>>(); - for (DatapathId s : switches) { - if (switchPorts.get(s) == null) continue; - for (OFPort p : switchPorts.get(s)) { - NodePortTuple np = new NodePortTuple(s, p); - if (allLinks.get(np) == null) continue; - for (Link l : allLinks.get(np)) { - if (linkDpidMap.containsKey(s)) { - linkDpidMap.get(s).add(l); - } - else { - linkDpidMap.put(s, new HashSet<Link>(Arrays.asList(l))); - } - } - } - } - - for (DatapathId node : linkDpidMap.keySet()) { - BroadcastTree tree = dijkstra(linkDpidMap, node, linkCost, true); - destinationRootedFullTrees.put(node, tree); - } - } - /* * Calculates and stores n possible paths using Yen's algorithm, * looping through every switch. diff --git a/src/test/java/net/floodlightcontroller/topology/TopologyInstanceTest.java b/src/test/java/net/floodlightcontroller/topology/TopologyInstanceTest.java index ebc82290a621759cef2a85374a41eae64ac6950c..ce97e92d6b2197d34370d6570aaffe02bcf2f2e6 100644 --- a/src/test/java/net/floodlightcontroller/topology/TopologyInstanceTest.java +++ b/src/test/java/net/floodlightcontroller/topology/TopologyInstanceTest.java @@ -655,7 +655,6 @@ public class TopologyInstanceTest { DatapathId three = DatapathId.of(3); DatapathId six = DatapathId.of(6); - /* * FIRST TOPOLOGY * Both link arrays and corresponding latency