blob: 4490c1812dcde5a8812e743c660ae26e15e36859 [file] [log] [blame]
{
"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" : "ethernet_t",
"id" : 1,
"fields" : [
["dstAddr", 48, false],
["srcAddr", 48, false],
["etherType", 16, false]
]
},
{
"name" : "ipv4_t",
"id" : 2,
"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" : 3,
"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" : 4,
"fields" : [
["srcPort", 16, false],
["dstPort", 16, false],
["length_", 16, false],
["checksum", 16, false]
]
},
{
"name" : "intrinsic_metadata_t",
"id" : 5,
"fields" : [
["ingress_global_timestamp", 32, false],
["lf_field_list", 32, false],
["mcast_grp", 16, false],
["egress_rid", 16, false]
]
},
{
"name" : "standard_metadata",
"id" : 6,
"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",
"id" : 3,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
"id" : 4,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
"id" : 5,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "intrinsic_metadata",
"id" : 6,
"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_ethernet",
"id" : 0,
"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"]
}
]
},
{
"name" : "parse_ipv4",
"id" : 1,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "ipv4"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"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" : ["ipv4", "fragOffset"]
},
{
"type" : "field",
"value" : ["ipv4", "protocol"]
}
]
},
{
"name" : "parse_tcp",
"id" : 2,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "tcp"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "parse_udp",
"id" : 3,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "udp"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "start",
"id" : 4,
"parser_ops" : [],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : "parse_ethernet"
}
],
"transition_key" : []
}
]
}
],
"deparsers" : [
{
"name" : "deparser",
"id" : 0,
"order" : ["ethernet", "ipv4", "udp", "tcp"]
}
],
"meter_arrays" : [],
"counter_arrays" : [
{
"name" : "table0_counter",
"id" : 0,
"is_direct" : true,
"binding" : "table0"
},
{
"name" : "egress_port_counter",
"id" : 1,
"size" : 254,
"is_direct" : false
},
{
"name" : "ingress_port_counter",
"id" : 2,
"size" : 254,
"is_direct" : false
}
],
"register_arrays" : [],
"calculations" : [],
"learn_lists" : [],
"actions" : [
{
"name" : "NoAction",
"id" : 0,
"runtime_data" : [],
"primitives" : []
},
{
"name" : "NoAction",
"id" : 1,
"runtime_data" : [],
"primitives" : []
},
{
"name" : "set_egress_port",
"id" : 2,
"runtime_data" : [
{
"name" : "port",
"bitwidth" : 9
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "include/actions.p4",
"line" : 1,
"column" : 23,
"source_fragment" : "port) { ..."
}
}
]
},
{
"name" : "send_to_cpu",
"id" : 3,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "hexstr",
"value" : "0x00ff"
}
],
"source_info" : {
"filename" : "include/actions.p4",
"line" : 10,
"column" : 4,
"source_fragment" : "modify_field(standard_metadata.egress_spec, 255)"
}
}
]
},
{
"name" : "drop",
"id" : 4,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "hexstr",
"value" : "0x01ff"
}
],
"source_info" : {
"filename" : "include/actions.p4",
"line" : 6,
"column" : 4,
"source_fragment" : "modify_field(standard_metadata.egress_spec, 511)"
}
}
]
},
{
"name" : "count_packet",
"id" : 5,
"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" : "ingress_port_counter"
},
{
"type" : "field",
"value" : ["scalars", "tmp"]
}
],
"source_info" : {
"filename" : "include/port_counters.p4",
"line" : 20,
"column" : 4,
"source_fragment" : "count(ingress_port_counter, 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" : "egress_port_counter"
},
{
"type" : "field",
"value" : ["scalars", "tmp_0"]
}
],
"source_info" : {
"filename" : "include/port_counters.p4",
"line" : 21,
"column" : 4,
"source_fragment" : "count(egress_port_counter, standard_metadata.egress_spec)"
}
}
]
}
],
"pipelines" : [
{
"name" : "ingress",
"id" : 0,
"init_table" : "table0",
"tables" : [
{
"name" : "table0",
"id" : 0,
"source_info" : {
"filename" : "default.p4",
"line" : 7,
"column" : 0,
"source_fragment" : "table 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,
"with_counters" : true,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [2, 3, 4, 0],
"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" : 0,
"action_const" : false,
"action_data" : [],
"action_entry_const" : false
}
},
{
"name" : "port_count_table",
"id" : 1,
"source_info" : {
"filename" : "include/port_counters.p4",
"line" : 13,
"column" : 0,
"source_fragment" : "table port_count_table { ..."
},
"key" : [],
"match_type" : "exact",
"type" : "simple",
"max_size" : 1024,
"with_counters" : false,
"support_timeout" : false,
"direct_meters" : null,
"action_ids" : [5, 1],
"actions" : ["count_packet", "NoAction"],
"base_default_next" : null,
"next_tables" : {
"count_packet" : null,
"NoAction" : null
},
"default_entry" : {
"action_id" : 1,
"action_const" : false,
"action_data" : [],
"action_entry_const" : false
}
}
],
"action_profiles" : [],
"conditionals" : [
{
"name" : "node_3",
"id" : 0,
"source_info" : {
"filename" : "include/port_counters.p4",
"line" : 26,
"column" : 35,
"source_fragment" : "<"
},
"expression" : {
"type" : "expression",
"value" : {
"op" : "<",
"left" : {
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
"right" : {
"type" : "hexstr",
"value" : "0x00fe"
}
}
},
"false_next" : null,
"true_next" : "port_count_table"
}
]
},
{
"name" : "egress",
"id" : 1,
"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"]
]
]
}