diff --git a/src/main/java/net/floodlightcontroller/topology/TopologyManager.java b/src/main/java/net/floodlightcontroller/topology/TopologyManager.java index 5eacd5895d2c194062d26a0de3fbb7d247153de5..e0496a4e54530193e2c307540d8f191c26710efb 100644 --- a/src/main/java/net/floodlightcontroller/topology/TopologyManager.java +++ b/src/main/java/net/floodlightcontroller/topology/TopologyManager.java @@ -120,6 +120,10 @@ public class TopologyManager implements */ protected boolean dtLinksUpdated; + /** Flag that indicates if tunnel ports were updated or not + */ + protected boolean tunnelPortsUpdated; + protected final int TOPOLOGY_COMPUTE_INTERVAL_MS = 500; /** @@ -152,6 +156,7 @@ public class TopologyManager implements boolean newInstanceFlag; linksUpdated = false; dtLinksUpdated = false; + tunnelPortsUpdated = false; applyUpdates(); newInstanceFlag = createNewInstance(); lastUpdateTime = new Date(); @@ -952,11 +957,13 @@ public class TopologyManager implements public void addTunnelPort(long sw, short port) { NodePortTuple npt = new NodePortTuple(sw, port); tunnelPorts.add(npt); + tunnelPortsUpdated = true; } public void removeTunnelPort(long sw, short port) { NodePortTuple npt = new NodePortTuple(sw, port); tunnelPorts.remove(npt); + tunnelPortsUpdated = true; } /** @@ -1257,6 +1264,7 @@ public class TopologyManager implements this.clear(); linksUpdated = true; dtLinksUpdated = true; + tunnelPortsUpdated = true; createNewInstance(); lastUpdateTime = new Date(); }