Bug 1072 -Add OF13 pre-req for PCP match in TestCommandProvider 73/7373/2
authorBrent Salisbury <brent.salisbury@gmail.com>
Sun, 25 May 2014 05:02:18 +0000 (01:02 -0400)
committerBrent Salisbury <brent.salisbury@gmail.com>
Tue, 10 Jun 2014 19:12:40 +0000 (15:12 -0400)
-OXM_OF_VLAN_PCP requires a VID match pre-req. The function
f80() results in a OFPBAC_MATCH_INCONSISTENT since it is
only matching on nw_dst and not a vid.

-Patching this seperate from Bug-1072/Patch-ba79f4f in
case there was a specific reason for this combination
that is outside the spec.

Field: OXM_OF_VLAN_PCP
Dependency: VLAN VID!=NONE
Reference: See table 10, section A.2.3.5 for validation

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

index fd38c206f4e5b5092b6738ff4e0f0be0df928b81..00cc719e005116950b05b6776ca4b9082b54865d 100644 (file)
@@ -648,7 +648,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
             break;
         case "f80":
             id += 80;
-            flow.setMatch(createMatch1().build());
+            flow.setMatch(createVlanMatch().build());
             flow.setInstructions(createAppyActionInstruction88().build());
             break;
         case "f81":
@@ -666,6 +666,11 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
             flow.setMatch(createTcpFlagMatch().build());
             flow.setInstructions(createDropInstructions().build());
             break;
+        case "f84":
+            id += 84;
+            flow.setMatch(createVlanMatch().build()); // match vlan=10,dl_vlan_pcp=3
+            flow.setInstructions(createAppyActionInstruction88().build()); // vlan_pcp=4
+            break;
         default:
             LOG.warn("flow type not understood: {}", flowType);
         }