blob: 0ac74cce4bc7232b9c2397c5c8ffbaa2bdf1deea [file] [log] [blame]
{
"__meta__": {
"version": [
2,
5
],
"compiler": "https://github.com/p4lang/p4c-bm"
},
"header_types": [
{
"name": "standard_metadata_t",
"id": 0,
"fields": [
[
"ingress_port",
9
],
[
"packet_length",
32
],
[
"egress_spec",
9
],
[
"egress_port",
9
],
[
"egress_instance",
32
],
[
"instance_type",
32
],
[
"clone_spec",
32
],
[
"_padding",
5
]
],
"length_exp": null,
"max_length": null
},
{
"name": "ingress_intrinsic_metadata_t",
"id": 1,
"fields": [
[
"resubmit_flag",
1
],
[
"_pad1",
1
],
[
"_pad2",
2
],
[
"_pad3",
3
],
[
"ingress_port",
9
],
[
"ingress_mac_tstamp",
48
]
],
"length_exp": null,
"max_length": null
},
{
"name": "ingress_intrinsic_metadata_for_tm_t",
"id": 2,
"fields": [
[
"_pad1",
7
],
[
"ucast_egress_port",
9
],
[
"drop_ctl",
3
],
[
"bypass_egress",
1
],
[
"deflect_on_drop",
1
],
[
"ingress_cos",
3
],
[
"qid",
5
],
[
"icos_for_copy_to_cpu",
3
],
[
"_pad2",
3
],
[
"copy_to_cpu",
1
],
[
"packet_color",
2
],
[
"disable_ucast_cutthru",
1
],
[
"enable_mcast_cutthru",
1
],
[
"mcast_grp_a",
16
],
[
"mcast_grp_b",
16
],
[
"_pad3",
3
],
[
"level1_mcast_hash",
13
],
[
"_pad4",
3
],
[
"level2_mcast_hash",
13
],
[
"level1_exclusion_id",
16
],
[
"_pad5",
7
],
[
"level2_exclusion_id",
9
],
[
"rid",
16
]
],
"length_exp": null,
"max_length": null
},
{
"name": "ingress_intrinsic_metadata_for_mirror_buffer_t",
"id": 3,
"fields": [
[
"_pad1",
6
],
[
"ingress_mirror_id",
10
]
],
"length_exp": null,
"max_length": null
},
{
"name": "egress_intrinsic_metadata_t",
"id": 4,
"fields": [
[
"_pad0",
7
],
[
"egress_port",
9
],
[
"_pad1",
5
],
[
"enq_qdepth",
19
],
[
"_pad2",
6
],
[
"enq_congest_stat",
2
],
[
"enq_tstamp",
32
],
[
"_pad3",
5
],
[
"deq_qdepth",
19
],
[
"_pad4",
6
],
[
"deq_congest_stat",
2
],
[
"app_pool_congest_stat",
8
],
[
"deq_timedelta",
32
],
[
"egress_rid",
16
],
[
"_pad5",
7
],
[
"egress_rid_first",
1
],
[
"_pad6",
3
],
[
"egress_qid",
5
],
[
"_pad7",
5
],
[
"egress_cos",
3
],
[
"_pad8",
7
],
[
"deflection_flag",
1
],
[
"pkt_length",
16
]
],
"length_exp": null,
"max_length": null
},
{
"name": "egress_intrinsic_metadata_for_mirror_buffer_t",
"id": 5,
"fields": [
[
"_pad1",
6
],
[
"egress_mirror_id",
10
],
[
"coalesce_flush",
1
],
[
"coalesce_length",
7
]
],
"length_exp": null,
"max_length": null
},
{
"name": "egress_intrinsic_metadata_for_output_port_t",
"id": 6,
"fields": [
[
"_pad1",
2
],
[
"capture_tstamp_on_tx",
1
],
[
"update_delay_on_tx",
1
],
[
"force_tx_error",
1
],
[
"drop_ctl",
3
]
],
"length_exp": null,
"max_length": null
},
{
"name": "packet_in_t",
"id": 7,
"fields": [
[
"ingress_port",
9
],
[
"_padding",
7
]
],
"length_exp": null,
"max_length": null
},
{
"name": "packet_out_t",
"id": 8,
"fields": [
[
"egress_port",
9
],
[
"_padding",
7
]
],
"length_exp": null,
"max_length": null
},
{
"name": "ethernet_t",
"id": 9,
"fields": [
[
"dstAddr",
48
],
[
"srcAddr",
48
],
[
"etherType",
16
]
],
"length_exp": null,
"max_length": null
},
{
"name": "ipv4_t",
"id": 10,
"fields": [
[
"version",
4
],
[
"ihl",
4
],
[
"diffserv",
8
],
[
"totalLen",
16
],
[
"identification",
16
],
[
"flags",
3
],
[
"fragOffset",
13
],
[
"ttl",
8
],
[
"protocol",
8
],
[
"hdrChecksum",
16
],
[
"srcAddr",
32
],
[
"dstAddr",
32
]
],
"length_exp": null,
"max_length": null
},
{
"name": "tcp_t",
"id": 11,
"fields": [
[
"srcPort",
16
],
[
"dstPort",
16
],
[
"seqNo",
32
],
[
"ackNo",
32
],
[
"dataOffset",
4
],
[
"res",
3
],
[
"ecn",
3
],
[
"ctrl",
6
],
[
"window",
16
],
[
"checksum",
16
],
[
"urgentPtr",
16
]
],
"length_exp": null,
"max_length": null
},
{
"name": "udp_t",
"id": 12,
"fields": [
[
"srcPort",
16
],
[
"dstPort",
16
],
[
"length_",
16
],
[
"checksum",
16
]
],
"length_exp": null,
"max_length": null
}
],
"headers": [
{
"name": "standard_metadata",
"id": 0,
"header_type": "standard_metadata_t",
"metadata": true
},
{
"name": "ig_intr_md",
"id": 1,
"header_type": "ingress_intrinsic_metadata_t",
"metadata": false
},
{
"name": "ig_intr_md_for_tm",
"id": 2,
"header_type": "ingress_intrinsic_metadata_for_tm_t",
"metadata": false
},
{
"name": "ig_intr_md_for_mb",
"id": 3,
"header_type": "ingress_intrinsic_metadata_for_mirror_buffer_t",
"metadata": false
},
{
"name": "eg_intr_md",
"id": 4,
"header_type": "egress_intrinsic_metadata_t",
"metadata": false
},
{
"name": "eg_intr_md_for_mb",
"id": 5,
"header_type": "egress_intrinsic_metadata_for_mirror_buffer_t",
"metadata": false
},
{
"name": "eg_intr_md_for_oport",
"id": 6,
"header_type": "egress_intrinsic_metadata_for_output_port_t",
"metadata": false
},
{
"name": "packet_in_hdr",
"id": 7,
"header_type": "packet_in_t",
"metadata": false
},
{
"name": "packet_out_hdr",
"id": 8,
"header_type": "packet_out_t",
"metadata": false
},
{
"name": "ethernet",
"id": 9,
"header_type": "ethernet_t",
"metadata": false
},
{
"name": "ipv4",
"id": 10,
"header_type": "ipv4_t",
"metadata": false
},
{
"name": "tcp",
"id": 11,
"header_type": "tcp_t",
"metadata": false
},
{
"name": "udp",
"id": 12,
"header_type": "udp_t",
"metadata": false
}
],
"header_stacks": [],
"parsers": [
{
"name": "parser",
"id": 0,
"init_state": "start",
"parse_states": [
{
"name": "start",
"id": 0,
"parser_ops": [],
"transition_key": [
{
"type": "lookahead",
"value": [
96,
8
]
}
],
"transitions": [
{
"type": "hexstr",
"value": "0x00",
"mask": null,
"next_state": "parse_pkt_in"
},
{
"type": "default",
"value": null,
"mask": null,
"next_state": "default_parser"
}
]
},
{
"name": "parse_pkt_in",
"id": 1,
"parser_ops": [
{
"op": "extract",
"parameters": [
{
"type": "regular",
"value": "packet_in_hdr"
}
]
}
],
"transition_key": [],
"transitions": [
{
"type": "default",
"value": null,
"mask": null,
"next_state": "parse_ethernet"
}
]
},
{
"name": "parse_ethernet",
"id": 2,
"parser_ops": [
{
"op": "extract",
"parameters": [
{
"type": "regular",
"value": "ethernet"
}
]
}
],
"transition_key": [
{
"type": "field",
"value": [
"ethernet",
"etherType"
]
}
],
"transitions": [
{
"type": "hexstr",
"value": "0x0800",
"mask": null,
"next_state": "parse_ipv4"
},
{
"type": "default",
"value": null,
"mask": null,
"next_state": null
}
]
},
{
"name": "parse_ipv4",
"id": 3,
"parser_ops": [
{
"op": "extract",
"parameters": [
{
"type": "regular",
"value": "ipv4"
}
]
}
],
"transition_key": [
{
"type": "field",
"value": [
"ipv4",
"fragOffset"
]
},
{
"type": "field",
"value": [
"ipv4",
"protocol"
]
}
],
"transitions": [
{
"type": "hexstr",
"value": "0x000006",
"mask": null,
"next_state": "parse_tcp"
},
{
"type": "hexstr",
"value": "0x000011",
"mask": null,
"next_state": "parse_udp"
},
{
"type": "default",
"value": null,
"mask": null,
"next_state": null
}
]
},
{
"name": "parse_tcp",
"id": 4,
"parser_ops": [
{
"op": "extract",
"parameters": [
{
"type": "regular",
"value": "tcp"
}
]
}
],
"transition_key": [],
"transitions": [
{
"type": "default",
"value": null,
"mask": null,
"next_state": null
}
]
},
{
"name": "parse_udp",
"id": 5,
"parser_ops": [
{
"op": "extract",
"parameters": [
{
"type": "regular",
"value": "udp"
}
]
}
],
"transition_key": [],
"transitions": [
{
"type": "default",
"value": null,
"mask": null,
"next_state": null
}
]
},
{
"name": "default_parser",
"id": 6,
"parser_ops": [],
"transition_key": [
{
"type": "field",
"value": [
"ig_intr_md",
"ingress_port"
]
}
],
"transitions": [
{
"type": "hexstr",
"value": "0x00ff",
"mask": null,
"next_state": "parse_pkt_out"
},
{
"type": "default",
"value": null,
"mask": null,
"next_state": "parse_ethernet"
}
]
},
{
"name": "parse_pkt_out",
"id": 7,
"parser_ops": [
{
"op": "extract",
"parameters": [
{
"type": "regular",
"value": "packet_out_hdr"
}
]
}
],
"transition_key": [],
"transitions": [
{
"type": "default",
"value": null,
"mask": null,
"next_state": "parse_ethernet"
}
]
}
]
}
],
"parse_vsets": [],
"deparsers": [
{
"name": "deparser",
"id": 0,
"order": [
"packet_in_hdr",
"packet_out_hdr",
"ethernet",
"ipv4",
"tcp",
"udp"
]
}
],
"meter_arrays": [],
"actions": [
{
"name": "add_packet_in_hdr",
"id": 0,
"runtime_data": [],
"primitives": [
{
"op": "add_header",
"parameters": [
{
"type": "header",
"value": "packet_in_hdr"
}
]
},
{
"op": "modify_field",
"parameters": [
{
"type": "field",
"value": [
"packet_in_hdr",
"ingress_port"
]
},
{
"type": "field",
"value": [
"ig_intr_md",
"ingress_port"
]
}
]
}
]
},
{
"name": "send_to_cpu",
"id": 1,
"runtime_data": [],
"primitives": [
{
"op": "modify_field",
"parameters": [
{
"type": "field",
"value": [
"ig_intr_md_for_tm",
"copy_to_cpu"
]
},
{
"type": "hexstr",
"value": "0x1"
}
]
}
]
},
{
"name": "_drop",
"id": 2,
"runtime_data": [],
"primitives": [
{
"op": "drop",
"parameters": []
}
]
},
{
"name": "_packet_out",
"id": 3,
"runtime_data": [],
"primitives": [
{
"op": "modify_field",
"parameters": [
{
"type": "field",
"value": [
"ig_intr_md_for_tm",
"ucast_egress_port"
]
},
{
"type": "field",
"value": [
"packet_out_hdr",
"egress_port"
]
}
]
},
{
"op": "remove_header",
"parameters": [
{
"type": "header",
"value": "packet_out_hdr"
}
]
}
]
},
{
"name": "count_ingress",
"id": 4,
"runtime_data": [],
"primitives": [
{
"op": "count",
"parameters": [
{
"type": "counter_array",
"value": "ingress_port_counter"
},
{
"type": "field",
"value": [
"ig_intr_md",
"ingress_port"
]
}
]
}
]
},
{
"name": "count_egress",
"id": 5,
"runtime_data": [],
"primitives": [
{
"op": "count",
"parameters": [
{
"type": "counter_array",
"value": "egress_port_counter"
},
{
"type": "field",
"value": [
"ig_intr_md_for_tm",
"ucast_egress_port"
]
}
]
}
]
},
{
"name": "set_egress_port",
"id": 6,
"runtime_data": [
{
"name": "port",
"bitwidth": 9
}
],
"primitives": [
{
"op": "modify_field",
"parameters": [
{
"type": "field",
"value": [
"ig_intr_md_for_tm",
"ucast_egress_port"
]
},
{
"type": "runtime_data",
"value": 0
}
]
}
]
}
],
"pipelines": [
{
"name": "ingress",
"id": 0,
"init_table": "_condition_0",
"tables": [
{
"name": "ingress_port_count_table",
"id": 0,
"match_type": "exact",
"type": "simple",
"max_size": 16384,
"with_counters": false,
"direct_meters": null,
"support_timeout": false,
"key": [],
"actions": [
"count_ingress"
],
"next_tables": {
"count_ingress": "egress_port_count_table"
},
"default_entry": {
"action_id": 4,
"action_const": true
},
"base_default_next": "egress_port_count_table"
},
{
"name": "egress_port_count_table",
"id": 1,
"match_type": "exact",
"type": "simple",
"max_size": 16384,
"with_counters": false,
"direct_meters": null,
"support_timeout": false,
"key": [],
"actions": [
"count_egress"
],
"next_tables": {
"count_egress": null
},
"default_entry": {
"action_id": 5,
"action_const": true
},
"base_default_next": null
},
{
"name": "ingress_pkt",
"id": 2,
"match_type": "exact",
"type": "simple",
"max_size": 16384,
"with_counters": false,
"direct_meters": null,
"support_timeout": false,
"key": [],
"actions": [
"_packet_out"
],
"next_tables": {
"_packet_out": "_condition_1"
},
"default_entry": {
"action_id": 3,
"action_const": true,
"action_data": [],
"action_entry_const": false
},
"base_default_next": "_condition_1"
},
{
"name": "table0",
"id": 3,
"match_type": "ternary",
"type": "simple",
"max_size": 16384,
"with_counters": true,
"direct_meters": null,
"support_timeout": true,
"key": [
{
"match_type": "ternary",
"target": [
"ig_intr_md",
"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
}
],
"actions": [
"set_egress_port",
"send_to_cpu",
"_drop"
],
"next_tables": {
"set_egress_port": "_condition_2",
"send_to_cpu": "_condition_2",
"_drop": "_condition_2"
},
"base_default_next": "_condition_2"
}
],
"action_profiles": [],
"conditionals": [
{
"name": "_condition_0",
"id": 0,
"expression": {
"type": "expression",
"value": {
"op": "valid",
"left": null,
"right": {
"type": "header",
"value": "packet_out_hdr"
}
}
},
"true_next": "ingress_pkt",
"false_next": "_condition_1"
},
{
"name": "_condition_1",
"id": 1,
"expression": {
"type": "expression",
"value": {
"op": "not",
"left": null,
"right": {
"type": "expression",
"value": {
"op": "valid",
"left": null,
"right": {
"type": "header",
"value": "packet_out_hdr"
}
}
}
}
},
"true_next": "table0",
"false_next": "_condition_2"
},
{
"name": "_condition_2",
"id": 2,
"expression": {
"type": "expression",
"value": {
"op": "<",
"left": {
"type": "field",
"value": [
"ig_intr_md_for_tm",
"ucast_egress_port"
]
},
"right": {
"type": "hexstr",
"value": "0xfe"
}
}
},
"true_next": "ingress_port_count_table",
"false_next": null
}
]
},
{
"name": "egress",
"id": 1,
"init_table": "_condition_3",
"tables": [
{
"name": "egress_pkt",
"id": 4,
"match_type": "exact",
"type": "simple",
"max_size": 16384,
"with_counters": false,
"direct_meters": null,
"support_timeout": false,
"key": [],
"actions": [
"add_packet_in_hdr"
],
"next_tables": {
"add_packet_in_hdr": null
},
"default_entry": {
"action_id": 0,
"action_const": true,
"action_data": [],
"action_entry_const": false
},
"base_default_next": null
}
],
"action_profiles": [],
"conditionals": [
{
"name": "_condition_3",
"id": 3,
"expression": {
"type": "expression",
"value": {
"op": "==",
"left": {
"type": "field",
"value": [
"ig_intr_md_for_tm",
"copy_to_cpu"
]
},
"right": {
"type": "hexstr",
"value": "0x1"
}
}
},
"true_next": "egress_pkt",
"false_next": null
}
]
}
],
"calculations": [],
"checksums": [],
"learn_lists": [],
"field_lists": [],
"counter_arrays": [
{
"name": "ingress_port_counter",
"id": 0,
"is_direct": false,
"size": 254
},
{
"name": "egress_port_counter",
"id": 1,
"is_direct": false,
"size": 254
},
{
"name": "table0_counter",
"id": 2,
"is_direct": true,
"binding": "table0",
"size": null
}
],
"register_arrays": [],
"force_arith": [
[
"standard_metadata",
"ingress_port"
],
[
"standard_metadata",
"packet_length"
],
[
"standard_metadata",
"egress_spec"
],
[
"standard_metadata",
"egress_port"
],
[
"standard_metadata",
"egress_instance"
],
[
"standard_metadata",
"instance_type"
],
[
"standard_metadata",
"clone_spec"
],
[
"standard_metadata",
"_padding"
]
],
"extern_instances": []
}