P4runtime test utility app

Used for quick testing of P4Runtime with real devices.
To be removed before release.

Change-Id: Ieca17493e4b012ef748709014b62ebe54ba76dce
diff --git a/apps/p4runtime-test/BUCK b/apps/p4runtime-test/BUCK
new file mode 100644
index 0000000..842fe2d
--- /dev/null
+++ b/apps/p4runtime-test/BUCK
@@ -0,0 +1,43 @@
+GRPC_VER = '1.3.0'
+PROTOBUF_VER = '3.0.2'
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/grpc/api:onos-protocols-grpc-api',
+    '//protocols/grpc/ctl:onos-protocols-grpc-ctl',
+    '//protocols/p4runtime/api:onos-protocols-p4runtime-api',
+    '//protocols/p4runtime/ctl:onos-protocols-p4runtime-ctl',
+    '//protocols/p4runtime/proto:onos-protocols-p4runtime-proto',
+    '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
+    '//lib:grpc-stub-' + GRPC_VER,
+    '//lib:protobuf-java-' + PROTOBUF_VER,
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+    '//lib:slf4j-jdk14',
+    '//incubator/bmv2/model:onos-incubator-bmv2-model',
+    # gRPC dependencies
+    '//lib:grpc-protobuf-' + GRPC_VER,
+    '//lib:grpc-protobuf-lite-' + GRPC_VER,
+    '//lib:grpc-netty-' + GRPC_VER,
+    '//lib:grpc-auth-' + GRPC_VER,
+    '//lib:google-instrumentation-0.3.0',
+    # Lazily adding all netty-related packages.
+    # Some of them might not be necessary.
+    '//lib:netty',
+    '//lib:netty-buffer',
+    '//lib:netty-codec',
+    '//lib:netty-codec-http',
+    '//lib:netty-codec-http2',
+    '//lib:netty-common',
+    '//lib:netty-handler',
+    '//lib:netty-transport',
+    '//lib:netty-transport-native-epoll',
+    '//lib:netty-resolver',
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+    test_deps = TEST_DEPS,
+)
\ No newline at end of file
diff --git a/apps/p4runtime-test/src/test/java/org/onosproject/p4runtime/test/P4RuntimeTest.java b/apps/p4runtime-test/src/test/java/org/onosproject/p4runtime/test/P4RuntimeTest.java
new file mode 100644
index 0000000..0f8d238
--- /dev/null
+++ b/apps/p4runtime-test/src/test/java/org/onosproject/p4runtime/test/P4RuntimeTest.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.p4runtime.test;
+
+import io.grpc.ManagedChannelBuilder;
+import io.grpc.netty.NettyChannelBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onosproject.bmv2.model.Bmv2PipelineModelParser;
+import org.onosproject.grpc.ctl.GrpcControllerImpl;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.pi.model.DefaultPiPipeconf;
+import org.onosproject.net.pi.model.PiPipeconf;
+import org.onosproject.net.pi.model.PiPipeconfId;
+import org.onosproject.net.pi.model.PiPipelineInterpreter;
+import org.onosproject.p4runtime.api.P4RuntimeClient;
+import org.onosproject.p4runtime.ctl.P4RuntimeControllerImpl;
+
+import java.net.URL;
+import java.util.concurrent.ExecutionException;
+
+import static org.onosproject.net.pi.model.PiPipeconf.ExtensionType.BMV2_JSON;
+import static org.onosproject.net.pi.model.PiPipeconf.ExtensionType.P4_INFO_TEXT;
+
+/**
+ * Class used for quick testing of P4Runtime with real devices. To be removed before release.
+ */
+public class P4RuntimeTest {
+
+    private final URL p4InfoUrl = this.getClass().getResource("/default.p4info");
+    private final URL jsonUrl = this.getClass().getResource("/default.json");
+
+    private final PiPipeconf bmv2DefaultPipeconf = DefaultPiPipeconf.builder()
+            .withId(new PiPipeconfId("mock"))
+            .withPipelineModel(Bmv2PipelineModelParser.parse(jsonUrl))
+//            .addBehaviour(PiPipelineInterpreter.class, Bmv2DefaultInterpreter.class)
+            .addExtension(P4_INFO_TEXT, p4InfoUrl)
+            .addExtension(BMV2_JSON, jsonUrl)
+            .build();
+
+    @Test
+    @Ignore
+    public void testRuntime() throws ExecutionException, InterruptedException,
+            PiPipelineInterpreter.PiInterpreterException, IllegalAccessException, InstantiationException {
+
+        // FIXME: remove me.
+
+        P4RuntimeControllerImpl controller = new P4RuntimeControllerImpl();
+        GrpcControllerImpl grpcController = new GrpcControllerImpl();
+        controller.grpcController = grpcController;
+        GrpcControllerImpl.enableMessageLog = true;
+        grpcController.activate();
+        DeviceId deviceId = DeviceId.deviceId("dummy:1");
+
+        ManagedChannelBuilder channelBuilder = NettyChannelBuilder
+                .forAddress("192.168.56.102", 59975)
+                .usePlaintext(true);
+
+        assert (controller.createClient(deviceId, 1, channelBuilder));
+
+        P4RuntimeClient client = controller.getClient(deviceId);
+
+        assert (client.setPipelineConfig(bmv2DefaultPipeconf, PiPipeconf.ExtensionType.BMV2_JSON).get());
+
+        assert (client.initStreamChannel().get());
+
+//        log.info("++++++++++++++++++++++++++++");
+//
+//        PiPipelineInterpreter interpreter = (PiPipelineInterpreter) defaultPipeconf
+//                .implementation(PiPipelineInterpreter.class)
+//                .orElse(null)
+//                .newInstance();
+//
+//        TrafficTreatment t = DefaultTrafficTreatment.builder()
+//                .setOutput(PortNumber.portNumber(830L)).build();
+//        byte[] payload = new byte[1000];
+////        payload[0] = 1;
+//        Arrays.fill( payload, (byte) 1 );
+//
+//        OutboundPacket packet = new DefaultOutboundPacket(
+//                deviceId, t, ByteBuffer.wrap(payload));
+//
+//
+//        Collection<PiPacketOperation> operations = interpreter.mapOutboundPacket(packet,defaultPipeconf);
+//        log.info("{}", operations);
+//        operations.forEach(piPacketOperation -> {
+//            try {
+//                client.packetOut(piPacketOperation, defaultPipeconf).get();
+//            } catch (InterruptedException | ExecutionException e) {
+//               log.error("{}",e);
+//            }
+//        });
+
+//        assert(client.dumpTable(PiTableId.of(TABLE_0), defaultPipeconf).get().size() == 0);
+
+//        assert(client.writeTableEntries(Lists.newArrayList(piTableEntry), INSERT, defaultPipeconf).get());
+
+//        assert(client.dumpTable(PiTableId.of(TABLE_0), defaultPipeconf).get().size() == 1);
+    }
+}
diff --git a/apps/p4runtime-test/src/test/resources/default.json b/apps/p4runtime-test/src/test/resources/default.json
new file mode 100644
index 0000000..3a46dcc
--- /dev/null
+++ b/apps/p4runtime-test/src/test/resources/default.json
@@ -0,0 +1,2697 @@
+{
+  "program" : "default.p4",
+  "__meta__" : {
+    "version" : [2, 7],
+    "compiler" : "https://github.com/p4lang/p4c"
+  },
+  "header_types" : [
+    {
+      "name" : "scalars_0",
+      "id" : 0,
+      "fields" : [
+        ["tmp", 32, false],
+        ["tmp_0", 32, false]
+      ]
+    },
+    {
+      "name" : "standard_metadata",
+      "id" : 1,
+      "fields" : [
+        ["ingress_port", 9, false],
+        ["egress_spec", 9, false],
+        ["egress_port", 9, false],
+        ["clone_spec", 32, false],
+        ["instance_type", 32, false],
+        ["drop", 1, false],
+        ["recirculate_port", 16, false],
+        ["packet_length", 32, false],
+        ["enq_timestamp", 32, false],
+        ["enq_qdepth", 19, false],
+        ["deq_timedelta", 32, false],
+        ["deq_qdepth", 19, false],
+        ["ingress_global_timestamp", 48, false],
+        ["lf_field_list", 32, false],
+        ["mcast_grp", 16, false],
+        ["resubmit_flag", 1, false],
+        ["egress_rid", 16, false],
+        ["_padding", 5, false]
+      ]
+    },
+    {
+      "name" : "ethernet_t",
+      "id" : 2,
+      "fields" : [
+        ["dstAddr", 48, false],
+        ["srcAddr", 48, false],
+        ["etherType", 16, false]
+      ]
+    },
+    {
+      "name" : "ipv4_t",
+      "id" : 3,
+      "fields" : [
+        ["version", 4, false],
+        ["ihl", 4, false],
+        ["diffserv", 8, false],
+        ["totalLen", 16, false],
+        ["identification", 16, false],
+        ["flags", 3, false],
+        ["fragOffset", 13, false],
+        ["ttl", 8, false],
+        ["protocol", 8, false],
+        ["hdrChecksum", 16, false],
+        ["srcAddr", 32, false],
+        ["dstAddr", 32, false]
+      ]
+    },
+    {
+      "name" : "tcp_t",
+      "id" : 4,
+      "fields" : [
+        ["srcPort", 16, false],
+        ["dstPort", 16, false],
+        ["seqNo", 32, false],
+        ["ackNo", 32, false],
+        ["dataOffset", 4, false],
+        ["res", 3, false],
+        ["ecn", 3, false],
+        ["ctrl", 6, false],
+        ["window", 16, false],
+        ["checksum", 16, false],
+        ["urgentPtr", 16, false]
+      ]
+    },
+    {
+      "name" : "udp_t",
+      "id" : 5,
+      "fields" : [
+        ["srcPort", 16, false],
+        ["dstPort", 16, false],
+        ["length_", 16, false],
+        ["checksum", 16, false]
+      ]
+    },
+    {
+      "name" : "ecmp_metadata_t",
+      "id" : 6,
+      "fields" : [
+        ["groupId", 16, false],
+        ["selector", 16, false]
+      ]
+    },
+    {
+      "name" : "wcmp_meta_t",
+      "id" : 7,
+      "fields" : [
+        ["groupId", 16, false],
+        ["numBits", 8, false],
+        ["selector", 64, false]
+      ]
+    },
+    {
+      "name" : "intrinsic_metadata_t",
+      "id" : 8,
+      "fields" : [
+        ["ingress_global_timestamp", 32, false],
+        ["lf_field_list", 32, false],
+        ["mcast_grp", 16, false],
+        ["egress_rid", 16, false]
+      ]
+    }
+  ],
+  "headers" : [
+    {
+      "name" : "standard_metadata_3",
+      "id" : 0,
+      "header_type" : "standard_metadata",
+      "metadata" : true,
+      "pi_omit" : true
+    },
+    {
+      "name" : "standard_metadata_4",
+      "id" : 1,
+      "header_type" : "standard_metadata",
+      "metadata" : true,
+      "pi_omit" : true
+    },
+    {
+      "name" : "standard_metadata_5",
+      "id" : 2,
+      "header_type" : "standard_metadata",
+      "metadata" : true,
+      "pi_omit" : true
+    },
+    {
+      "name" : "scalars",
+      "id" : 3,
+      "header_type" : "scalars_0",
+      "metadata" : true,
+      "pi_omit" : true
+    },
+    {
+      "name" : "standard_metadata",
+      "id" : 4,
+      "header_type" : "standard_metadata",
+      "metadata" : true,
+      "pi_omit" : true
+    },
+    {
+      "name" : "ethernet",
+      "id" : 5,
+      "header_type" : "ethernet_t",
+      "metadata" : false,
+      "pi_omit" : true
+    },
+    {
+      "name" : "ipv4",
+      "id" : 6,
+      "header_type" : "ipv4_t",
+      "metadata" : false,
+      "pi_omit" : true
+    },
+    {
+      "name" : "tcp",
+      "id" : 7,
+      "header_type" : "tcp_t",
+      "metadata" : false,
+      "pi_omit" : true
+    },
+    {
+      "name" : "udp",
+      "id" : 8,
+      "header_type" : "udp_t",
+      "metadata" : false,
+      "pi_omit" : true
+    },
+    {
+      "name" : "ecmp_metadata",
+      "id" : 9,
+      "header_type" : "ecmp_metadata_t",
+      "metadata" : true,
+      "pi_omit" : true
+    },
+    {
+      "name" : "wcmp_meta",
+      "id" : 10,
+      "header_type" : "wcmp_meta_t",
+      "metadata" : true,
+      "pi_omit" : true
+    },
+    {
+      "name" : "intrinsic_metadata",
+      "id" : 11,
+      "header_type" : "intrinsic_metadata_t",
+      "metadata" : true,
+      "pi_omit" : true
+    }
+  ],
+  "header_stacks" : [],
+  "header_union_types" : [],
+  "header_unions" : [],
+  "header_union_stacks" : [],
+  "field_lists" : [],
+  "errors" : [
+    ["NoError", 1],
+    ["PacketTooShort", 2],
+    ["NoMatch", 3],
+    ["StackOutOfBounds", 4],
+    ["HeaderTooShort", 5],
+    ["ParserTimeout", 6]
+  ],
+  "enums" : [],
+  "parsers" : [
+    {
+      "name" : "parser",
+      "id" : 0,
+      "init_state" : "start",
+      "parse_states" : [
+        {
+          "name" : "parse_ipv4",
+          "id" : 0,
+          "parser_ops" : [
+            {
+              "parameters" : [
+                {
+                  "type" : "regular",
+                  "value" : "ipv4"
+                }
+              ],
+              "op" : "extract"
+            }
+          ],
+          "transitions" : [
+            {
+              "value" : "0x06",
+              "mask" : null,
+              "next_state" : "parse_tcp"
+            },
+            {
+              "value" : "0x11",
+              "mask" : null,
+              "next_state" : "parse_udp"
+            },
+            {
+              "value" : "default",
+              "mask" : null,
+              "next_state" : null
+            }
+          ],
+          "transition_key" : [
+            {
+              "type" : "field",
+              "value" : ["ipv4", "protocol"]
+            }
+          ]
+        },
+        {
+          "name" : "parse_tcp",
+          "id" : 1,
+          "parser_ops" : [
+            {
+              "parameters" : [
+                {
+                  "type" : "regular",
+                  "value" : "tcp"
+                }
+              ],
+              "op" : "extract"
+            }
+          ],
+          "transitions" : [
+            {
+              "value" : "default",
+              "mask" : null,
+              "next_state" : null
+            }
+          ],
+          "transition_key" : []
+        },
+        {
+          "name" : "parse_udp",
+          "id" : 2,
+          "parser_ops" : [
+            {
+              "parameters" : [
+                {
+                  "type" : "regular",
+                  "value" : "udp"
+                }
+              ],
+              "op" : "extract"
+            }
+          ],
+          "transitions" : [
+            {
+              "value" : "default",
+              "mask" : null,
+              "next_state" : null
+            }
+          ],
+          "transition_key" : []
+        },
+        {
+          "name" : "start",
+          "id" : 3,
+          "parser_ops" : [
+            {
+              "parameters" : [
+                {
+                  "type" : "regular",
+                  "value" : "ethernet"
+                }
+              ],
+              "op" : "extract"
+            }
+          ],
+          "transitions" : [
+            {
+              "value" : "0x0800",
+              "mask" : null,
+              "next_state" : "parse_ipv4"
+            },
+            {
+              "value" : "default",
+              "mask" : null,
+              "next_state" : null
+            }
+          ],
+          "transition_key" : [
+            {
+              "type" : "field",
+              "value" : ["ethernet", "etherType"]
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "deparsers" : [
+    {
+      "name" : "deparser",
+      "id" : 0,
+      "source_info" : {
+        "filename" : "include/parsers.p4",
+        "line" : 43,
+        "column" : 8,
+        "source_fragment" : "DeparserImpl"
+      },
+      "order" : ["ethernet", "ipv4", "udp", "tcp"]
+    }
+  ],
+  "meter_arrays" : [],
+  "counter_arrays" : [
+    {
+      "name" : "table0_counter",
+      "id" : 0,
+      "is_direct" : true,
+      "binding" : "table0"
+    },
+    {
+      "name" : "port_counters_control.egress_port_counter",
+      "id" : 1,
+      "source_info" : {
+        "filename" : "include/port_counters.p4",
+        "line" : 6,
+        "column" : 38,
+        "source_fragment" : "egress_port_counter"
+      },
+      "size" : 254,
+      "is_direct" : false
+    },
+    {
+      "name" : "port_counters_control.ingress_port_counter",
+      "id" : 2,
+      "source_info" : {
+        "filename" : "include/port_counters.p4",
+        "line" : 7,
+        "column" : 38,
+        "source_fragment" : "ingress_port_counter"
+      },
+      "size" : 254,
+      "is_direct" : false
+    }
+  ],
+  "register_arrays" : [],
+  "calculations" : [],
+  "learn_lists" : [],
+  "actions" : [
+    {
+      "name" : "set_egress_port",
+      "id" : 0,
+      "runtime_data" : [
+        {
+          "name" : "port",
+          "bitwidth" : 9
+        }
+      ],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "ingress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "egress_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "egress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "clone_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "clone_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "instance_type"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "instance_type"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "drop"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "drop"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "recirculate_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "recirculate_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "packet_length"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "packet_length"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "enq_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "enq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "deq_timedelta"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_timedelta"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "deq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "ingress_global_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_global_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "lf_field_list"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "lf_field_list"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "mcast_grp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "mcast_grp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "resubmit_flag"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "resubmit_flag"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "egress_rid"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_rid"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "egress_spec"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 0
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 9,
+            "column" : 4,
+            "source_fragment" : "standard_metadata.egress_spec = port"
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "ingress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "egress_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "egress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "clone_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "clone_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "instance_type"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "instance_type"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "drop"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "drop"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "recirculate_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "recirculate_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "packet_length"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "packet_length"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "enq_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "enq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_timedelta"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "deq_timedelta"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "deq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_global_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "ingress_global_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "lf_field_list"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "lf_field_list"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "mcast_grp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "mcast_grp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "resubmit_flag"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "resubmit_flag"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_rid"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_3", "egress_rid"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 8,
+            "column" : 49,
+            "source_fragment" : "standard_metadata, Port port) { ..."
+          }
+        }
+      ]
+    },
+    {
+      "name" : "send_to_cpu",
+      "id" : 1,
+      "runtime_data" : [],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "ingress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "egress_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "egress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "clone_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "clone_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "instance_type"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "instance_type"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "drop"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "drop"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "recirculate_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "recirculate_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "packet_length"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "packet_length"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "enq_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "enq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "deq_timedelta"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_timedelta"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "deq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "ingress_global_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_global_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "lf_field_list"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "lf_field_list"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "mcast_grp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "mcast_grp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "resubmit_flag"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "resubmit_flag"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "egress_rid"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_rid"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "egress_spec"]
+            },
+            {
+              "type" : "hexstr",
+              "value" : "0x00ff"
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 5,
+            "column" : 4,
+            "source_fragment" : "standard_metadata.egress_spec = 9w255"
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "ingress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "egress_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "egress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "clone_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "clone_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "instance_type"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "instance_type"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "drop"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "drop"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "recirculate_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "recirculate_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "packet_length"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "packet_length"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "enq_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "enq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_timedelta"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "deq_timedelta"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "deq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_global_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "ingress_global_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "lf_field_list"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "lf_field_list"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "mcast_grp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "mcast_grp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "resubmit_flag"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "resubmit_flag"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_rid"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_4", "egress_rid"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 4,
+            "column" : 45,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        }
+      ]
+    },
+    {
+      "name" : "drop",
+      "id" : 2,
+      "runtime_data" : [],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "ingress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "egress_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "egress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "clone_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "clone_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "instance_type"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "instance_type"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "drop"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "drop"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "recirculate_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "recirculate_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "packet_length"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "packet_length"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "enq_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "enq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "deq_timedelta"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_timedelta"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "deq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "ingress_global_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_global_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "lf_field_list"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "lf_field_list"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "mcast_grp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "mcast_grp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "resubmit_flag"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "resubmit_flag"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "egress_rid"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_rid"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "egress_spec"]
+            },
+            {
+              "type" : "hexstr",
+              "value" : "0x01ff"
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 13,
+            "column" : 4,
+            "source_fragment" : "standard_metadata.egress_spec = 9w511"
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "ingress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "egress_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "egress_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "clone_spec"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "clone_spec"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "instance_type"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "instance_type"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "drop"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "drop"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "recirculate_port"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "recirculate_port"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "packet_length"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "packet_length"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "enq_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "enq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "enq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_timedelta"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "deq_timedelta"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "deq_qdepth"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "deq_qdepth"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "ingress_global_timestamp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "ingress_global_timestamp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "lf_field_list"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "lf_field_list"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "mcast_grp"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "mcast_grp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "resubmit_flag"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "resubmit_flag"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "egress_rid"]
+            },
+            {
+              "type" : "field",
+              "value" : ["standard_metadata_5", "egress_rid"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/actions.p4",
+            "line" : 12,
+            "column" : 38,
+            "source_fragment" : "standard_metadata) { ..."
+          }
+        }
+      ]
+    },
+    {
+      "name" : "NoAction",
+      "id" : 3,
+      "runtime_data" : [],
+      "primitives" : []
+    },
+    {
+      "name" : "act",
+      "id" : 4,
+      "runtime_data" : [],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "tmp"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "&",
+                  "left" : {
+                    "type" : "field",
+                    "value" : ["standard_metadata", "ingress_port"]
+                  },
+                  "right" : {
+                    "type" : "hexstr",
+                    "value" : "0xffffffff"
+                  }
+                }
+              }
+            }
+          ]
+        },
+        {
+          "op" : "count",
+          "parameters" : [
+            {
+              "type" : "counter_array",
+              "value" : "port_counters_control.ingress_port_counter"
+            },
+            {
+              "type" : "field",
+              "value" : ["scalars", "tmp"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/port_counters.p4",
+            "line" : 11,
+            "column" : 12,
+            "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)"
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "tmp_0"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "&",
+                  "left" : {
+                    "type" : "field",
+                    "value" : ["standard_metadata", "egress_spec"]
+                  },
+                  "right" : {
+                    "type" : "hexstr",
+                    "value" : "0xffffffff"
+                  }
+                }
+              }
+            }
+          ]
+        },
+        {
+          "op" : "count",
+          "parameters" : [
+            {
+              "type" : "counter_array",
+              "value" : "port_counters_control.egress_port_counter"
+            },
+            {
+              "type" : "field",
+              "value" : ["scalars", "tmp_0"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/port_counters.p4",
+            "line" : 12,
+            "column" : 12,
+            "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)"
+          }
+        }
+      ]
+    }
+  ],
+  "pipelines" : [
+    {
+      "name" : "ingress",
+      "id" : 0,
+      "source_info" : {
+        "filename" : "default.p4",
+        "line" : 10,
+        "column" : 8,
+        "source_fragment" : "ingress"
+      },
+      "init_table" : "table0",
+      "tables" : [
+        {
+          "name" : "table0",
+          "id" : 0,
+          "source_info" : {
+            "filename" : "default.p4",
+            "line" : 13,
+            "column" : 10,
+            "source_fragment" : "table0"
+          },
+          "key" : [
+            {
+              "match_type" : "ternary",
+              "target" : ["standard_metadata", "ingress_port"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "target" : ["ethernet", "dstAddr"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "target" : ["ethernet", "srcAddr"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "target" : ["ethernet", "etherType"],
+              "mask" : null
+            }
+          ],
+          "match_type" : "ternary",
+          "type" : "simple",
+          "max_size" : 1024,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [0, 1, 2, 3],
+          "actions" : ["set_egress_port", "send_to_cpu", "drop", "NoAction"],
+          "base_default_next" : "node_3",
+          "next_tables" : {
+            "set_egress_port" : "node_3",
+            "send_to_cpu" : "node_3",
+            "drop" : "node_3",
+            "NoAction" : "node_3"
+          },
+          "default_entry" : {
+            "action_id" : 3,
+            "action_const" : false,
+            "action_data" : [],
+            "action_entry_const" : false
+          }
+        },
+        {
+          "name" : "tbl_act",
+          "id" : 1,
+          "key" : [],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [4],
+          "actions" : ["act"],
+          "base_default_next" : null,
+          "next_tables" : {
+            "act" : null
+          },
+          "default_entry" : {
+            "action_id" : 4,
+            "action_const" : true,
+            "action_data" : [],
+            "action_entry_const" : true
+          }
+        }
+      ],
+      "action_profiles" : [],
+      "conditionals" : [
+        {
+          "name" : "node_3",
+          "id" : 0,
+          "source_info" : {
+            "filename" : "include/port_counters.p4",
+            "line" : 10,
+            "column" : 12,
+            "source_fragment" : "standard_metadata.egress_spec < 254"
+          },
+          "expression" : {
+            "type" : "expression",
+            "value" : {
+              "op" : "<",
+              "left" : {
+                "type" : "field",
+                "value" : ["standard_metadata", "egress_spec"]
+              },
+              "right" : {
+                "type" : "hexstr",
+                "value" : "0x00fe"
+              }
+            }
+          },
+          "false_next" : null,
+          "true_next" : "tbl_act"
+        }
+      ]
+    },
+    {
+      "name" : "egress",
+      "id" : 1,
+      "source_info" : {
+        "filename" : "default.p4",
+        "line" : 36,
+        "column" : 8,
+        "source_fragment" : "egress"
+      },
+      "init_table" : null,
+      "tables" : [],
+      "action_profiles" : [],
+      "conditionals" : []
+    }
+  ],
+  "checksums" : [],
+  "force_arith" : [],
+  "extern_instances" : [],
+  "field_aliases" : [
+    [
+      "queueing_metadata.enq_timestamp",
+      ["standard_metadata", "enq_timestamp"]
+    ],
+    [
+      "queueing_metadata.enq_qdepth",
+      ["standard_metadata", "enq_qdepth"]
+    ],
+    [
+      "queueing_metadata.deq_timedelta",
+      ["standard_metadata", "deq_timedelta"]
+    ],
+    [
+      "queueing_metadata.deq_qdepth",
+      ["standard_metadata", "deq_qdepth"]
+    ],
+    [
+      "intrinsic_metadata.ingress_global_timestamp",
+      ["standard_metadata", "ingress_global_timestamp"]
+    ],
+    [
+      "intrinsic_metadata.lf_field_list",
+      ["standard_metadata", "lf_field_list"]
+    ],
+    [
+      "intrinsic_metadata.mcast_grp",
+      ["standard_metadata", "mcast_grp"]
+    ],
+    [
+      "intrinsic_metadata.resubmit_flag",
+      ["standard_metadata", "resubmit_flag"]
+    ],
+    [
+      "intrinsic_metadata.egress_rid",
+      ["standard_metadata", "egress_rid"]
+    ]
+  ]
+}
\ No newline at end of file
diff --git a/apps/p4runtime-test/src/test/resources/default.p4info b/apps/p4runtime-test/src/test/resources/default.p4info
new file mode 100644
index 0000000..b224b87
--- /dev/null
+++ b/apps/p4runtime-test/src/test/resources/default.p4info
@@ -0,0 +1,147 @@
+tables {
+  preamble {
+    id: 33617813
+    name: "table0"
+    alias: "table0"
+  }
+  match_fields {
+    id: 1
+    name: "standard_metadata.ingress_port"
+    bitwidth: 9
+    match_type: TERNARY
+  }
+  match_fields {
+    id: 2
+    name: "hdr.ethernet.dstAddr"
+    bitwidth: 48
+    match_type: TERNARY
+  }
+  match_fields {
+    id: 3
+    name: "hdr.ethernet.srcAddr"
+    bitwidth: 48
+    match_type: TERNARY
+  }
+  match_fields {
+    id: 4
+    name: "hdr.ethernet.etherType"
+    bitwidth: 16
+    match_type: TERNARY
+  }
+  action_refs {
+    id: 16794308
+  }
+  action_refs {
+    id: 16829080
+  }
+  action_refs {
+    id: 16793508
+  }
+  action_refs {
+    id: 16800567
+    annotations: "@defaultonly()"
+  }
+  direct_resource_ids: 301990488
+  size: 1024
+  with_entry_timeout: true
+}
+actions {
+  preamble {
+    id: 16794308
+    name: "set_egress_port"
+    alias: "set_egress_port"
+  }
+  params {
+    id: 1
+    name: "port"
+    bitwidth: 9
+  }
+}
+actions {
+  preamble {
+    id: 16829080
+    name: "send_to_cpu"
+    alias: "send_to_cpu"
+  }
+}
+actions {
+  preamble {
+    id: 16793508
+    name: "drop"
+    alias: "drop"
+  }
+}
+actions {
+  preamble {
+    id: 16800567
+    name: "NoAction"
+    alias: "NoAction"
+  }
+}
+counters {
+  preamble {
+    id: 302025528
+    name: "port_counters_control.egress_port_counter"
+    alias: "egress_port_counter"
+  }
+  spec {
+    unit: PACKETS
+  }
+  size: 254
+}
+counters {
+  preamble {
+    id: 301999025
+    name: "port_counters_control.ingress_port_counter"
+    alias: "ingress_port_counter"
+  }
+  spec {
+    unit: PACKETS
+  }
+  size: 254
+}
+direct_counters {
+  preamble {
+    id: 301990488
+    name: "table0_counter"
+    alias: "table0_counter"
+  }
+  spec {
+    unit: PACKETS
+  }
+  direct_table_id: 33617813
+}
+controller_packet_metadata {
+  preamble {
+    id: 2868941301
+    name: "packet_in"
+    annotations: "@controller_header(\"packet_in\")"
+  }
+  metadata {
+    id: 1
+    name: "ingress_port"
+    bitwidth: 9
+  }
+  metadata {
+    id: 2
+    name: "other1"
+    bitwidth: 32
+  }
+}
+controller_packet_metadata {
+  preamble {
+    id: 2868916615
+    name: "packet_out"
+    annotations: "@controller_header(\"packet_out\")"
+  }
+  metadata {
+    id: 1
+    name: "egress_port"
+    bitwidth: 9
+  }
+  metadata {
+    id: 2
+    name: "other2"
+    bitwidth: 32
+  }
+}
diff --git a/modules.defs b/modules.defs
index 8910bbf..4821ee1 100644
--- a/modules.defs
+++ b/modules.defs
@@ -235,6 +235,7 @@
     '//apps/vtn/sfcmgr:onos-apps-vtn-sfcmgr',
     '//apps/vtn/vtnmgr:onos-apps-vtn-vtnmgr',
     '//apps/vtn/vtnweb:onos-apps-vtn-vtnweb',
+    '//apps/p4runtime-test:onos-apps-p4runtime-test',
 ]
 
 APPS = ONOS_DRIVERS + ONOS_PROVIDERS + ONOS_APPS + MODELS + PROTOCOL_APPS
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeControllerImpl.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeControllerImpl.java
index ca78652..d134a22 100644
--- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeControllerImpl.java
+++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeControllerImpl.java
@@ -63,7 +63,7 @@
     private final Map<DeviceId, ReadWriteLock> deviceLocks = Maps.newConcurrentMap();
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-    protected GrpcController grpcController;
+    public GrpcController grpcController;
 
     @Activate
     public void activate() {
diff --git a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java
index 92ad3ca..e4f00dc 100644
--- a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java
+++ b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java
@@ -171,63 +171,4 @@
 
         // TODO: improve, assert other field match types (ternary, LPM)
     }
-
-//    @Test
-//    public void testRuntime() throws ExecutionException, InterruptedException,
-//            PiPipelineInterpreter.PiInterpreterException, IllegalAccessException, InstantiationException {
-//
-//        // FIXME: remove me.
-//
-//        P4RuntimeControllerImpl controller = new P4RuntimeControllerImpl();
-//        GrpcControllerImpl grpcController = new GrpcControllerImpl();
-//        controller.grpcController = grpcController;
-//        GrpcControllerImpl.enableMessageLog = true;
-//        grpcController.activate();
-//        DeviceId deviceId = DeviceId.deviceId("dummy:1");
-//
-//        ManagedChannelBuilder channelBuilder = NettyChannelBuilder
-//                .forAddress("192.168.56.102", 59975)
-//                .usePlaintext(true);
-//
-//        assert (controller.createClient(deviceId, 1, channelBuilder));
-//
-//        P4RuntimeClient client = controller.getClient(deviceId);
-//
-//        assert(client.setPipelineConfig(defaultPipeconf, PiPipeconf.ExtensionType.BMV2_JSON).get());
-//
-//        assert(client.initStreamChannel().get());
-//
-//        log.info("++++++++++++++++++++++++++++");
-//
-//        PiPipelineInterpreter interpreter = (PiPipelineInterpreter) defaultPipeconf
-//                .implementation(PiPipelineInterpreter.class)
-//                .orElse(null)
-//                .newInstance();
-//
-//        TrafficTreatment t = DefaultTrafficTreatment.builder()
-//                .setOutput(PortNumber.portNumber(830L)).build();
-//        byte[] payload = new byte[1000];
-////        payload[0] = 1;
-//        Arrays.fill( payload, (byte) 1 );
-//
-//        OutboundPacket packet = new DefaultOutboundPacket(
-//                deviceId, t, ByteBuffer.wrap(payload));
-//
-//
-//        Collection<PiPacketOperation> operations = interpreter.mapOutboundPacket(packet,defaultPipeconf);
-//        log.info("{}", operations);
-//        operations.forEach(piPacketOperation -> {
-//            try {
-//                client.packetOut(piPacketOperation, defaultPipeconf).get();
-//            } catch (InterruptedException | ExecutionException e) {
-//               log.error("{}",e);
-//            }
-//        });
-//
-////        assert(client.dumpTable(PiTableId.of(TABLE_0), defaultPipeconf).get().size() == 0);
-//
-////        assert(client.writeTableEntries(Lists.newArrayList(piTableEntry), INSERT, defaultPipeconf).get());
-//
-////        assert(client.dumpTable(PiTableId.of(TABLE_0), defaultPipeconf).get().size() == 1);
-//    }
 }