Bug 1035 - Invalid mask in CommandProvider for uint64/byte conversion 74/7374/3
authorBrent Salisbury <brent.salisbury@gmail.com>
Sun, 25 May 2014 07:37:14 +0000 (03:37 -0400)
committerBrent Salisbury <brent.salisbury@gmail.com>
Tue, 10 Jun 2014 10:09:16 +0000 (06:09 -0400)
Patchset3: typo on last commit. This resolves both the mask
and goto table issues.

Patchset2: Added Michal's recommendation on the tunnel mask
and that looks good to go now.

After digging I saw the root of tunnelId failures was
actually due to the GotoTable Instructions function
was setting the GotoTable->2 which was also the same
table as the writeTable->2 transaction. Since the OF
spec requires forward progress at the end of each table
this was causing function f48() but also f6() to fail.

Change-Id: If975da5e872115495a7c1b38553a5e2bfe4a18ea
Signed-off-by: Brent Salisbury <brent.salisbury@gmail.com>
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java

index fd38c206f4e5b5092b6738ff4e0f0be0df928b81..d5a9708348eacf9ca28881ff6b7efa505b1d60db 100644 (file)
@@ -853,7 +853,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     private static InstructionsBuilder createGotoTableInstructions() {
 
         GoToTableBuilder aab = new GoToTableBuilder();
-        aab.setTableId((short) 2);
+        aab.setTableId((short) 5);
 
         InstructionBuilder ib = new InstructionBuilder();
         ib.setInstruction(new GoToTableCaseBuilder().setGoToTable(aab.build()).build());
@@ -3200,8 +3200,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         MatchBuilder match = new MatchBuilder();
         TunnelBuilder tunnel = new TunnelBuilder(); // tunnel id match
         tunnel.setTunnelId(BigInteger.valueOf(10668));
-        byte[] mask = new byte[] { (byte) -1, (byte) -1, (byte) -1, 0, 0, 0, (byte) 1, (byte) 1 };
-        tunnel.setTunnelMask(new BigInteger(mask));
+        byte[] mask = new byte[] {(byte) -1, (byte) -1, (byte) -1, 0, 0, 0, (byte) 1, (byte) 1 };
+        tunnel.setTunnelMask(new BigInteger(1, mask));
         match.setTunnel(tunnel.build());
 
         return match;