blob: e48c28b9e093e4aa43aad5435231a16885dab1ef [file] [log] [blame]
{
"program" : "tor.p4",
"__meta__" : {
"version" : [2, 7],
"compiler" : "https://github.com/p4lang/p4c"
},
"header_types" : [
{
"name" : "scalars_0",
"id" : 0,
"fields" : [
["tmp_1", 21, false],
["tmp", 16, false],
["l3_fwd_tmp_2", 1, false],
["l3_fwd_tmp_3", 1, false],
["l3_fwd_tmp_4", 1, false],
["tmp_2", 32, false],
["tmp_3", 32, false],
["local_metadata_t.vrf_id", 32, false],
["local_metadata_t.class_id", 8, false],
["local_metadata_t.cpu_cos_queue_id", 5, false],
["local_metadata_t.skip_egress", 1, false],
["local_metadata_t.egress_spec_at_punt_match", 9, false],
["local_metadata_t.color", 2, false],
["local_metadata_t.l4_src_port", 16, false],
["local_metadata_t.l4_dst_port", 16, false],
["local_metadata_t.icmp_code", 8, false],
["_padding_0", 7, false]
]
},
{
"name" : "ethernet_t",
"id" : 1,
"fields" : [
["dst_addr", 48, false],
["src_addr", 48, false],
["ether_type", 16, false]
]
},
{
"name" : "ipv4_base_t",
"id" : 2,
"fields" : [
["version", 4, false],
["ihl", 4, false],
["diffserv", 8, false],
["total_len", 16, false],
["identification", 16, false],
["flags", 3, false],
["frag_offset", 13, false],
["ttl", 8, false],
["protocol", 8, false],
["hdr_checksum", 16, false],
["src_addr", 32, false],
["dst_addr", 32, false]
]
},
{
"name" : "ipv6_base_t",
"id" : 3,
"fields" : [
["version", 4, false],
["traffic_class", 8, false],
["flow_label", 20, false],
["payload_length", 16, false],
["next_header", 8, false],
["hop_limit", 8, false],
["src_addr", 128, false],
["dst_addr", 128, false]
]
},
{
"name" : "icmp_header_t",
"id" : 4,
"fields" : [
["icmp_type", 8, false],
["code", 8, false],
["checksum", 16, false]
]
},
{
"name" : "tcp_t",
"id" : 5,
"fields" : [
["src_port", 16, false],
["dst_port", 16, false],
["seq_no", 32, false],
["ack_no", 32, false],
["data_offset", 4, false],
["res", 4, false],
["flags", 8, false],
["window", 16, false],
["checksum", 16, false],
["urgent_ptr", 16, false]
]
},
{
"name" : "udp_t",
"id" : 6,
"fields" : [
["src_port", 16, false],
["dst_port", 16, false],
["hdr_length", 16, false],
["checksum", 16, false]
]
},
{
"name" : "arp_t",
"id" : 7,
"fields" : [
["hw_type", 16, false],
["proto_type", 16, false],
["hw_addr_len", 8, false],
["proto_addr_len", 8, false],
["opcode", 16, false],
["sender_hw_addr", 48, false],
["sender_proto_addr", 32, false],
["target_hw_addr", 48, false],
["target_proto_addr", 32, false]
]
},
{
"name" : "packet_in_header_t",
"id" : 8,
"fields" : [
["ingress_physical_port", 9, false],
["padding1", 7, false],
["ingress_logical_port", 32, false],
["target_egress_port", 9, false],
["padding2", 7, false]
]
},
{
"name" : "packet_out_header_t",
"id" : 9,
"fields" : [
["egress_physical_port", 9, false],
["submit_to_ingress", 1, false],
["padding", 6, false]
]
},
{
"name" : "vlan_tag_t",
"id" : 10,
"fields" : [
["pcp", 3, false],
["cfi", 1, false],
["vid", 12, false],
["ether_type", 16, false]
]
},
{
"name" : "standard_metadata",
"id" : 11,
"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]
]
}
],
"headers" : [
{
"name" : "scalars",
"id" : 0,
"header_type" : "scalars_0",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "standard_metadata",
"id" : 1,
"header_type" : "standard_metadata",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "ethernet",
"id" : 2,
"header_type" : "ethernet_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv4_base",
"id" : 3,
"header_type" : "ipv4_base_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv6_base",
"id" : 4,
"header_type" : "ipv6_base_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp_header",
"id" : 5,
"header_type" : "icmp_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
"id" : 6,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
"id" : 7,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "arp",
"id" : 8,
"header_type" : "arp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_in",
"id" : 9,
"header_type" : "packet_in_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_out",
"id" : 10,
"header_type" : "packet_out_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "vlan_tag[0]",
"id" : 11,
"header_type" : "vlan_tag_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "vlan_tag[1]",
"id" : 12,
"header_type" : "vlan_tag_t",
"metadata" : false,
"pi_omit" : true
}
],
"header_stacks" : [
{
"name" : "vlan_tag",
"id" : 0,
"header_type" : "vlan_tag_t",
"size" : 2,
"header_ids" : [11, 12]
}
],
"header_union_types" : [],
"header_unions" : [],
"header_union_stacks" : [],
"field_lists" : [
{
"id" : 0,
"name" : "fl",
"elements" : [
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
}
]
}
],
"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" : "start",
"id" : 0,
"parser_ops" : [],
"transitions" : [
{
"value" : "0x00ff",
"mask" : null,
"next_state" : "parse_cpu_header"
},
{
"value" : "default",
"mask" : null,
"next_state" : "parse_ethernet"
}
],
"transition_key" : [
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
}
]
},
{
"name" : "parse_ethernet",
"id" : 1,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "ethernet"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "0x8100",
"mask" : null,
"next_state" : "parse_vlan"
},
{
"value" : "0x9100",
"mask" : null,
"next_state" : "parse_vlan"
},
{
"value" : "0x9200",
"mask" : null,
"next_state" : "parse_vlan"
},
{
"value" : "0x9300",
"mask" : null,
"next_state" : "parse_vlan"
},
{
"value" : "0x0800",
"mask" : null,
"next_state" : "parse_ipv4"
},
{
"value" : "0x86dd",
"mask" : null,
"next_state" : "parse_ipv6"
},
{
"value" : "0x0806",
"mask" : null,
"next_state" : "parse_arp"
},
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : [
{
"type" : "field",
"value" : ["ethernet", "ether_type"]
}
]
},
{
"name" : "parse_vlan",
"id" : 2,
"parser_ops" : [
{
"parameters" : [
{
"type" : "stack",
"value" : "vlan_tag"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "0x8100",
"mask" : null,
"next_state" : "parse_vlan"
},
{
"value" : "0x9100",
"mask" : null,
"next_state" : "parse_vlan"
},
{
"value" : "0x9200",
"mask" : null,
"next_state" : "parse_vlan"
},
{
"value" : "0x9300",
"mask" : null,
"next_state" : "parse_vlan"
},
{
"value" : "0x0800",
"mask" : null,
"next_state" : "parse_ipv4"
},
{
"value" : "0x86dd",
"mask" : null,
"next_state" : "parse_ipv6"
},
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : [
{
"type" : "stack_field",
"value" : ["vlan_tag", "ether_type"]
}
]
},
{
"name" : "parse_ipv4",
"id" : 3,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "ipv4_base"
}
],
"op" : "extract"
},
{
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "tmp_1"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "|",
"left" : {
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "expression",
"value" : {
"op" : "<<",
"left" : {
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "field",
"value" : ["ipv4_base", "frag_offset"]
},
"right" : {
"type" : "hexstr",
"value" : "0x1fffff"
}
}
},
"right" : {
"type" : "hexstr",
"value" : "0x8"
}
}
},
"right" : {
"type" : "hexstr",
"value" : "0x1fffff"
}
}
},
"right" : {
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "field",
"value" : ["ipv4_base", "protocol"]
},
"right" : {
"type" : "hexstr",
"value" : "0x1fffff"
}
}
},
"right" : {
"type" : "hexstr",
"value" : "0x0001ff"
}
}
}
}
}
}
],
"op" : "set"
}
],
"transitions" : [
{
"value" : "0x000001",
"mask" : null,
"next_state" : "parse_icmp"
},
{
"value" : "0x000006",
"mask" : null,
"next_state" : "parse_tcp"
},
{
"value" : "0x000011",
"mask" : null,
"next_state" : "parse_udp"
},
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : [
{
"type" : "field",
"value" : ["scalars", "tmp_1"]
}
]
},
{
"name" : "parse_ipv6",
"id" : 4,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "ipv6_base"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "0x3a",
"mask" : null,
"next_state" : "parse_icmp"
},
{
"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" : ["ipv6_base", "next_header"]
}
]
},
{
"name" : "parse_tcp",
"id" : 5,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "tcp"
}
],
"op" : "extract"
},
{
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.l4_src_port"]
},
{
"type" : "field",
"value" : ["tcp", "src_port"]
}
],
"op" : "set"
},
{
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.l4_dst_port"]
},
{
"type" : "field",
"value" : ["tcp", "dst_port"]
}
],
"op" : "set"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "parse_udp",
"id" : 6,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "udp"
}
],
"op" : "extract"
},
{
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.l4_src_port"]
},
{
"type" : "field",
"value" : ["udp", "src_port"]
}
],
"op" : "set"
},
{
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.l4_dst_port"]
},
{
"type" : "field",
"value" : ["udp", "dst_port"]
}
],
"op" : "set"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "parse_icmp",
"id" : 7,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "icmp_header"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "parse_arp",
"id" : 8,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "arp"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "parse_cpu_header",
"id" : 9,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "packet_out"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : "parse_ethernet"
}
],
"transition_key" : []
}
]
}
],
"deparsers" : [
{
"name" : "deparser",
"id" : 0,
"source_info" : {
"filename" : "parser.p4",
"line" : 150,
"column" : 8,
"source_fragment" : "pkt_deparser"
},
"order" : ["packet_in", "ethernet", "vlan_tag[0]", "vlan_tag[1]", "ipv4_base", "ipv6_base", "arp", "icmp_header", "tcp", "udp"]
}
],
"meter_arrays" : [
{
"name" : "punt.ingress_port_meter",
"id" : 0,
"source_info" : {
"filename" : "punt.p4",
"line" : 29,
"column" : 40,
"source_fragment" : "ingress_port_meter"
},
"is_direct" : true,
"rate_count" : 2,
"type" : "bytes",
"size" : 1024,
"binding" : "punt.punt_table",
"result_target" : ["scalars", "local_metadata_t.color"]
}
],
"counter_arrays" : [
{
"name" : "punt.punt_packet_counter",
"id" : 0,
"is_direct" : true,
"binding" : "punt.punt_table"
},
{
"name" : "packetio_egress.egress_port_counter",
"id" : 1,
"source_info" : {
"filename" : "packetio.p4",
"line" : 49,
"column" : 34,
"source_fragment" : "egress_port_counter"
},
"size" : 510,
"is_direct" : false
},
{
"name" : "packetio_egress.ingress_port_counter",
"id" : 2,
"source_info" : {
"filename" : "packetio.p4",
"line" : 50,
"column" : 34,
"source_fragment" : "ingress_port_counter"
},
"size" : 510,
"is_direct" : false
}
],
"register_arrays" : [],
"calculations" : [
{
"name" : "calc",
"id" : 0,
"source_info" : {
"filename" : "ipv4_checksum.p4",
"line" : 37,
"column" : 35,
"source_fragment" : "ipv4_checksum.get( ..."
},
"algo" : "csum16",
"input" : [
{
"type" : "field",
"value" : ["ipv4_base", "version"]
},
{
"type" : "field",
"value" : ["ipv4_base", "ihl"]
},
{
"type" : "field",
"value" : ["ipv4_base", "diffserv"]
},
{
"type" : "field",
"value" : ["ipv4_base", "total_len"]
},
{
"type" : "field",
"value" : ["ipv4_base", "identification"]
},
{
"type" : "field",
"value" : ["ipv4_base", "flags"]
},
{
"type" : "field",
"value" : ["ipv4_base", "frag_offset"]
},
{
"type" : "field",
"value" : ["ipv4_base", "ttl"]
},
{
"type" : "field",
"value" : ["ipv4_base", "protocol"]
},
{
"type" : "field",
"value" : ["ipv4_base", "src_addr"]
},
{
"type" : "field",
"value" : ["ipv4_base", "dst_addr"]
}
]
}
],
"learn_lists" : [],
"actions" : [
{
"name" : "NoAction",
"id" : 0,
"runtime_data" : [],
"primitives" : []
},
{
"name" : "NoAction",
"id" : 1,
"runtime_data" : [],
"primitives" : []
},
{
"name" : "NoAction",
"id" : 2,
"runtime_data" : [],
"primitives" : []
},
{
"name" : "NoAction",
"id" : 3,
"runtime_data" : [],
"primitives" : []
},
{
"name" : "NoAction",
"id" : 4,
"runtime_data" : [],
"primitives" : []
},
{
"name" : "vrf.set_vrf",
"id" : 5,
"runtime_data" : [
{
"name" : "vrf_id",
"bitwidth" : 32
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.vrf_id"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "vrf.p4",
"line" : 27,
"column" : 4,
"source_fragment" : "local_metadata.vrf_id = vrf_id"
}
}
]
},
{
"name" : "class_id.set_class_id",
"id" : 6,
"runtime_data" : [
{
"name" : "class_id_value",
"bitwidth" : 8
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.class_id"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "class_id.p4",
"line" : 22,
"column" : 5,
"source_fragment" : "local_metadata.class_id = class_id_value"
}
}
]
},
{
"name" : "l3_fwd.set_nexthop",
"id" : 7,
"runtime_data" : [
{
"name" : "port",
"bitwidth" : 9
},
{
"name" : "smac",
"bitwidth" : 48
},
{
"name" : "dmac",
"bitwidth" : 48
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 29,
"column" : 4,
"source_fragment" : "standard_metadata.egress_spec = port"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ethernet", "src_addr"]
},
{
"type" : "runtime_data",
"value" : 1
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 30,
"column" : 4,
"source_fragment" : "hdr.ethernet.src_addr = smac"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ethernet", "dst_addr"]
},
{
"type" : "runtime_data",
"value" : 2
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 31,
"column" : 4,
"source_fragment" : "hdr.ethernet.dst_addr = dmac"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ipv4_base", "ttl"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "expression",
"value" : {
"op" : "+",
"left" : {
"type" : "field",
"value" : ["ipv4_base", "ttl"]
},
"right" : {
"type" : "hexstr",
"value" : "0xff"
}
}
},
"right" : {
"type" : "hexstr",
"value" : "0xff"
}
}
}
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 33,
"column" : 6,
"source_fragment" : "hdr.ipv4_base.ttl = hdr.ipv4_base.ttl - 1"
}
}
]
},
{
"name" : "l3_fwd.set_nexthop",
"id" : 8,
"runtime_data" : [
{
"name" : "port",
"bitwidth" : 9
},
{
"name" : "smac",
"bitwidth" : 48
},
{
"name" : "dmac",
"bitwidth" : 48
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 29,
"column" : 4,
"source_fragment" : "standard_metadata.egress_spec = port"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ethernet", "src_addr"]
},
{
"type" : "runtime_data",
"value" : 1
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 30,
"column" : 4,
"source_fragment" : "hdr.ethernet.src_addr = smac"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ethernet", "dst_addr"]
},
{
"type" : "runtime_data",
"value" : 2
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 31,
"column" : 4,
"source_fragment" : "hdr.ethernet.dst_addr = dmac"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ipv4_base", "ttl"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "expression",
"value" : {
"op" : "+",
"left" : {
"type" : "field",
"value" : ["ipv4_base", "ttl"]
},
"right" : {
"type" : "hexstr",
"value" : "0xff"
}
}
},
"right" : {
"type" : "hexstr",
"value" : "0xff"
}
}
}
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 33,
"column" : 6,
"source_fragment" : "hdr.ipv4_base.ttl = hdr.ipv4_base.ttl - 1"
}
}
]
},
{
"name" : "l3_fwd.set_nexthop",
"id" : 9,
"runtime_data" : [
{
"name" : "port",
"bitwidth" : 9
},
{
"name" : "smac",
"bitwidth" : 48
},
{
"name" : "dmac",
"bitwidth" : 48
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 29,
"column" : 4,
"source_fragment" : "standard_metadata.egress_spec = port"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ethernet", "src_addr"]
},
{
"type" : "runtime_data",
"value" : 1
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 30,
"column" : 4,
"source_fragment" : "hdr.ethernet.src_addr = smac"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ethernet", "dst_addr"]
},
{
"type" : "runtime_data",
"value" : 2
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 31,
"column" : 4,
"source_fragment" : "hdr.ethernet.dst_addr = dmac"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ipv4_base", "ttl"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "expression",
"value" : {
"op" : "+",
"left" : {
"type" : "field",
"value" : ["ipv4_base", "ttl"]
},
"right" : {
"type" : "hexstr",
"value" : "0xff"
}
}
},
"right" : {
"type" : "hexstr",
"value" : "0xff"
}
}
}
}
],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 33,
"column" : 6,
"source_fragment" : "hdr.ipv4_base.ttl = hdr.ipv4_base.ttl - 1"
}
}
]
},
{
"name" : "punt.set_queue_and_clone_to_cpu",
"id" : 10,
"runtime_data" : [
{
"name" : "queue_id",
"bitwidth" : 5
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.cpu_cos_queue_id"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "punt.p4",
"line" : 36,
"column" : 4,
"source_fragment" : "local_metadata.cpu_cos_queue_id = queue_id"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.egress_spec_at_punt_match"]
},
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
}
],
"source_info" : {
"filename" : "punt.p4",
"line" : 37,
"column" : 4,
"source_fragment" : "local_metadata.egress_spec_at_punt_match = standard_metadata.egress_spec"
}
},
{
"op" : "clone_ingress_pkt_to_egress",
"parameters" : [
{
"type" : "hexstr",
"value" : "0x000003ff"
},
{
"type" : "hexstr",
"value" : "0x0"
}
]
}
]
},
{
"name" : "punt.set_queue_and_send_to_cpu",
"id" : 11,
"runtime_data" : [
{
"name" : "queue_id",
"bitwidth" : 5
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.cpu_cos_queue_id"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "punt.p4",
"line" : 46,
"column" : 4,
"source_fragment" : "local_metadata.cpu_cos_queue_id = queue_id"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.egress_spec_at_punt_match"]
},
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
}
],
"source_info" : {
"filename" : "punt.p4",
"line" : 47,
"column" : 4,
"source_fragment" : "local_metadata.egress_spec_at_punt_match = standard_metadata.egress_spec"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "hexstr",
"value" : "0x00ff"
}
],
"source_info" : {
"filename" : "punt.p4",
"line" : 48,
"column" : 4,
"source_fragment" : "standard_metadata.egress_spec = 255"
}
}
]
},
{
"name" : "act",
"id" : 12,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.skip_egress"]
},
{
"type" : "hexstr",
"value" : "0x01"
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 21,
"column" : 6,
"source_fragment" : "local_metadata.skip_egress = 1"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "field",
"value" : ["packet_out", "egress_physical_port"]
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 22,
"column" : 6,
"source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_physical_port"
}
},
{
"op" : "remove_header",
"parameters" : [
{
"type" : "header",
"value" : "packet_out"
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 23,
"column" : 6,
"source_fragment" : "hdr.packet_out.setInvalid()"
}
}
]
},
{
"name" : "act_0",
"id" : 13,
"runtime_data" : [],
"primitives" : [
{
"op" : "remove_header",
"parameters" : [
{
"type" : "header",
"value" : "packet_out"
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 26,
"column" : 4,
"source_fragment" : "hdr.packet_out.setInvalid()"
}
}
]
},
{
"name" : "act_1",
"id" : 14,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_4"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "b2d",
"left" : null,
"right" : {
"type" : "bool",
"value" : true
}
}
}
}
]
}
]
},
{
"name" : "act_2",
"id" : 15,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_4"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "b2d",
"left" : null,
"right" : {
"type" : "bool",
"value" : false
}
}
}
}
]
}
]
},
{
"name" : "act_3",
"id" : 16,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_3"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "b2d",
"left" : null,
"right" : {
"type" : "bool",
"value" : true
}
}
}
}
]
}
]
},
{
"name" : "act_4",
"id" : 17,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_3"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "b2d",
"left" : null,
"right" : {
"type" : "bool",
"value" : false
}
}
}
}
]
}
]
},
{
"name" : "act_5",
"id" : 18,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_2"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "b2d",
"left" : null,
"right" : {
"type" : "bool",
"value" : true
}
}
}
}
]
}
]
},
{
"name" : "act_6",
"id" : 19,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_2"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "b2d",
"left" : null,
"right" : {
"type" : "bool",
"value" : false
}
}
}
}
]
}
]
},
{
"name" : "act_7",
"id" : 20,
"runtime_data" : [],
"primitives" : [
{
"op" : "drop",
"parameters" : [],
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 172,
"column" : 10,
"source_fragment" : "mark_to_drop()"
}
}
]
},
{
"name" : "act_8",
"id" : 21,
"runtime_data" : [],
"primitives" : [
{
"op" : "drop",
"parameters" : [],
"source_info" : {
"filename" : "punt.p4",
"line" : 93,
"column" : 6,
"source_fragment" : "mark_to_drop()"
}
}
]
},
{
"name" : "NoAction",
"id" : 22,
"runtime_data" : [],
"primitives" : []
},
{
"name" : "packetio_egress.encap_packet_in_header",
"id" : 23,
"runtime_data" : [],
"primitives" : [
{
"op" : "add_header",
"parameters" : [
{
"type" : "header",
"value" : "packet_in"
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 35,
"column" : 4,
"source_fragment" : "hdr.packet_in.setValid()"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["packet_in", "ingress_physical_port"]
},
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 36,
"column" : 4,
"source_fragment" : "hdr.packet_in.ingress_physical_port = standard_metadata.ingress_port"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["packet_in", "target_egress_port"]
},
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.egress_spec_at_punt_match"]
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 37,
"column" : 4,
"source_fragment" : "hdr.packet_in.target_egress_port = local_metadata.egress_spec_at_punt_match"
}
}
]
},
{
"name" : "spoof_protection.drop_packet",
"id" : 24,
"runtime_data" : [],
"primitives" : [
{
"op" : "drop",
"parameters" : [],
"source_info" : {
"filename" : "spoof_protection.p4",
"line" : 22,
"column" : 4,
"source_fragment" : "mark_to_drop()"
}
}
]
},
{
"name" : "act_9",
"id" : 25,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "tmp_2"]
},
{
"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" : "packetio_egress.egress_port_counter"
},
{
"type" : "field",
"value" : ["scalars", "tmp_2"]
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 56,
"column" : 6,
"source_fragment" : "egress_port_counter.count((bit<32>) standard_metadata.egress_spec)"
}
}
]
},
{
"name" : "act_10",
"id" : 26,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "tmp_3"]
},
{
"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" : "packetio_egress.ingress_port_counter"
},
{
"type" : "field",
"value" : ["scalars", "tmp_3"]
}
],
"source_info" : {
"filename" : "packetio.p4",
"line" : 59,
"column" : 6,
"source_fragment" : "ingress_port_counter.count((bit<32> ) standard_metadata.ingress_port)"
}
}
]
}
],
"pipelines" : [
{
"name" : "ingress",
"id" : 0,
"source_info" : {
"filename" : "tor.p4",
"line" : 17,
"column" : 8,
"source_fragment" : "ingress_tor"
},
"init_table" : "node_2",
"tables" : [
{
"name" : "tbl_act",
"id" : 0,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [12],
"actions" : ["act"],
"base_default_next" : null,
"next_tables" : {
"act" : null
},
"default_entry" : {
"action_id" : 12,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "tbl_act_0",
"id" : 1,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [13],
"actions" : ["act_0"],
"base_default_next" : "vrf.vrf_classifier_table",
"next_tables" : {
"act_0" : "vrf.vrf_classifier_table"
},
"default_entry" : {
"action_id" : 13,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "vrf.vrf_classifier_table",
"id" : 2,
"source_info" : {
"filename" : "vrf.p4",
"line" : 31,
"column" : 8,
"source_fragment" : "vrf_classifier_table"
},
"key" : [
{
"match_type" : "exact",
"target" : ["ethernet", "ether_type"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ethernet", "src_addr"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "diffserv"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "dst_addr"],
"mask" : null
},
{
"match_type" : "exact",
"target" : ["standard_metadata", "ingress_port"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "traffic_class"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "dst_addr"],
"mask" : null
}
],
"match_type" : "ternary",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [5],
"actions" : ["vrf.set_vrf"],
"base_default_next" : "class_id.class_id_assignment_table",
"next_tables" : {
"vrf.set_vrf" : "class_id.class_id_assignment_table"
},
"default_entry" : {
"action_id" : 5,
"action_const" : true,
"action_data" : ["0x0"],
"action_entry_const" : true
}
},
{
"name" : "class_id.class_id_assignment_table",
"id" : 3,
"source_info" : {
"filename" : "class_id.p4",
"line" : 26,
"column" : 8,
"source_fragment" : "class_id_assignment_table"
},
"key" : [
{
"match_type" : "exact",
"target" : ["ethernet", "ether_type"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "ttl"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "hop_limit"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "dst_addr"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "dst_addr"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "protocol"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "next_header"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["scalars", "local_metadata_t.l4_src_port"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["scalars", "local_metadata_t.l4_dst_port"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["vlan_tag[0]", "vid"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["vlan_tag[0]", "pcp"],
"mask" : null
}
],
"match_type" : "ternary",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [6],
"actions" : ["class_id.set_class_id"],
"base_default_next" : "l3_fwd.l3_routing_classifier_table",
"next_tables" : {
"class_id.set_class_id" : "l3_fwd.l3_routing_classifier_table"
},
"default_entry" : {
"action_id" : 6,
"action_const" : true,
"action_data" : ["0x0"],
"action_entry_const" : true
}
},
{
"name" : "l3_fwd.l3_routing_classifier_table",
"id" : 4,
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 42,
"column" : 8,
"source_fragment" : "l3_routing_classifier_table"
},
"key" : [
{
"match_type" : "exact",
"target" : ["ethernet", "dst_addr"],
"mask" : null
}
],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [0],
"actions" : ["NoAction"],
"base_default_next" : null,
"next_tables" : {
"__HIT__" : "tbl_act_1",
"__MISS__" : "tbl_act_2"
},
"default_entry" : {
"action_id" : 0,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "tbl_act_1",
"id" : 5,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [14],
"actions" : ["act_1"],
"base_default_next" : "node_11",
"next_tables" : {
"act_1" : "node_11"
},
"default_entry" : {
"action_id" : 14,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "tbl_act_2",
"id" : 6,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [15],
"actions" : ["act_2"],
"base_default_next" : "node_11",
"next_tables" : {
"act_2" : "node_11"
},
"default_entry" : {
"action_id" : 15,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "l3_fwd.l3_ipv4_override_table",
"id" : 7,
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 56,
"column" : 8,
"source_fragment" : "l3_ipv4_override_table"
},
"key" : [
{
"match_type" : "lpm",
"target" : ["ipv4_base", "dst_addr"],
"mask" : null
}
],
"match_type" : "lpm",
"type" : "indirect_ws",
"action_profile" : "l3_fwd.wcmp_action_profile",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [7, 1],
"actions" : ["l3_fwd.set_nexthop", "NoAction"],
"base_default_next" : null,
"next_tables" : {
"__HIT__" : "tbl_act_3",
"__MISS__" : "tbl_act_4"
}
},
{
"name" : "tbl_act_3",
"id" : 8,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [16],
"actions" : ["act_3"],
"base_default_next" : "node_16",
"next_tables" : {
"act_3" : "node_16"
},
"default_entry" : {
"action_id" : 16,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "tbl_act_4",
"id" : 9,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [17],
"actions" : ["act_4"],
"base_default_next" : "node_16",
"next_tables" : {
"act_4" : "node_16"
},
"default_entry" : {
"action_id" : 17,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "l3_fwd.l3_ipv4_vrf_table",
"id" : 10,
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 76,
"column" : 8,
"source_fragment" : "l3_ipv4_vrf_table"
},
"key" : [
{
"match_type" : "exact",
"target" : ["scalars", "local_metadata_t.vrf_id"],
"mask" : null
},
{
"match_type" : "lpm",
"target" : ["ipv4_base", "dst_addr"],
"mask" : null
}
],
"match_type" : "lpm",
"type" : "indirect_ws",
"action_profile" : "l3_fwd.wcmp_action_profile",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [8, 2],
"actions" : ["l3_fwd.set_nexthop", "NoAction"],
"base_default_next" : null,
"next_tables" : {
"__HIT__" : "tbl_act_5",
"__MISS__" : "tbl_act_6"
}
},
{
"name" : "tbl_act_5",
"id" : 11,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [18],
"actions" : ["act_5"],
"base_default_next" : "node_20",
"next_tables" : {
"act_5" : "node_20"
},
"default_entry" : {
"action_id" : 18,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "tbl_act_6",
"id" : 12,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [19],
"actions" : ["act_6"],
"base_default_next" : "node_20",
"next_tables" : {
"act_6" : "node_20"
},
"default_entry" : {
"action_id" : 19,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "l3_fwd.l3_ipv4_fallback_table",
"id" : 13,
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 95,
"column" : 8,
"source_fragment" : "l3_ipv4_fallback_table"
},
"key" : [
{
"match_type" : "lpm",
"target" : ["ipv4_base", "dst_addr"],
"mask" : null
}
],
"match_type" : "lpm",
"type" : "indirect_ws",
"action_profile" : "l3_fwd.wcmp_action_profile",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [9, 3],
"actions" : ["l3_fwd.set_nexthop", "NoAction"],
"base_default_next" : "node_22",
"next_tables" : {
"l3_fwd.set_nexthop" : "node_22",
"NoAction" : "node_22"
}
},
{
"name" : "tbl_act_7",
"id" : 14,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [20],
"actions" : ["act_7"],
"base_default_next" : "punt.punt_table",
"next_tables" : {
"act_7" : "punt.punt_table"
},
"default_entry" : {
"action_id" : 20,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "punt.punt_table",
"id" : 15,
"source_info" : {
"filename" : "punt.p4",
"line" : 55,
"column" : 8,
"source_fragment" : "punt_table"
},
"key" : [
{
"match_type" : "ternary",
"target" : ["standard_metadata", "ingress_port"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["standard_metadata", "egress_spec"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ethernet", "ether_type"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "diffserv"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "traffic_class"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "ttl"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "hop_limit"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "src_addr"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "dst_addr"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "src_addr"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "dst_addr"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv4_base", "protocol"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["ipv6_base", "next_header"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["arp", "target_proto_addr"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["scalars", "local_metadata_t.icmp_code"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["vlan_tag[0]", "vid"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["vlan_tag[0]", "pcp"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["scalars", "local_metadata_t.class_id"],
"mask" : null
},
{
"match_type" : "ternary",
"target" : ["scalars", "local_metadata_t.vrf_id"],
"mask" : null
}
],
"match_type" : "ternary",
"type" : "simple",
"max_size" : 1024,
"support_timeout" : false,
"direct_meters" : "punt.ingress_port_meter",
"action_ids" : [10, 11, 4],
"actions" : ["punt.set_queue_and_clone_to_cpu", "punt.set_queue_and_send_to_cpu", "NoAction"],
"base_default_next" : "node_25",
"next_tables" : {
"punt.set_queue_and_clone_to_cpu" : "node_25",
"punt.set_queue_and_send_to_cpu" : "node_25",
"NoAction" : "node_25"
},
"default_entry" : {
"action_id" : 4,
"action_const" : false,
"action_data" : [],
"action_entry_const" : false
}
},
{
"name" : "tbl_act_8",
"id" : 16,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [21],
"actions" : ["act_8"],
"base_default_next" : null,
"next_tables" : {
"act_8" : null
},
"default_entry" : {
"action_id" : 21,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
}
],
"action_profiles" : [
{
"name" : "l3_fwd.wcmp_action_profile",
"id" : 0,
"max_size" : 1024,
"selector" : {
"algo" : "crc16",
"input" : [
{
"type" : "field",
"value" : ["ipv4_base", "dst_addr"]
},
{
"type" : "field",
"value" : ["ipv4_base", "src_addr"]
},
{
"type" : "field",
"value" : ["ipv4_base", "protocol"]
},
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.l4_src_port"]
},
{
"type" : "field",
"value" : ["scalars", "local_metadata_t.l4_dst_port"]
}
]
}
}
],
"conditionals" : [
{
"name" : "node_2",
"id" : 0,
"source_info" : {
"filename" : "tor.p4",
"line" : 21,
"column" : 8,
"source_fragment" : "hdr.packet_out.isValid()"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "==",
"left" : {
"type" : "field",
"value" : ["packet_out", "$valid$"]
},
"right" : {
"type" : "hexstr",
"value" : "0x01"
}
}
},
"true_next" : "node_3",
"false_next" : "vrf.vrf_classifier_table"
},
{
"name" : "node_3",
"id" : 1,
"source_info" : {
"filename" : "packetio.p4",
"line" : 20,
"column" : 8,
"source_fragment" : "hdr.packet_out.submit_to_ingress == 0"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "==",
"left" : {
"type" : "field",
"value" : ["packet_out", "submit_to_ingress"]
},
"right" : {
"type" : "hexstr",
"value" : "0x00"
}
}
},
"true_next" : "tbl_act",
"false_next" : "tbl_act_0"
},
{
"name" : "node_11",
"id" : 2,
"expression" : {
"type" : "expression",
"value" : {
"op" : "d2b",
"left" : null,
"right" : {
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_4"]
}
}
},
"true_next" : "node_12",
"false_next" : "punt.punt_table"
},
{
"name" : "node_12",
"id" : 3,
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 165,
"column" : 10,
"source_fragment" : "hdr.ipv4_base.isValid()"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "==",
"left" : {
"type" : "field",
"value" : ["ipv4_base", "$valid$"]
},
"right" : {
"type" : "hexstr",
"value" : "0x01"
}
}
},
"true_next" : "l3_fwd.l3_ipv4_override_table",
"false_next" : "punt.punt_table"
},
{
"name" : "node_16",
"id" : 4,
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 166,
"column" : 11,
"source_fragment" : "!l3_ipv4_override_table.apply().hit"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "not",
"left" : null,
"right" : {
"type" : "expression",
"value" : {
"op" : "d2b",
"left" : null,
"right" : {
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_3"]
}
}
}
}
},
"true_next" : "l3_fwd.l3_ipv4_vrf_table",
"false_next" : "node_22"
},
{
"name" : "node_20",
"id" : 5,
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 167,
"column" : 13,
"source_fragment" : "!l3_ipv4_vrf_table.apply().hit"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "not",
"left" : null,
"right" : {
"type" : "expression",
"value" : {
"op" : "d2b",
"left" : null,
"right" : {
"type" : "field",
"value" : ["scalars", "l3_fwd_tmp_2"]
}
}
}
}
},
"true_next" : "l3_fwd.l3_ipv4_fallback_table",
"false_next" : "node_22"
},
{
"name" : "node_22",
"id" : 6,
"source_info" : {
"filename" : "l3_fwd.p4",
"line" : 171,
"column" : 11,
"source_fragment" : "hdr.ipv4_base.ttl == 0"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "==",
"left" : {
"type" : "field",
"value" : ["ipv4_base", "ttl"]
},
"right" : {
"type" : "hexstr",
"value" : "0x00"
}
}
},
"true_next" : "tbl_act_7",
"false_next" : "punt.punt_table"
},
{
"name" : "node_25",
"id" : 7,
"source_info" : {
"filename" : "punt.p4",
"line" : 92,
"column" : 7,
"source_fragment" : "local_metadata.color != 0"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "!=",
"left" : {
"type" : "field",
"value" : ["scalars", "local_metadata_t.color"]
},
"right" : {
"type" : "hexstr",
"value" : "0x00"
}
}
},
"false_next" : null,
"true_next" : "tbl_act_8"
}
]
},
{
"name" : "egress",
"id" : 1,
"source_info" : {
"filename" : "tor.p4",
"line" : 31,
"column" : 8,
"source_fragment" : "egress_tor"
},
"init_table" : "node_29",
"tables" : [
{
"name" : "tbl_act_9",
"id" : 17,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [25],
"actions" : ["act_9"],
"base_default_next" : "node_31",
"next_tables" : {
"act_9" : "node_31"
},
"default_entry" : {
"action_id" : 25,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "tbl_act_10",
"id" : 18,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [26],
"actions" : ["act_10"],
"base_default_next" : "node_33",
"next_tables" : {
"act_10" : "node_33"
},
"default_entry" : {
"action_id" : 26,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "tbl_packetio_egress_encap_packet_in_header",
"id" : 19,
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [23],
"actions" : ["packetio_egress.encap_packet_in_header"],
"base_default_next" : "node_35",
"next_tables" : {
"packetio_egress.encap_packet_in_header" : "node_35"
},
"default_entry" : {
"action_id" : 23,
"action_const" : true,
"action_data" : [],
"action_entry_const" : true
}
},
{
"name" : "spoof_protection.dhcp_spoof_protection_table",
"id" : 20,
"source_info" : {
"filename" : "spoof_protection.p4",
"line" : 30,
"column" : 8,
"source_fragment" : "dhcp_spoof_protection_table"
},
"key" : [
{
"match_type" : "exact",
"target" : ["scalars", "local_metadata_t.l4_dst_port"],
"mask" : null
},
{
"match_type" : "exact",
"target" : ["standard_metadata", "egress_spec"],
"mask" : null
}
],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [24, 22],
"actions" : ["spoof_protection.drop_packet", "NoAction"],
"base_default_next" : null,
"next_tables" : {
"spoof_protection.drop_packet" : null,
"NoAction" : null
},
"default_entry" : {
"action_id" : 22,
"action_const" : false,
"action_data" : [],
"action_entry_const" : false
}
}
],
"action_profiles" : [],
"conditionals" : [
{
"name" : "node_29",
"id" : 8,
"source_info" : {
"filename" : "packetio.p4",
"line" : 55,
"column" : 8,
"source_fragment" : "standard_metadata.egress_port < 510"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "<",
"left" : {
"type" : "field",
"value" : ["standard_metadata", "egress_port"]
},
"right" : {
"type" : "hexstr",
"value" : "0x01fe"
}
}
},
"true_next" : "tbl_act_9",
"false_next" : "node_31"
},
{
"name" : "node_31",
"id" : 9,
"source_info" : {
"filename" : "packetio.p4",
"line" : 58,
"column" : 8,
"source_fragment" : "standard_metadata.ingress_port < 510"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "<",
"left" : {
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
},
"right" : {
"type" : "hexstr",
"value" : "0x01fe"
}
}
},
"true_next" : "tbl_act_10",
"false_next" : "node_33"
},
{
"name" : "node_33",
"id" : 10,
"source_info" : {
"filename" : "packetio.p4",
"line" : 63,
"column" : 8,
"source_fragment" : "standard_metadata.egress_port == 255"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "==",
"left" : {
"type" : "field",
"value" : ["standard_metadata", "egress_port"]
},
"right" : {
"type" : "hexstr",
"value" : "0x00ff"
}
}
},
"true_next" : "tbl_packetio_egress_encap_packet_in_header",
"false_next" : "node_35"
},
{
"name" : "node_35",
"id" : 11,
"source_info" : {
"filename" : "packetio.p4",
"line" : 66,
"column" : 8,
"source_fragment" : "local_metadata.skip_egress == 1"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "==",
"left" : {
"type" : "field",
"value" : ["scalars", "local_metadata_t.skip_egress"]
},
"right" : {
"type" : "hexstr",
"value" : "0x01"
}
}
},
"true_next" : null,
"false_next" : "node_36"
},
{
"name" : "node_36",
"id" : 12,
"source_info" : {
"filename" : "spoof_protection.p4",
"line" : 41,
"column" : 7,
"source_fragment" : "hdr.udp.isValid()"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "==",
"left" : {
"type" : "field",
"value" : ["udp", "$valid$"]
},
"right" : {
"type" : "hexstr",
"value" : "0x01"
}
}
},
"false_next" : null,
"true_next" : "spoof_protection.dhcp_spoof_protection_table"
}
]
}
],
"checksums" : [
{
"name" : "cksum",
"id" : 0,
"target" : ["ipv4_base", "hdr_checksum"],
"type" : "generic",
"calculation" : "calc"
}
],
"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"]
]
]
}