Fix PiMatchFieldId unmatch in p4tutorial pipeline interpreter
Change-Id: Iec655d350d525024f579f54e8a1beb7030164be1
diff --git a/apps/p4-tutorial/pipeconf/src/main/java/org/onosproject/p4tutorial/pipeconf/PipelineInterpreterImpl.java b/apps/p4-tutorial/pipeconf/src/main/java/org/onosproject/p4tutorial/pipeconf/PipelineInterpreterImpl.java
index 9147de3..c90ea35 100644
--- a/apps/p4-tutorial/pipeconf/src/main/java/org/onosproject/p4tutorial/pipeconf/PipelineInterpreterImpl.java
+++ b/apps/p4-tutorial/pipeconf/src/main/java/org/onosproject/p4tutorial/pipeconf/PipelineInterpreterImpl.java
@@ -65,6 +65,8 @@
*/
public final class PipelineInterpreterImpl extends AbstractHandlerBehaviour implements PiPipelineInterpreter {
+ private static final String DOT = ".";
+ private static final String HDR = "hdr";
private static final String TABLE0 = "table0";
private static final String IP_PROTO_FILTER_TABLE = "ip_proto_filter_table";
private static final String SEND_TO_CPU = "send_to_cpu";
@@ -77,10 +79,10 @@
private static final String STANDARD_METADATA = "standard_metadata";
private static final int PORT_FIELD_BITWIDTH = 9;
- private static final PiMatchFieldId INGRESS_PORT_ID = PiMatchFieldId.of(STANDARD_METADATA + ".ingress_port");
- private static final PiMatchFieldId ETH_DST_ID = PiMatchFieldId.of(ETHERNET + ".dst_addr");
- private static final PiMatchFieldId ETH_SRC_ID = PiMatchFieldId.of(ETHERNET + ".src_addr");
- private static final PiMatchFieldId ETH_TYPE_ID = PiMatchFieldId.of(ETHERNET + ".ether_type");
+ private static final PiMatchFieldId INGRESS_PORT_ID = PiMatchFieldId.of(STANDARD_METADATA + DOT + "ingress_port");
+ private static final PiMatchFieldId ETH_DST_ID = PiMatchFieldId.of(HDR + DOT + ETHERNET + DOT + "dst_addr");
+ private static final PiMatchFieldId ETH_SRC_ID = PiMatchFieldId.of(HDR + DOT + ETHERNET + DOT + "src_addr");
+ private static final PiMatchFieldId ETH_TYPE_ID = PiMatchFieldId.of(HDR + DOT + ETHERNET + DOT + "ether_type");
private static final PiTableId TABLE0_ID = PiTableId.of(TABLE0);
private static final PiTableId IP_PROTO_FILTER_TABLE_ID = PiTableId.of(IP_PROTO_FILTER_TABLE);