diff --git a/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java b/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java index ca041e49a4f5320d163491524cecea400ae6d002..8e001b9c7a7933fd36f660dfb739ad454cc63f18 100644 --- a/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java +++ b/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java @@ -237,10 +237,10 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF return; } - Route route = routingEngineService.getRoute(source, + Route route = routingEngineService.getPath(source, inPort, dstDap.getNodeId(), - dstDap.getPortId(), U64.of(0)); //cookie = 0, i.e., default route + dstDap.getPortId()); Match m = createMatchFromPacket(sw, inPort, cntx); U64 cookie = AppCookie.makeCookie(FORWARDING_APP_ID, 0); diff --git a/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java b/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java index a4a0435f4af08955aa09a0cecff177d856448655..729994886e773bb41edcb75e9885ed8a41d39f45 100644 --- a/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java +++ b/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java @@ -452,15 +452,15 @@ public class LoadBalancer implements IFloodlightModule, (srcCluster != null) && (dstCluster != null)) { Route routeIn = - routingEngineService.getRoute(srcDap.getNodeId(), + routingEngineService.getPath(srcDap.getNodeId(), srcDap.getPortId(), dstDap.getNodeId(), - dstDap.getPortId(), U64.of(0)); + dstDap.getPortId()); Route routeOut = - routingEngineService.getRoute(dstDap.getNodeId(), + routingEngineService.getPath(dstDap.getNodeId(), dstDap.getPortId(), srcDap.getNodeId(), - srcDap.getPortId(), U64.of(0)); + srcDap.getPortId()); // use static flow entry pusher to push flow mod along in and out path // in: match src client (ip, port), rewrite dest from vip ip/port to member ip/port, forward diff --git a/src/main/java/net/floodlightcontroller/topology/web/RouteMetrics.java b/src/main/java/net/floodlightcontroller/topology/web/PathMetrics.java similarity index 100% rename from src/main/java/net/floodlightcontroller/topology/web/RouteMetrics.java rename to src/main/java/net/floodlightcontroller/topology/web/PathMetrics.java diff --git a/src/main/java/net/floodlightcontroller/topology/web/RouteResource.java b/src/main/java/net/floodlightcontroller/topology/web/PathResource.java similarity index 100% rename from src/main/java/net/floodlightcontroller/topology/web/RouteResource.java rename to src/main/java/net/floodlightcontroller/topology/web/PathResource.java diff --git a/src/main/java/net/floodlightcontroller/topology/web/RoutesResource.java b/src/main/java/net/floodlightcontroller/topology/web/PathsResource.java similarity index 100% rename from src/main/java/net/floodlightcontroller/topology/web/RoutesResource.java rename to src/main/java/net/floodlightcontroller/topology/web/PathsResource.java diff --git a/src/main/resources/floodlightdefault.properties b/src/main/resources/floodlightdefault.properties index 971e9a0d12d46acbeacec4d89a68a993b48ab438..be3f53952893d3cfbfd6f0621e1062bcce2be61c 100644 --- a/src/main/resources/floodlightdefault.properties +++ b/src/main/resources/floodlightdefault.properties @@ -38,7 +38,7 @@ net.floodlightcontroller.core.internal.FloodlightProvider.controllerId=1 net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager.latency-history-size=10 net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager.latency-update-threshold=0.5 net.floodlightcontroller.core.internal.FloodlightProvider.shutdownOnTransitionToStandby=true -net.floodlightcontroller.core.internal.OFSwitchManager.openFlowPort=6010 +net.floodlightcontroller.core.internal.OFSwitchManager.openFlowPort=6653 net.floodlightcontroller.core.internal.OFSwitchManager.openFlowAddresses=0.0.0.0 net.floodlightcontroller.core.internal.OFSwitchManager.workerThreads=16 net.floodlightcontroller.core.internal.OFSwitchManager.bossThreads=1 @@ -63,5 +63,5 @@ net.floodlightcontroller.restserver.RestApiServer.httpPort=11080 net.floodlightcontroller.restserver.RestApiServer.accessControlAllowAllOrigins=TRUE net.floodlightcontroller.statistics.StatisticsCollector.enable=FALSE net.floodlightcontroller.statistics.StatisticsCollector.collectionIntervalPortStatsSeconds=10 -net.floodlightcontroller.topology.TopologyManager.routeMetric=latency -net.floodlightcontroller.topology.TopologyManager.maximumRouteEntriesStored=10 \ No newline at end of file +net.floodlightcontroller.topology.TopologyManager.pathMetric=latency +net.floodlightcontroller.topology.TopologyManager.maxPathsToCompute=3 \ No newline at end of file diff --git a/src/test/java/net/floodlightcontroller/forwarding/ForwardingTest.java b/src/test/java/net/floodlightcontroller/forwarding/ForwardingTest.java index a3e5dab0b3add80a12ce3e48291b292c31e8bd45..7b32b47340e09fbb2e98157cbbf3e02ac087c9f6 100644 --- a/src/test/java/net/floodlightcontroller/forwarding/ForwardingTest.java +++ b/src/test/java/net/floodlightcontroller/forwarding/ForwardingTest.java @@ -445,7 +445,7 @@ public class ForwardingTest extends FloodlightTestCase { nptList.add(new NodePortTuple(DatapathId.of(2L), OFPort.of(1))); nptList.add(new NodePortTuple(DatapathId.of(2L), OFPort.of(3))); route.setPath(nptList); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(1), DatapathId.of(2L), OFPort.of(3), U64.ZERO)).andReturn(route).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(1), DatapathId.of(2L), OFPort.of(3))).andReturn(route).atLeastOnce(); // Expected Flow-mods Match match = packetIn.getMatch(); @@ -515,7 +515,7 @@ public class ForwardingTest extends FloodlightTestCase { nptList.add(new NodePortTuple(DatapathId.of(2L), OFPort.of(1))); nptList.add(new NodePortTuple(DatapathId.of(2L), OFPort.of(3))); route.setPath(nptList); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(1), DatapathId.of(2L), OFPort.of(3), U64.ZERO)).andReturn(route).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(1), DatapathId.of(2L), OFPort.of(3))).andReturn(route).atLeastOnce(); // Expected Flow-mods Match match = packetInIPv6.getMatch(); @@ -581,7 +581,7 @@ public class ForwardingTest extends FloodlightTestCase { Route route = new Route(DatapathId.of(1L), DatapathId.of(1L)); route.getPath().add(new NodePortTuple(DatapathId.of(1L), OFPort.of(1))); route.getPath().add(new NodePortTuple(DatapathId.of(1L), OFPort.of(3))); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3), U64.ZERO)).andReturn(route).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3))).andReturn(route).atLeastOnce(); // Expected Flow-mods Match match = packetIn.getMatch(); @@ -635,7 +635,7 @@ public class ForwardingTest extends FloodlightTestCase { Route route = new Route(DatapathId.of(1L), DatapathId.of(1L)); route.getPath().add(new NodePortTuple(DatapathId.of(1L), OFPort.of(1))); route.getPath().add(new NodePortTuple(DatapathId.of(1L), OFPort.of(3))); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3), U64.ZERO)).andReturn(route).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3))).andReturn(route).atLeastOnce(); // Expected Flow-mods Match match = packetInIPv6.getMatch(); @@ -694,7 +694,7 @@ public class ForwardingTest extends FloodlightTestCase { Route route = new Route(DatapathId.of(1L), DatapathId.of(1L)); route.getPath().add(new NodePortTuple(DatapathId.of(1L), OFPort.of(1))); route.getPath().add(new NodePortTuple(DatapathId.of(1L), OFPort.of(3))); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3), U64.ZERO)).andReturn(route).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3))).andReturn(route).atLeastOnce(); // Expected Flow-mods Match match = packetIn.getMatch(); diff --git a/src/test/java/net/floodlightcontroller/loadbalancer/LoadBalancerTest.java b/src/test/java/net/floodlightcontroller/loadbalancer/LoadBalancerTest.java index 9bd3c98fe87de373c3cd5b2ebfb42d32fa8be5f2..c84d7039d3c23d288f38fa1a222c673ed839ce02 100644 --- a/src/test/java/net/floodlightcontroller/loadbalancer/LoadBalancerTest.java +++ b/src/test/java/net/floodlightcontroller/loadbalancer/LoadBalancerTest.java @@ -51,7 +51,6 @@ import org.projectfloodlight.openflow.types.IpProtocol; import org.projectfloodlight.openflow.types.MacAddress; import org.projectfloodlight.openflow.types.OFBufferId; import org.projectfloodlight.openflow.types.OFPort; -import org.projectfloodlight.openflow.types.U64; import org.projectfloodlight.openflow.types.VlanVid; import org.projectfloodlight.openflow.protocol.OFPacketInReason; import org.projectfloodlight.openflow.protocol.action.OFAction; @@ -632,7 +631,7 @@ public class LoadBalancerTest extends FloodlightTestCase { nptList1.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(1))); nptList1.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(3))); route1.setPath(nptList1); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3), U64.of(0))).andReturn(route1).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3))).andReturn(route1).atLeastOnce(); // outbound #1 Route route2 = new Route(DatapathId.of(1L), DatapathId.of(1L)); @@ -640,7 +639,7 @@ public class LoadBalancerTest extends FloodlightTestCase { nptList2.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(3))); nptList2.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(1))); route2.setPath(nptList2); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(3), DatapathId.of(1L), OFPort.of(1), U64.of(0))).andReturn(route2).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(3), DatapathId.of(1L), OFPort.of(1))).andReturn(route2).atLeastOnce(); // inbound #2 Route route3 = new Route(DatapathId.of(1L), DatapathId.of(1L)); @@ -648,7 +647,7 @@ public class LoadBalancerTest extends FloodlightTestCase { nptList3.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(2))); nptList3.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(4))); route3.setPath(nptList3); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(2), DatapathId.of(1L), OFPort.of(4), U64.of(0))).andReturn(route3).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(2), DatapathId.of(1L), OFPort.of(4))).andReturn(route3).atLeastOnce(); // outbound #2 Route route4 = new Route(DatapathId.of(1L), DatapathId.of(1L)); @@ -656,7 +655,7 @@ public class LoadBalancerTest extends FloodlightTestCase { nptList4.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(4))); nptList4.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(2))); route4.setPath(nptList3); - expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(4), DatapathId.of(1L), OFPort.of(2), U64.of(0))).andReturn(route4).atLeastOnce(); + expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(4), DatapathId.of(1L), OFPort.of(2))).andReturn(route4).atLeastOnce(); replay(routingEngine);