Skip to content
Snippets Groups Projects
Commit 69aa2b25 authored by Mandeep Dhami's avatar Mandeep Dhami
Browse files

Changed forwarding to packet out directly to dst-interface instead of a table lookup

parent 9e3d5543
No related branches found
No related tags found
No related merge requests found
......@@ -265,12 +265,8 @@ public abstract class ForwardingBase implements IOFMessageListener, IDeviceManag
// set actions
List<OFAction> actions = new ArrayList<OFAction>();
if (sw.hasAttribute(IOFSwitch.PROP_SUPPORTS_OFPP_TABLE)) {
actions.add(new OFActionOutput(OFPort.OFPP_TABLE.getValue(), (short) 0));
}
else {
actions.add(new OFActionOutput(outport, (short) 0));
}
actions.add(new OFActionOutput(outport, (short) 0));
po.setActions(actions)
.setActionsLength((short) OFActionOutput.MINIMUM_LENGTH);
short poLength = (short)(po.getActionsLength() + OFPacketOut.MINIMUM_LENGTH);
......
......@@ -172,7 +172,7 @@ public class ForwardingTest extends FloodlightTestCase {
packetOut.setBufferId(this.packetIn.getBufferId())
.setInPort(this.packetIn.getInPort());
List<OFAction> poactions = new ArrayList<OFAction>();
poactions.add(new OFActionOutput(OFPort.OFPP_TABLE.getValue(), (short) 0));
poactions.add(new OFActionOutput((short) 3, (short) 0));
packetOut.setActions(poactions)
.setActionsLength((short) OFActionOutput.MINIMUM_LENGTH)
.setPacketData(testPacketSerialized)
......@@ -203,13 +203,13 @@ public class ForwardingTest extends FloodlightTestCase {
dstDevice.addAttachmentPoint(new SwitchPortTuple(sw2, (short)3), currentDate);
Route route = new Route(1L, 2L);
route.setPath(new ArrayList<Link>());
route.getPath().add(new Link((short)2, (short)1, 2L));
route.getPath().add(new Link((short)3, (short)1, 2L));
expect(routingEngine.getRoute(1L, 2L)).andReturn(route).atLeastOnce();
// Expected Flow-mods
OFMatch match = new OFMatch();
match.loadFromPacket(testPacketSerialized, (short) 1, 1L);
OFActionOutput action = new OFActionOutput((short)2, (short)0);
OFActionOutput action = new OFActionOutput((short)3, (short)0);
List<OFAction> actions = new ArrayList<OFAction>();
actions.add(action);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment