You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1606 lines
40 KiB

<
3 years ago
{
"header_types" : [
{
"name" : "scalars_0",
"id" : 0,
"fields" : [
["mac_tmp", 48, false],
["addr_tmp", 128, false],
["metadata.ingress_port", 9, false],
["metadata.task", 16, false],
["metadata.tcp_length", 16, false],
["metadata.cast_length", 32, false],
["metadata.do_cksum", 1, false],
["_padding_0", 6, 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],
["egress_global_timestamp", 48, false],
["lf_field_list", 32, false],
["mcast_grp", 16, false],
["resubmit_flag", 32, false],
["egress_rid", 16, false],
["checksum_error", 1, false],
["recirculate_flag", 32, false],
["parser_error", 32, false],
["_padding", 5, false]
]
},
{
"name" : "ethernet_t",
"id" : 2,
"fields" : [
["dst_addr", 48, false],
["src_addr", 48, false],
["ethertype", 16, false]
]
},
{
"name" : "ipv4_t",
"id" : 3,
"fields" : [
["version", 4, false],
["ihl", 4, false],
["diff_serv", 6, false],
["ecn", 2, false],
["totalLen", 16, false],
["identification", 16, false],
["flags", 3, false],
["fragOffset", 13, false],
["ttl", 8, false],
["protocol", 8, false],
["hdrChecksum", 16, false],
["src_addr", 32, false],
["dst_addr", 32, false]
]
},
{
"name" : "ipv6_t",
"id" : 4,
"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" : "tcp_t",
"id" : 5,
"fields" : [
["src_port", 16, false],
["dst_port", 16, false],
["seqNo", 32, true],
["ackNo", 32, true],
["data_offset", 4, false],
["res", 4, false],
["cwr", 1, false],
["ece", 1, false],
["urg", 1, false],
["ack", 1, false],
["psh", 1, false],
["rst", 1, false],
["syn", 1, false],
["fin", 1, false],
["window", 16, false],
["checksum", 16, false],
["urgentPtr", 16, false]
]
},
{
"name" : "udp_t",
"id" : 6,
"fields" : [
["src_port", 16, false],
["dst_port", 16, false],
["payload_length", 16, false],
["checksum", 16, false]
]
},
{
"name" : "icmp6_t",
"id" : 7,
"fields" : [
["type", 8, false],
["code", 8, false],
["checksum", 16, false]
]
},
{
"name" : "icmp_t",
"id" : 8,
"fields" : [
["type", 8, false],
["code", 8, false],
["checksum", 16, false],
["rest", 32, false]
]
},
{
"name" : "cpu_t",
"id" : 9,
"fields" : [
["task", 16, false],
["ingress_port", 16, false],
["ethertype", 16, 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" : "ipv6",
"id" : 4,
"header_type" : "ipv6_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
"id" : 5,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
"id" : 6,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp6",
"id" : 7,
"header_type" : "icmp6_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp",
"id" : 8,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "cpu",
"id" : 9,
"header_type" : "cpu_t",
"metadata" : false,
"pi_omit" : true
}
],
"header_stacks" : [],
"header_union_types" : [],
"header_unions" : [],
"header_union_stacks" : [],
"field_lists" : [
{
"id" : 1,
"name" : "fl",
"elements" : [
{
"type" : "field",
"value" : ["scalars", "metadata.ingress_port"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.task"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.tcp_length"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.cast_length"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.do_cksum"]
}
]
},
{
"id" : 2,
"name" : "fl_0",
"elements" : [
{
"type" : "field",
"value" : ["scalars", "metadata.ingress_port"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.task"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.tcp_length"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.cast_length"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.do_cksum"]
}
]
},
{
"id" : 3,
"name" : "fl_1",
"elements" : [
{
"type" : "field",
"value" : ["scalars", "metadata.ingress_port"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.task"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.tcp_length"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.cast_length"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.do_cksum"]
}
]
},
{
"id" : 4,
"name" : "fl_2",
"elements" : [
{
"type" : "field",
"value" : ["scalars", "metadata.ingress_port"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.task"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.tcp_length"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.cast_length"]
},
{
"type" : "field",
"value" : ["scalars", "metadata.do_cksum"]
}
]
}
],
"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" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "ethernet"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"type" : "hexstr",
"value" : "0x0800",
"mask" : null,
"next_state" : "ipv4"
},
{
"type" : "hexstr",
"value" : "0x86dd",
"mask" : null,
"next_state" : "ipv6"
},
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : [
{
"type" : "field",
"value" : ["ethernet", "ethertype"]
}
]
},
{
"name" : "ipv4",
"id" : 1,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "ipv4"
}
],
"op" : "extract"
},
{
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.tcp_length"]
},
{
"type" : "expression",
"value" : {
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "expression",
"value" : {
"op" : "+",
"left" : {
"type" : "field",
"value" : ["ipv4", "totalLen"]
},
"right" : {
"type" : "hexstr",
"value" : "0xffec"
}
}
},
"right" : {
"type" : "hexstr",
"value" : "0xffff"
}
}
}
}
],
"op" : "set"
}
],
"transitions" : [
{
"type" : "hexstr",
"value" : "0x06",
"mask" : null,
"next_state" : "tcp"
},
{
"type" : "hexstr",
"value" : "0x11",
"mask" : null,
"next_state" : "udp"
},
{
"type" : "hexstr",
"value" : "0x01",
"mask" : null,
"next_state" : "icmp"
},
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : [
{
"type" : "field",
"value" : ["ipv4", "protocol"]
}
]
},
{
"name" : "ipv6",
"id" : 2,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "ipv6"
}
],
"op" : "extract"
},
{
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.tcp_length"]
},
{
"type" : "field",
"value" : ["ipv6", "payload_length"]
}
],
"op" : "set"
}
],
"transitions" : [
{
"type" : "hexstr",
"value" : "0x06",
"mask" : null,
"next_state" : "tcp"
},
{
"type" : "hexstr",
"value" : "0x11",
"mask" : null,
"next_state" : "udp"
},
{
"type" : "hexstr",
"value" : "0x3a",
"mask" : null,
"next_state" : "icmp6"
},
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : [
{
"type" : "field",
"value" : ["ipv6", "next_header"]
}
]
},
{
"name" : "tcp",
"id" : 3,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "tcp"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "udp",
"id" : 4,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "udp"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "icmp6",
"id" : 5,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "icmp6"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
},
{
"name" : "icmp",
"id" : 6,
"parser_ops" : [
{
"parameters" : [
{
"type" : "regular",
"value" : "icmp"
}
],
"op" : "extract"
}
],
"transitions" : [
{
"value" : "default",
"mask" : null,
"next_state" : null
}
],
"transition_key" : []
}
]
}
],
"parse_vsets" : [],
"deparsers" : [
{
"name" : "deparser",
"id" : 0,
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/parsers.p4",
"line" : 76,
"column" : 8,
"source_fragment" : "MyDeparser"
},
"order" : ["ethernet", "cpu", "ipv4", "ipv6", "tcp", "udp", "icmp", "icmp6"]
}
],
"meter_arrays" : [],
"counter_arrays" : [],
"register_arrays" : [],
"calculations" : [
{
"name" : "calc",
"id" : 0,
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/checksums.p4",
"line" : 26,
"column" : 8,
"source_fragment" : "update_checksum_with_payload(meta.do_cksum == 1, ..."
},
"algo" : "csum16",
"input" : [
{
"type" : "field",
"value" : ["ipv6", "src_addr"]
},
{
"type" : "field",
"value" : ["ipv6", "dst_addr"]
},
{
"type" : "expression",
"value" : {
"op" : "&",
"left" : {
"type" : "field",
"value" : ["ipv6", "payload_length"]
},
"right" : {
"type" : "hexstr",
"value" : "0xffffffff",
"bitwidth" : 32
}
}
},
{
"type" : "hexstr",
"value" : "0x000000",
"bitwidth" : 24
},
{
"type" : "hexstr",
"value" : "0x3a",
"bitwidth" : 8
},
{
"type" : "payload",
"value" : null
}
]
}
],
"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" : "MyIngress.set_egress_port",
"id" : 3,
"runtime_data" : [
{
"name" : "out_port",
"bitwidth" : 9
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 26,
"column" : 8,
"source_fragment" : "standard_metadata.egress_spec = out_port"
}
}
]
},
{
"name" : "MyIngress.set_egress_port",
"id" : 4,
"runtime_data" : [
{
"name" : "out_port",
"bitwidth" : 9
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["standard_metadata", "egress_spec"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 26,
"column" : 8,
"source_fragment" : "standard_metadata.egress_spec = out_port"
}
}
]
},
{
"name" : "MyIngress.controller_debug",
"id" : 5,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.task"]
},
{
"type" : "hexstr",
"value" : "0x0003"
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/headers.p4",
"line" : 37,
"column" : 26,
"source_fragment" : "3; ..."
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.ingress_port"]
},
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 31,
"column" : 8,
"source_fragment" : "meta.ingress_port = standard_metadata.ingress_port"
}
},
{
"op" : "clone_ingress_pkt_to_egress",
"parameters" : [
{
"type" : "hexstr",
"value" : "0x00000064"
},
{
"type" : "hexstr",
"value" : "0x1"
}
]
}
]
},
{
"name" : "MyIngress.controller_debug",
"id" : 6,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.task"]
},
{
"type" : "hexstr",
"value" : "0x0003"
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/headers.p4",
"line" : 37,
"column" : 26,
"source_fragment" : "3; ..."
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.ingress_port"]
},
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 31,
"column" : 8,
"source_fragment" : "meta.ingress_port = standard_metadata.ingress_port"
}
},
{
"op" : "clone_ingress_pkt_to_egress",
"parameters" : [
{
"type" : "hexstr",
"value" : "0x00000064"
},
{
"type" : "hexstr",
"value" : "0x2"
}
]
}
]
},
{
"name" : "MyIngress.controller_reply",
"id" : 7,
"runtime_data" : [
{
"name" : "task",
"bitwidth" : 16
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.task"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 36,
"column" : 8,
"source_fragment" : "meta.task = task"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.ingress_port"]
},
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 37,
"column" : 8,
"source_fragment" : "meta.ingress_port = standard_metadata.ingress_port"
}
},
{
"op" : "clone_ingress_pkt_to_egress",
"parameters" : [
{
"type" : "hexstr",
"value" : "0x00000064"
},
{
"type" : "hexstr",
"value" : "0x3"
}
]
}
]
},
{
"name" : "MyIngress.controller_reply",
"id" : 8,
"runtime_data" : [
{
"name" : "task",
"bitwidth" : 16
}
],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.task"]
},
{
"type" : "runtime_data",
"value" : 0
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 36,
"column" : 8,
"source_fragment" : "meta.task = task"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.ingress_port"]
},
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 37,
"column" : 8,
"source_fragment" : "meta.ingress_port = standard_metadata.ingress_port"
}
},
{
"op" : "clone_ingress_pkt_to_egress",
"parameters" : [
{
"type" : "hexstr",
"value" : "0x00000064"
},
{
"type" : "hexstr",
"value" : "0x4"
}
]
}
]
},
{
"name" : "MyIngress.icmp6_echo_reply",
"id" : 9,
"runtime_data" : [],
"primitives" : [
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "mac_tmp"]
},
{
"type" : "field",
"value" : ["ethernet", "dst_addr"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 55,
"column" : 8,
"source_fragment" : "mac_addr_t mac_tmp = hdr.ethernet.dst_addr;"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ethernet", "dst_addr"]
},
{
"type" : "field",
"value" : ["ethernet", "src_addr"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 56,
"column" : 8,
"source_fragment" : "hdr.ethernet.dst_addr = hdr.ethernet.src_addr"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ethernet", "src_addr"]
},
{
"type" : "field",
"value" : ["scalars", "mac_tmp"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 57,
"column" : 8,
"source_fragment" : "hdr.ethernet.src_addr = mac_tmp"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "addr_tmp"]
},
{
"type" : "field",
"value" : ["ipv6", "dst_addr"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 59,
"column" : 8,
"source_fragment" : "ipv6_addr_t addr_tmp = hdr.ipv6.dst_addr;"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ipv6", "dst_addr"]
},
{
"type" : "field",
"value" : ["ipv6", "src_addr"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 60,
"column" : 8,
"source_fragment" : "hdr.ipv6.dst_addr = hdr.ipv6.src_addr"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["ipv6", "src_addr"]
},
{
"type" : "field",
"value" : ["scalars", "addr_tmp"]
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/static-mapping.p4",
"line" : 61,
"column" : 8,
"source_fragment" : "hdr.ipv6.src_addr = addr_tmp"
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["icmp6", "type"]
},
{
"type" : "hexstr",
"value" : "0x81"
}
],
"source_info" : {
"filename" : "../p4debug/bug2-cast-in-checksum/headers.p4",
"line" : 30,
"column" : 32,
"source_fragment" : "129; ..."
}
},
{
"op" : "assign",
"parameters" : [
{
"type" : "field",
"value" : ["scalars", "metadata.do_cksum"]