diff --git a/build.xml b/build.xml index 0f95be469b708e6b9763abb7c48783df3a302d98..a28b346507ad6483c2e26a58bb25d8bd515193e8 100644 --- a/build.xml +++ b/build.xml @@ -67,10 +67,10 @@ <include name="jython-2.5.2.jar"/> <include name="libthrift-0.7.0.jar"/> <include name="guava-13.0.1.jar" /> - <include name="commons-logging-1.1.1.jar" /> - <include name="httpclient-4.2.2.jar" /> - <include name="httpcore-4.2.2.jar" /> - <include name="json-simple-1.1.1.jar" /> + <include name="commons-logging-1.1.1.jar" /> + <include name="httpclient-4.2.2.jar" /> + <include name="httpcore-4.2.2.jar" /> + <include name="json-simple-1.1.1.jar" /> </patternset> <path id="classpath"> diff --git a/src/main/java/net/floodlightcontroller/core/internal/Controller.java b/src/main/java/net/floodlightcontroller/core/internal/Controller.java index 532ffb64744150ec6fbdcdfbb88590892e475e43..5cfe4f090dfabd831df60a5b173aa8bb21513b3e 100644 --- a/src/main/java/net/floodlightcontroller/core/internal/Controller.java +++ b/src/main/java/net/floodlightcontroller/core/internal/Controller.java @@ -868,7 +868,7 @@ public class Controller implements IFloodlightProviderService, } break; default: - log.warn("Unhandled VENDOR message; vendor id = {}", vendor); + shouldHandleMessage = true; break; } @@ -977,6 +977,8 @@ public class Controller implements IFloodlightProviderService, } else { logError(sw, error); + // allow registered listeners to receive error messages + shouldHandleMessage = true; } break; case STATS_REPLY: diff --git a/src/main/java/net/floodlightcontroller/flowcache/FlowReconcileManager.java b/src/main/java/net/floodlightcontroller/flowcache/FlowReconcileManager.java index 98f0f88804bebd8f39f3fac5044db84cc4a8dbed..773f94505c2d3ee5bf721527d2d85dfc4bd1a55c 100644 --- a/src/main/java/net/floodlightcontroller/flowcache/FlowReconcileManager.java +++ b/src/main/java/net/floodlightcontroller/flowcache/FlowReconcileManager.java @@ -10,6 +10,7 @@ import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; import net.floodlightcontroller.core.module.FloodlightModuleContext; import net.floodlightcontroller.core.module.FloodlightModuleException; @@ -64,7 +65,8 @@ public class FlowReconcileManager /** a minimum flow reconcile rate so that it won't stave */ protected static int MIN_FLOW_RECONCILE_PER_SECOND = 200; - /** once per second */ + /** start flow reconcile in 10ms after a new reconcile request is received. + * The max delay is 1 second. */ protected static int FLOW_RECONCILE_DELAY_MILLISEC = 10; protected Date lastReconcileTime; @@ -72,7 +74,7 @@ public class FlowReconcileManager protected static final String EnableConfigKey = "enable"; protected boolean flowReconcileEnabled; - public int flowReconcileThreadRunCount; + public AtomicInteger flowReconcileThreadRunCount; @Override public synchronized void addFlowReconcileListener( @@ -215,7 +217,7 @@ public class FlowReconcileManager flowReconcileEnabled = false; } - flowReconcileThreadRunCount = 0; + flowReconcileThreadRunCount = new AtomicInteger(0); lastReconcileTime = new Date(0); logger.debug("FlowReconcile is {}", flowReconcileEnabled); } @@ -311,9 +313,9 @@ public class FlowReconcileManager break; } } - flowReconcileThreadRunCount++; // Flush the flowCache counters. updateFlush(); + flowReconcileThreadRunCount.incrementAndGet(); } else { if (logger.isTraceEnabled()) { logger.trace("No flow to be reconciled."); diff --git a/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java b/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java index 287b406c7b67d0220d1b671d7e11cf0c0ceecda0..37de44e2626cc791fa42bcefe4d79e603b82fcc9 100644 --- a/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java +++ b/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java @@ -248,7 +248,7 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule { routingEngine.getRoute(srcDap.getSwitchDPID(), (short)srcDap.getPort(), dstDap.getSwitchDPID(), - (short)dstDap.getPort()); + (short)dstDap.getPort(), 0); //cookie = 0, i.e., default route if (route != null) { if (log.isTraceEnabled()) { log.trace("pushRoute match={} route={} " + diff --git a/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java b/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java index a9870db97a8502436bceb7ad523312b4bfeff248..2ff0dabfa59c7f6ae7d8e78ffe1c70304e8082c4 100644 --- a/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java +++ b/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java @@ -444,12 +444,12 @@ public class LoadBalancer implements IFloodlightModule, routingEngine.getRoute(srcDap.getSwitchDPID(), (short)srcDap.getPort(), dstDap.getSwitchDPID(), - (short)dstDap.getPort()); + (short)dstDap.getPort(), 0); Route routeOut = routingEngine.getRoute(dstDap.getSwitchDPID(), (short)dstDap.getPort(), srcDap.getSwitchDPID(), - (short)srcDap.getPort()); + (short)srcDap.getPort(), 0); // 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/packet/DHCP.java b/src/main/java/net/floodlightcontroller/packet/DHCP.java index f73d9c968019ab99ebfb4d5712c0e2a95a01e297..5ad215e57171846f1913f2e65ff3729e5bc274c9 100644 --- a/src/main/java/net/floodlightcontroller/packet/DHCP.java +++ b/src/main/java/net/floodlightcontroller/packet/DHCP.java @@ -361,10 +361,10 @@ public class DHCP extends BasePacket { // minimum size 240 including magic cookie, options generally padded to 300 int optionsLength = 0; for (DHCPOption option : this.options) { - if (option.getCode() == 0 || option.getCode() == 255) { + if (option.getCode() == 0 || option.getCode() == ((byte)255)) { optionsLength += 1; } else { - optionsLength += 2 + (int)(0xff & option.getLength()); + optionsLength += 2 + (0xff & option.getLength()); } } int optionsPadLength = 0; diff --git a/src/main/java/net/floodlightcontroller/routing/IRoutingService.java b/src/main/java/net/floodlightcontroller/routing/IRoutingService.java index fcd70ad8b132c2d3e899532862c5d65b2162f2b9..93882973ed77caa75586c3f2ae1696fc0a34c816 100644 --- a/src/main/java/net/floodlightcontroller/routing/IRoutingService.java +++ b/src/main/java/net/floodlightcontroller/routing/IRoutingService.java @@ -17,26 +17,31 @@ package net.floodlightcontroller.routing; +import java.util.ArrayList; + import net.floodlightcontroller.core.module.IFloodlightService; import net.floodlightcontroller.routing.Route; public interface IRoutingService extends IFloodlightService { /** Provides a route between src and dst that allows tunnels. */ - public Route getRoute(long src, long dst); + public Route getRoute(long src, long dst, long cookie); /** Provides a route between src and dst, with option to allow or * not allow tunnels in the path.*/ - public Route getRoute(long src, long dst, boolean tunnelEnabled); + public Route getRoute(long src, long dst, long cookie, boolean tunnelEnabled); public Route getRoute(long srcId, short srcPort, - long dstId, short dstPort); + long dstId, short dstPort, long cookie); public Route getRoute(long srcId, short srcPort, - long dstId, short dstPort, + long dstId, short dstPort, long cookie, boolean tunnelEnabled); + /** return all routes, if available */ + public ArrayList<Route> getRoutes(long longSrcDpid, long longDstDpid, boolean tunnelEnabled); + /** Check if a route exists between src and dst, including tunnel links * in the path. */ @@ -46,4 +51,5 @@ public interface IRoutingService extends IFloodlightService { * or not have tunnels as part of the path. */ public boolean routeExists(long src, long dst, boolean tunnelEnabled); + } \ No newline at end of file diff --git a/src/main/java/net/floodlightcontroller/routing/Link.java b/src/main/java/net/floodlightcontroller/routing/Link.java index 79585969aadaebd238f268943f4d3f50367eef43..b79b9a9bc942aeb425a046f42aa790b0d29f011d 100755 --- a/src/main/java/net/floodlightcontroller/routing/Link.java +++ b/src/main/java/net/floodlightcontroller/routing/Link.java @@ -24,7 +24,7 @@ import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.map.annotate.JsonSerialize; import org.openflow.util.HexString; -public class Link { +public class Link implements Comparable<Link> { private long src; private short srcPort; private long dst; @@ -118,5 +118,20 @@ public class Link { HexString.toHexString(this.dst) + "|" + (this.dstPort & 0xffff) ); } + + @Override + public int compareTo(Link a) { + // compare link based on natural ordering - src id, src port, dst id, dst port + if (this.getSrc() != a.getSrc()) + return (int) (this.getSrc() - a.getSrc()); + + if (this.getSrcPort() != a.getSrcPort()) + return (int) (this.getSrc() - a.getSrc()); + + if (this.getDst() != a.getDst()) + return (int) (this.getDst() - a.getDst()); + + return (int) (this.getDstPort() - a.getDstPort()); + } } diff --git a/src/main/java/net/floodlightcontroller/routing/Route.java b/src/main/java/net/floodlightcontroller/routing/Route.java index 211a924f7d5e912753882e88d5d54ae70009bca0..da00d50b7b82a3d3498b1523543a8558abbd579a 100755 --- a/src/main/java/net/floodlightcontroller/routing/Route.java +++ b/src/main/java/net/floodlightcontroller/routing/Route.java @@ -30,17 +30,20 @@ import net.floodlightcontroller.topology.NodePortTuple; public class Route implements Comparable<Route> { protected RouteId id; protected List<NodePortTuple> switchPorts; + protected int routeCount; public Route(RouteId id, List<NodePortTuple> switchPorts) { super(); this.id = id; this.switchPorts = switchPorts; + this.routeCount = 0; // useful if multipath routing available } public Route(Long src, Long dst) { super(); this.id = new RouteId(src, dst); this.switchPorts = new ArrayList<NodePortTuple>(); + this.routeCount = 0; } /** @@ -71,6 +74,20 @@ public class Route implements Comparable<Route> { this.switchPorts = switchPorts; } + /** + * @param routeCount routeCount set by (ECMP) buildRoute method + */ + public void setRouteCount(int routeCount) { + this.routeCount = routeCount; + } + + /** + * @return routeCount return routeCount set by (ECMP) buildRoute method + */ + public int getRouteCount() { + return routeCount; + } + @Override public int hashCode() { final int prime = 5791; diff --git a/src/main/java/net/floodlightcontroller/routing/RouteId.java b/src/main/java/net/floodlightcontroller/routing/RouteId.java index a55096163d3dfd11e89a80a9ef935e9f624d8e93..511db735969aa849d619783cdd88229d1922b27a 100755 --- a/src/main/java/net/floodlightcontroller/routing/RouteId.java +++ b/src/main/java/net/floodlightcontroller/routing/RouteId.java @@ -27,11 +27,20 @@ import org.openflow.util.HexString; public class RouteId implements Cloneable, Comparable<RouteId> { protected Long src; protected Long dst; + protected long cookie; public RouteId(Long src, Long dst) { super(); this.src = src; this.dst = dst; + this.cookie = 0; + } + + public RouteId(Long src, Long dst, long cookie) { + super(); + this.src = src; + this.dst = dst; + this.cookie = cookie; } public Long getSrc() { @@ -50,13 +59,24 @@ public class RouteId implements Cloneable, Comparable<RouteId> { this.dst = dst; } + public long getCookie() { + return cookie; + } + + public void setCookie(int cookie) { + this.cookie = cookie; + } + @Override public int hashCode() { final int prime = 2417; - int result = 1; + Long result = new Long(1); result = prime * result + ((dst == null) ? 0 : dst.hashCode()); result = prime * result + ((src == null) ? 0 : src.hashCode()); - return result; + result = prime * result + cookie; + // To cope with long cookie, use Long to compute hash then use Long's + // built-in hash to produce int hash code + return result.hashCode(); } @Override diff --git a/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java b/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java index 129f18bfb6ae6aadc3e5485f68beb5bb70928b4c..afb031343ffd655434bce74366cda119f0ac0d9d 100644 --- a/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java +++ b/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java @@ -421,7 +421,7 @@ public class TopologyInstance { return broadcastDomainPorts.contains(npt); } - class NodeDist implements Comparable<NodeDist> { + protected class NodeDist implements Comparable<NodeDist> { private Long node; public Long getNode() { return node; @@ -652,7 +652,7 @@ public class TopologyInstance { } protected Route getRoute(long srcId, short srcPort, - long dstId, short dstPort) { + long dstId, short dstPort, long cookie) { // Return null the route source and desitnation are the @@ -662,7 +662,7 @@ public class TopologyInstance { List<NodePortTuple> nptList; NodePortTuple npt; - Route r = getRoute(srcId, dstId); + Route r = getRoute(srcId, dstId, 0); if (r == null && srcId != dstId) return null; if (r != null) { @@ -680,7 +680,7 @@ public class TopologyInstance { return r; } - protected Route getRoute(long srcId, long dstId) { + protected Route getRoute(long srcId, long dstId, long cookie) { RouteId id = new RouteId(srcId, dstId); Route result = null; if (pathcache.containsKey(id)) { diff --git a/src/main/java/net/floodlightcontroller/topology/TopologyManager.java b/src/main/java/net/floodlightcontroller/topology/TopologyManager.java index 179db39b2518c4790fe883a390b71ccc5148784b..81a497cde444f0cab42a934a9c62eb61ed702291 100644 --- a/src/main/java/net/floodlightcontroller/topology/TopologyManager.java +++ b/src/main/java/net/floodlightcontroller/topology/TopologyManager.java @@ -526,28 +526,28 @@ public class TopologyManager implements // *************** @Override - public Route getRoute(long src, long dst) { - return getRoute(src, dst, true); + public Route getRoute(long src, long dst, long cookie) { + return getRoute(src, dst, cookie, true); } @Override - public Route getRoute(long src, long dst, boolean tunnelEnabled) { + public Route getRoute(long src, long dst, long cookie, boolean tunnelEnabled) { TopologyInstance ti = getCurrentInstance(tunnelEnabled); - return ti.getRoute(src, dst); + return ti.getRoute(src, dst, cookie); } @Override - public Route getRoute(long src, short srcPort, long dst, short dstPort) { - return getRoute(src, srcPort, dst, dstPort, true); + public Route getRoute(long src, short srcPort, long dst, short dstPort, long cookie) { + return getRoute(src, srcPort, dst, dstPort, cookie, true); } @Override - public Route getRoute(long src, short srcPort, long dst, short dstPort, + public Route getRoute(long src, short srcPort, long dst, short dstPort, long cookie, boolean tunnelEnabled) { TopologyInstance ti = getCurrentInstance(tunnelEnabled); - return ti.getRoute(src, srcPort, dst, dstPort); + return ti.getRoute(src, srcPort, dst, dstPort, cookie); } - + @Override public boolean routeExists(long src, long dst) { return routeExists(src, dst, true); @@ -1281,4 +1281,15 @@ public class TopologyManager implements ports.addAll(ofpList); return ports; } + + @Override + public ArrayList<Route> getRoutes(long srcDpid, long dstDpid, + boolean tunnelEnabled) { + // Floodlight supports single path routing now + + // return single path now + ArrayList<Route> result=new ArrayList<Route>(); + result.add(getRoute(srcDpid, dstDpid, 0, tunnelEnabled)); + return result; + } } diff --git a/src/main/java/net/floodlightcontroller/topology/web/RouteResource.java b/src/main/java/net/floodlightcontroller/topology/web/RouteResource.java index 70e406fcc25946a4c1275c2e351c6c4513838932..1cbfa129de00f4168c96c4c6fd9da714cecb7942 100644 --- a/src/main/java/net/floodlightcontroller/topology/web/RouteResource.java +++ b/src/main/java/net/floodlightcontroller/topology/web/RouteResource.java @@ -34,10 +34,10 @@ public class RouteResource extends ServerResource { long longDstDpid = HexString.toLong(dstDpid); short shortDstPort = Short.parseShort(dstPort); - Route result = routing.getRoute(longSrcDpid, shortSrcPort, longDstDpid, shortDstPort); + Route result = routing.getRoute(longSrcDpid, shortSrcPort, longDstDpid, shortDstPort, 0); if (result!=null) { - return routing.getRoute(longSrcDpid, shortSrcPort, longDstDpid, shortDstPort).getPath(); + return routing.getRoute(longSrcDpid, shortSrcPort, longDstDpid, shortDstPort, 0).getPath(); } else { log.debug("ERROR! no route found"); diff --git a/src/test/java/net/floodlightcontroller/core/internal/ControllerTest.java b/src/test/java/net/floodlightcontroller/core/internal/ControllerTest.java index 6879f3f13a93ced3a2b08e41dba11d6fd84edf11..f9169983ade75e6bbb4b8137f77adc63608869c7 100644 --- a/src/test/java/net/floodlightcontroller/core/internal/ControllerTest.java +++ b/src/test/java/net/floodlightcontroller/core/internal/ControllerTest.java @@ -50,6 +50,7 @@ import net.floodlightcontroller.core.internal.RoleChanger.PendingRoleRequestEntr import net.floodlightcontroller.core.module.FloodlightModuleContext; import net.floodlightcontroller.core.test.MockFloodlightProvider; import net.floodlightcontroller.core.test.MockThreadPoolService; +import net.floodlightcontroller.core.util.ListenerDispatcher; import net.floodlightcontroller.counter.CounterStore; import net.floodlightcontroller.counter.ICounterStoreService; import net.floodlightcontroller.packet.ARP; @@ -1073,11 +1074,41 @@ public class ControllerTest extends FloodlightTestCase @Test public void testVendorMessageUnknown() throws Exception { // Check behavior with an unknown vendor id + // Ensure that vendor message listeners get called, even for Vendors + // unknown to floodlight. It is the responsibility of the listener to + // discard unknown vendors. OFChannelState state = new OFChannelState(); state.hsState = HandshakeState.READY; Controller.OFChannelHandler chdlr = controller.new OFChannelHandler(state); OFVendor msg = new OFVendor(); msg.setVendor(0); + IOFSwitch sw = createMock(IOFSwitch.class); + chdlr.sw = sw; + controller.activeSwitches.put(1L, sw); + + // prepare the Vendor Message Listener expectations + ListenerDispatcher<OFType, IOFMessageListener> ld = + new ListenerDispatcher<OFType, IOFMessageListener>(); + IOFMessageListener ml = createMock(IOFMessageListener.class); + expect(ml.getName()).andReturn("Dummy").anyTimes(); + expect(ml.isCallbackOrderingPrereq((OFType)anyObject(), + (String)anyObject())).andReturn(false).anyTimes(); + expect(ml.isCallbackOrderingPostreq((OFType)anyObject(), + (String)anyObject())).andReturn(false).anyTimes(); + expect(ml.receive(eq(sw), eq(msg), isA(FloodlightContext.class))). + andReturn(Command.CONTINUE).once(); + controller.messageListeners.put(OFType.VENDOR, ld); + + // prepare the switch and lock expectations + Lock lock = createNiceMock(Lock.class); + expect(sw.getListenerReadLock()).andReturn(lock).anyTimes(); + expect(sw.isConnected()).andReturn(true).anyTimes(); + expect(sw.getHARole()).andReturn(Role.MASTER).anyTimes(); + expect(sw.getId()).andReturn(1L).anyTimes(); + + // test + replay(chdlr.sw, lock, ml); + ld.addListener(OFType.VENDOR, ml); chdlr.processOFMessage(msg); } diff --git a/src/test/java/net/floodlightcontroller/flowcache/FlowReconcileMgrTest.java b/src/test/java/net/floodlightcontroller/flowcache/FlowReconcileMgrTest.java index 0dcbb357e3c5fa81483f6663422d3654a224a0e5..accac8e4ceb90d0eeb80b2331efdff0fdde1c8f8 100644 --- a/src/test/java/net/floodlightcontroller/flowcache/FlowReconcileMgrTest.java +++ b/src/test/java/net/floodlightcontroller/flowcache/FlowReconcileMgrTest.java @@ -117,7 +117,7 @@ public class FlowReconcileMgrTest extends FloodlightTestCase { flowReconcileMgr.addFlowReconcileListener(r3); int pre_flowReconcileThreadRunCount = - flowReconcileMgr.flowReconcileThreadRunCount; + flowReconcileMgr.flowReconcileThreadRunCount.get(); Date startTime = new Date(); OFMatchReconcile ofmRcIn = new OFMatchReconcile(); try { @@ -147,11 +147,11 @@ public class FlowReconcileMgrTest extends FloodlightTestCase { }).anyTimes(); pre_flowReconcileThreadRunCount = - flowReconcileMgr.flowReconcileThreadRunCount; + flowReconcileMgr.flowReconcileThreadRunCount.get(); startTime = new Date(); replay(r1, r2, r3); flowReconcileMgr.reconcileFlow(ofmRcIn); - while (flowReconcileMgr.flowReconcileThreadRunCount <= + while (flowReconcileMgr.flowReconcileThreadRunCount.get() <= pre_flowReconcileThreadRunCount) { Thread.sleep(10); Date currTime = new Date(); @@ -174,12 +174,12 @@ public class FlowReconcileMgrTest extends FloodlightTestCase { }).anyTimes(); pre_flowReconcileThreadRunCount = - flowReconcileMgr.flowReconcileThreadRunCount; + flowReconcileMgr.flowReconcileThreadRunCount.get(); startTime = new Date(); replay(r1, r2, r3); flowReconcileMgr.reconcileFlow(ofmRcIn); - while (flowReconcileMgr.flowReconcileThreadRunCount <= + while (flowReconcileMgr.flowReconcileThreadRunCount.get() <= pre_flowReconcileThreadRunCount) { Thread.sleep(10); Date currTime = new Date(); @@ -197,12 +197,12 @@ public class FlowReconcileMgrTest extends FloodlightTestCase { .andReturn(Command.STOP).times(1); pre_flowReconcileThreadRunCount = - flowReconcileMgr.flowReconcileThreadRunCount; + flowReconcileMgr.flowReconcileThreadRunCount.get(); startTime = new Date(); replay(r1, r2, r3); flowReconcileMgr.reconcileFlow(ofmRcIn); - while (flowReconcileMgr.flowReconcileThreadRunCount <= + while (flowReconcileMgr.flowReconcileThreadRunCount.get() <= pre_flowReconcileThreadRunCount) { Thread.sleep(10); Date currTime = new Date(); @@ -227,11 +227,11 @@ public class FlowReconcileMgrTest extends FloodlightTestCase { .andReturn(Command.STOP).times(1); pre_flowReconcileThreadRunCount = - flowReconcileMgr.flowReconcileThreadRunCount; + flowReconcileMgr.flowReconcileThreadRunCount.get(); startTime = new Date(); replay(r1, r2, r3); flowReconcileMgr.reconcileFlow(ofmRcIn); - while (flowReconcileMgr.flowReconcileThreadRunCount <= + while (flowReconcileMgr.flowReconcileThreadRunCount.get() <= pre_flowReconcileThreadRunCount) { Thread.sleep(10); Date currTime = new Date(); diff --git a/src/test/java/net/floodlightcontroller/forwarding/ForwardingTest.java b/src/test/java/net/floodlightcontroller/forwarding/ForwardingTest.java index 7a37589ec3d3d4035df894e425db5968cc8e0b5c..2d491919a846caf9f47b1aaf9c216292f6f36110 100644 --- a/src/test/java/net/floodlightcontroller/forwarding/ForwardingTest.java +++ b/src/test/java/net/floodlightcontroller/forwarding/ForwardingTest.java @@ -337,7 +337,7 @@ public class ForwardingTest extends FloodlightTestCase { nptList.add(new NodePortTuple(2L, (short)1)); nptList.add(new NodePortTuple(2L, (short)3)); route.setPath(nptList); - expect(routingEngine.getRoute(1L, (short)1, 2L, (short)3)).andReturn(route).atLeastOnce(); + expect(routingEngine.getRoute(1L, (short)1, 2L, (short)3, 0)).andReturn(route).atLeastOnce(); // Expected Flow-mods OFMatch match = new OFMatch(); @@ -400,7 +400,7 @@ public class ForwardingTest extends FloodlightTestCase { Route route = new Route(1L, 1L); route.getPath().add(new NodePortTuple(1L, (short)1)); route.getPath().add(new NodePortTuple(1L, (short)3)); - expect(routingEngine.getRoute(1L, (short)1, 1L, (short)3)).andReturn(route).atLeastOnce(); + expect(routingEngine.getRoute(1L, (short)1, 1L, (short)3, 0)).andReturn(route).atLeastOnce(); // Expected Flow-mods OFMatch match = new OFMatch(); @@ -451,7 +451,7 @@ public class ForwardingTest extends FloodlightTestCase { Route route = new Route(1L, 1L); route.getPath().add(new NodePortTuple(1L, (short)1)); route.getPath().add(new NodePortTuple(1L, (short)3)); - expect(routingEngine.getRoute(1L, (short)1, 1L, (short)3)).andReturn(route).atLeastOnce(); + expect(routingEngine.getRoute(1L, (short)1, 1L, (short)3, 0)).andReturn(route).atLeastOnce(); // Expected Flow-mods OFMatch match = new OFMatch();