diff --git a/progs/default/default.json b/progs/default/default.json new file mode 100644 index 0000000..9e0d1f7 --- /dev/null +++ b/progs/default/default.json @@ -0,0 +1,123 @@ +{ + "program" : "default.p4", + "__meta__" : { + "version" : [2, 0], + "compiler" : "p4c-vitisnet" + }, + "header_types" : [ + { + "name" : "scalars_0", + "id" : 0, + "is_struct" : false, + "fields" : [] + }, + { + "name" : "standard_metadata_t", + "id" : 1, + "is_struct" : true, + "fields" : [ + ["drop", 1, false], + ["ingress_timestamp", 64, false], + ["parsed_bytes", 16, false], + ["parser_error", 3, false], + ["_padding", 4, false] + ] + } + ], + "headers" : [ + { + "name" : "scalars", + "id" : 0, + "header_type" : "scalars_0", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "standard_metadata_t", + "id" : 1, + "header_type" : "standard_metadata_t", + "metadata" : true, + "pi_omit" : true + } + ], + "header_stacks" : [], + "header_union_types" : [], + "header_unions" : [], + "header_union_stacks" : [], + "field_lists" : [], + "errors" : [ + ["NoError", 0], + ["PacketTooShort", 1], + ["NoMatch", 2], + ["StackOutOfBounds", 3], + ["HeaderTooShort", 4], + ["ParserTimeout", 5], + ["HeaderDepthLimitExceeded", 6] + ], + "enums" : [], + "parsers" : [ + { + "name" : "parser", + "id" : 0, + "init_state" : "start", + "parse_states" : [ + { + "name" : "start", + "id" : 0, + "parser_ops" : [], + "transitions" : [ + { + "value" : "default", + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "default.p4", + "line" : 100, + "column" : 8, + "source_fragment" : "NullDeparser" + }, + "start" : null, + "emits" : [], + "conditionals" : [] + } + ], + "meter_arrays" : [], + "counter_arrays" : [], + "register_arrays" : [], + "calculations" : [], + "learn_lists" : [], + "actions" : [], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "default.p4", + "line" : 88, + "column" : 8, + "source_fragment" : "NullProcessing" + }, + "init_table" : null, + "tables" : [], + "action_profiles" : [], + "conditionals" : [] + } + ], + "checksums" : [], + "internet_checksums" : [], + "force_arith" : [], + "extern_instances" : [], + "field_aliases" : [] +} \ No newline at end of file diff --git a/progs/default/traffic_in.pcap b/progs/default/traffic_in.pcap new file mode 100644 index 0000000..e952a6a Binary files /dev/null and b/progs/default/traffic_in.pcap differ diff --git a/progs/default/traffic_out.meta b/progs/default/traffic_out.meta new file mode 100644 index 0000000..4d3a61f --- /dev/null +++ b/progs/default/traffic_out.meta @@ -0,0 +1,50 @@ +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; diff --git a/progs/default/traffic_out.pcap b/progs/default/traffic_out.pcap new file mode 100644 index 0000000..0da422e Binary files /dev/null and b/progs/default/traffic_out.pcap differ diff --git a/progs/default/traffic_out.user b/progs/default/traffic_out.user new file mode 100644 index 0000000..ea682c7 --- /dev/null +++ b/progs/default/traffic_out.user @@ -0,0 +1,4 @@ +% Packet 1 (1 bytes) +00 +; + diff --git a/progs/five_tuple/fiveTuple.json b/progs/five_tuple/fiveTuple.json new file mode 100644 index 0000000..7c04ed8 --- /dev/null +++ b/progs/five_tuple/fiveTuple.json @@ -0,0 +1,1431 @@ +{ + "program" : "fiveTuple.p4", + "__meta__" : { + "version" : [2, 0], + "compiler" : "p4c-vitisnet" + }, + "header_types" : [ + { + "name" : "scalars_0", + "id" : 0, + "is_struct" : false, + "fields" : [ + ["tmp", 1, false], + ["tmp_0", 32, false], + ["tmp_3", 1, false], + ["tmp_4", 32, false], + ["table_key_sport", 16, false], + ["table_key_dport", 16, false], + ["hit", 1, false], + ["_padding", 5, false] + ] + }, + { + "name" : "standard_metadata_t", + "id" : 1, + "is_struct" : true, + "fields" : [ + ["drop", 1, false], + ["ingress_timestamp", 64, false], + ["parsed_bytes", 16, false], + ["parser_error", 4, false], + ["_padding_0", 3, false] + ] + }, + { + "name" : "eth_mac_t", + "id" : 2, + "is_struct" : false, + "fields" : [ + ["dmac", 48, false], + ["smac", 48, false], + ["type", 16, false] + ] + }, + { + "name" : "vlan_t", + "id" : 3, + "is_struct" : false, + "fields" : [ + ["pcp", 3, false], + ["cfi", 1, false], + ["vid", 12, false], + ["tpid", 16, false] + ] + }, + { + "name" : "ipv4_t", + "id" : 4, + "is_struct" : false, + "fields" : [ + ["version", 4, false], + ["hdr_len", 4, false], + ["tos", 8, false], + ["length", 16, false], + ["id", 16, false], + ["flags", 3, false], + ["offset", 13, false], + ["ttl", 8, false], + ["protocol", 8, false], + ["hdr_chk", 16, false], + ["src", 32, false], + ["dst", 32, false] + ] + }, + { + "name" : "ipv4_opt_t", + "id" : 5, + "is_struct" : false, + "fields" : [ + ["options", "*"] + ], + "max_length" : 40 + }, + { + "name" : "tcp_t", + "id" : 6, + "is_struct" : false, + "fields" : [ + ["src_port", 16, false], + ["dst_port", 16, false], + ["seqNum", 32, false], + ["ackNum", 32, false], + ["dataOffset", 4, false], + ["resv", 6, false], + ["flags", 6, false], + ["window", 16, false], + ["checksum", 16, false], + ["urgPtr", 16, false] + ] + }, + { + "name" : "tcp_opt_t", + "id" : 7, + "is_struct" : false, + "fields" : [ + ["options", "*"] + ], + "max_length" : 40 + }, + { + "name" : "udp_t", + "id" : 8, + "is_struct" : false, + "fields" : [ + ["src_port", 16, false], + ["dst_port", 16, false], + ["length", 16, false], + ["checksum", 16, false] + ] + } + ], + "headers" : [ + { + "name" : "scalars", + "id" : 0, + "header_type" : "scalars_0", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "standard_metadata_t", + "id" : 1, + "header_type" : "standard_metadata_t", + "metadata" : true, + "pi_omit" : true + }, + { + "name" : "eth", + "id" : 2, + "header_type" : "eth_mac_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "new_vlan", + "id" : 3, + "header_type" : "vlan_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "vlan", + "id" : 4, + "header_type" : "vlan_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "ipv4", + "id" : 5, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "ipv4opt", + "id" : 6, + "header_type" : "ipv4_opt_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "tcp", + "id" : 7, + "header_type" : "tcp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "tcpopt", + "id" : 8, + "header_type" : "tcp_opt_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "udp", + "id" : 9, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + } + ], + "header_stacks" : [], + "header_union_types" : [], + "header_unions" : [], + "header_union_stacks" : [], + "field_lists" : [], + "errors" : [ + ["NoError", 0], + ["PacketTooShort", 1], + ["NoMatch", 2], + ["StackOutOfBounds", 3], + ["HeaderTooShort", 4], + ["ParserTimeout", 5], + ["HeaderDepthLimitExceeded", 6], + ["InvalidIPpacket", 7], + ["InvalidTCPpacket", 8] + ], + "enums" : [], + "parsers" : [ + { + "name" : "parser", + "id" : 0, + "init_state" : "start", + "parse_states" : [ + { + "name" : "start", + "id" : 0, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "eth" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8100", + "mask" : null, + "next_state" : "parse_vlan" + }, + { + "type" : "hexstr", + "value" : "0x0800", + "mask" : null, + "next_state" : "parse_ipv4" + }, + { + "value" : "default", + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["eth", "type"] + } + ] + }, + { + "name" : "parse_vlan", + "id" : 1, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "vlan" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x0800", + "mask" : null, + "next_state" : "parse_ipv4" + }, + { + "value" : "default", + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["vlan", "tpid"] + } + ] + }, + { + "name" : "parse_ipv4", + "id" : 2, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "ipv4" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["ipv4", "version"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : ">=", + "left" : { + "type" : "field", + "value" : ["ipv4", "hdr_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x05" + } + } + } + } + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "tmp"] + } + } + }, + { + "type" : "hexstr", + "value" : "0x7" + } + ], + "op" : "verify" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["ipv4", "hdr_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xfffffffb" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x5" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "ipv4opt" + }, + { + "type" : "expression", + "value" : { + "type" : "field", + "value" : ["scalars", "tmp_0"] + } + } + ], + "op" : "extract_VL" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_tcp" + }, + { + "type" : "hexstr", + "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" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "tcp" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : ">=", + "left" : { + "type" : "field", + "value" : ["tcp", "dataOffset"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x05" + } + } + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "tmp_3"] + } + } + }, + { + "type" : "hexstr", + "value" : "0x8" + } + ], + "op" : "verify" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["tcp", "dataOffset"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xfffffffb" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x5" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "tcpopt" + }, + { + "type" : "expression", + "value" : { + "type" : "field", + "value" : ["scalars", "tmp_4"] + } + } + ], + "op" : "extract_VL" + } + ], + "transitions" : [ + { + "value" : "default", + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_udp", + "id" : 4, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "udp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "value" : "default", + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 282, + "column" : 8, + "source_fragment" : "MyDeparser" + }, + "start" : "node_15", + "emits" : [ + { + "name" : "node_15", + "id" : 0, + "sequence_point" : true, + "header" : "eth", + "next" : "node_16" + }, + { + "name" : "node_16", + "id" : 1, + "sequence_point" : true, + "header" : "new_vlan", + "next" : "node_17" + }, + { + "name" : "node_17", + "id" : 2, + "sequence_point" : true, + "header" : "vlan", + "next" : "node_18" + }, + { + "name" : "node_18", + "id" : 3, + "sequence_point" : true, + "header" : "ipv4", + "next" : "node_19" + }, + { + "name" : "node_19", + "id" : 4, + "sequence_point" : true, + "header" : "ipv4opt", + "next" : "node_20" + }, + { + "name" : "node_20", + "id" : 5, + "sequence_point" : true, + "header" : "tcp", + "next" : "node_21" + }, + { + "name" : "node_21", + "id" : 6, + "sequence_point" : true, + "header" : "tcpopt", + "next" : "node_22" + }, + { + "name" : "node_22", + "id" : 7, + "sequence_point" : true, + "header" : "udp", + "next" : null + } + ], + "conditionals" : [] + } + ], + "meter_arrays" : [], + "counter_arrays" : [ + { + "name" : "MyProcessing.PacketCounter", + "id" : 0, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 228, + "column" : 74, + "source_fragment" : "PacketCounter" + }, + "size" : 8192, + "is_direct" : false, + "width" : 64, + "stride" : 13, + "type" : "packets" + }, + { + "name" : "MyProcessing.ByteCounter", + "id" : 1, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 229, + "column" : 72, + "source_fragment" : "ByteCounter" + }, + "size" : 8192, + "is_direct" : false, + "width" : 64, + "stride" : 13, + "type" : "bytes" + } + ], + "register_arrays" : [], + "calculations" : [], + "learn_lists" : [], + "actions" : [ + { + "name" : "NoAction", + "id" : 0, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "MyProcessing.InsertVLAN", + "id" : 1, + "runtime_data" : [ + { + "name" : "counter_index", + "bitwidth" : 13 + }, + { + "name" : "pcp", + "bitwidth" : 3 + }, + { + "name" : "cfi", + "bitwidth" : 1 + }, + { + "name" : "vid", + "bitwidth" : 12 + } + ], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "new_vlan" + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 232, + "column" : 8, + "source_fragment" : "hdr.new_vlan.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["new_vlan", "pcp"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 233, + "column" : 8, + "source_fragment" : "hdr.new_vlan.pcp = pcp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["new_vlan", "cfi"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 234, + "column" : 8, + "source_fragment" : "hdr.new_vlan.cfi = cfi" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["new_vlan", "vid"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 235, + "column" : 8, + "source_fragment" : "hdr.new_vlan.vid = vid" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["new_vlan", "tpid"] + }, + { + "type" : "field", + "value" : ["eth", "type"] + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 236, + "column" : 8, + "source_fragment" : "hdr.new_vlan.tpid = hdr.eth.type" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "MyProcessing.PacketCounter" + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 237, + "column" : 8, + "source_fragment" : "PacketCounter.count(counter_index)" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "MyProcessing.ByteCounter" + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 238, + "column" : 8, + "source_fragment" : "ByteCounter.count(counter_index)" + } + } + ] + }, + { + "name" : "act", + "id" : 2, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "table_key_sport"] + }, + { + "type" : "field", + "value" : ["udp", "src_port"] + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 260, + "column" : 12, + "source_fragment" : "table_key_sport = hdr.udp.src_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "table_key_dport"] + }, + { + "type" : "field", + "value" : ["udp", "dst_port"] + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 261, + "column" : 12, + "source_fragment" : "table_key_dport = hdr.udp.dst_port" + } + } + ] + }, + { + "name" : "act_0", + "id" : 3, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "table_key_sport"] + }, + { + "type" : "field", + "value" : ["tcp", "src_port"] + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 264, + "column" : 12, + "source_fragment" : "table_key_sport = hdr.tcp.src_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "table_key_dport"] + }, + { + "type" : "field", + "value" : ["tcp", "dst_port"] + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 265, + "column" : 12, + "source_fragment" : "table_key_dport = hdr.tcp.dst_port" + } + } + ] + }, + { + "name" : "act_1", + "id" : 4, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "hit"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 226, + "column" : 4, + "source_fragment" : "bool hit = false;" + } + } + ] + }, + { + "name" : "act_2", + "id" : 5, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["eth", "type"] + }, + { + "type" : "hexstr", + "value" : "0x88a8" + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 68, + "column" : 26, + "source_fragment" : "0x88A8; ..." + } + } + ] + }, + { + "name" : "act_3", + "id" : 6, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["eth", "type"] + }, + { + "type" : "hexstr", + "value" : "0x8100" + } + ], + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 69, + "column" : 26, + "source_fragment" : "0x8100; ..." + } + } + ] + } + ], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 220, + "column" : 8, + "source_fragment" : "MyProcessing" + }, + "init_table" : "tbl_act", + "tables" : [ + { + "name" : "tbl_act", + "id" : 0, + "sequence_point" : true, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [4], + "actions" : ["act_1"], + "base_default_next" : "node_3", + "next_tables" : { + "act_1" : "node_3" + }, + "default_entry" : { + "action_id" : 4, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_act_0", + "id" : 1, + "sequence_point" : false, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [2], + "actions" : ["act"], + "base_default_next" : "MyProcessing.FiveTuple", + "next_tables" : { + "act" : "MyProcessing.FiveTuple" + }, + "default_entry" : { + "action_id" : 2, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "MyProcessing.FiveTuple", + "id" : 2, + "sequence_point" : false, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 241, + "column" : 10, + "source_fragment" : "FiveTuple" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "hdr.ipv4.src", + "target" : ["ipv4", "src"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "hdr.ipv4.dst", + "target" : ["ipv4", "dst"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "hdr.ipv4.protocol", + "target" : ["ipv4", "protocol"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "table_key_sport", + "target" : ["scalars", "table_key_sport"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "table_key_dport", + "target" : ["scalars", "table_key_dport"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 8192, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [1, 0], + "actions" : ["MyProcessing.InsertVLAN", "NoAction"], + "base_default_next" : "node_9", + "next_tables" : { + "MyProcessing.InsertVLAN" : "node_9", + "NoAction" : "node_9" + }, + "hit" : { + "type" : "field", + "value" : ["scalars", "hit"] + }, + "default_entry" : { + "action_id" : 0, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + } + }, + { + "name" : "tbl_act_1", + "id" : 3, + "sequence_point" : false, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [3], + "actions" : ["act_0"], + "base_default_next" : "MyProcessing.FiveTuple", + "next_tables" : { + "act_0" : "MyProcessing.FiveTuple" + }, + "default_entry" : { + "action_id" : 3, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_act_2", + "id" : 4, + "sequence_point" : false, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [5], + "actions" : ["act_2"], + "base_default_next" : null, + "next_tables" : { + "act_2" : null + }, + "default_entry" : { + "action_id" : 5, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_act_3", + "id" : 5, + "sequence_point" : false, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [6], + "actions" : ["act_3"], + "base_default_next" : null, + "next_tables" : { + "act_3" : null + }, + "default_entry" : { + "action_id" : 6, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + } + ], + "action_profiles" : [], + "conditionals" : [ + { + "name" : "node_3", + "id" : 0, + "sequence_point" : true, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 259, + "column" : 12, + "source_fragment" : "hdr.udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["udp", "$valid$"] + } + } + }, + "true_next" : "tbl_act_0", + "false_next" : "node_6", + "if_else" : true, + "converge" : "node_9" + }, + { + "name" : "node_6", + "id" : 1, + "sequence_point" : false, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 263, + "column" : 19, + "source_fragment" : "hdr.tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_act_1", + "false_next" : "node_9", + "if_else" : false, + "converge" : "node_9" + }, + { + "name" : "node_9", + "id" : 2, + "sequence_point" : true, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 269, + "column" : 12, + "source_fragment" : "hit" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "hit"] + } + } + }, + "false_next" : null, + "true_next" : "node_10", + "if_else" : false, + "converge" : null + }, + { + "name" : "node_10", + "id" : 3, + "sequence_point" : false, + "source_info" : { + "filename" : "fiveTuple.p4", + "line" : 270, + "column" : 16, + "source_fragment" : "hdr.vlan.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["vlan", "$valid$"] + } + } + }, + "true_next" : "tbl_act_2", + "false_next" : "tbl_act_3", + "if_else" : true, + "converge" : null + } + ] + } + ], + "checksums" : [], + "internet_checksums" : [], + "force_arith" : [], + "extern_instances" : [], + "field_aliases" : [] +} \ No newline at end of file diff --git a/progs/five_tuple/traffic_out.meta b/progs/five_tuple/traffic_out.meta new file mode 100644 index 0000000..98fd15a --- /dev/null +++ b/progs/five_tuple/traffic_out.meta @@ -0,0 +1,8 @@ +; +; +; +; +; +; +; +; diff --git a/progs/five_tuple/traffic_out.user b/progs/five_tuple/traffic_out.user new file mode 100644 index 0000000..14386cd --- /dev/null +++ b/progs/five_tuple/traffic_out.user @@ -0,0 +1,126 @@ +% Packet 1 (192 bytes) +11 11 11 11 11 11 aa aa aa aa aa aa 81 00 31 11 +08 00 4f c9 00 ae 50 fa 00 00 b3 11 d3 86 fd 5f +0b c8 9a aa 20 10 01 01 01 01 01 01 01 01 01 01 +01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +01 01 01 01 01 01 01 01 01 01 01 01 01 00 24 11 +6c c1 00 72 99 c3 79 72 5b cf c6 6e 5f fa b9 2f +38 cb 50 39 30 91 91 98 27 88 ed fa be 03 08 b9 +bf f3 d0 e9 c0 01 5b 13 ac 7e 62 9a 26 36 06 ae +5d 96 ec 71 2d a8 66 be 46 02 65 89 87 66 c1 9b +ca c2 4b 89 19 ba 0e ed f4 af 84 d3 e4 3c 34 d6 +da 25 1d 8f ad ff af e1 bb b9 37 4f 64 4b 06 a2 +0e e9 36 5d c1 87 11 26 20 a6 0f c9 5b e5 4f fd +; + +% Packet 2 (93 bytes) +11 11 11 11 11 12 aa aa aa aa aa ab 81 00 46 66 +08 00 45 03 00 4b 43 57 00 00 39 11 1d 1f 7c f6 +cd 9c cc 93 0a 03 21 1e 5b 98 00 37 aa 9a 6b fa +a4 95 d2 54 47 71 92 29 8b 0f 8d e7 e2 99 08 f0 +13 0b ef 64 07 3b fe e0 d4 6a ad 3f 5b 3e fd 58 +33 49 fc 8f 86 00 1c 4f 00 a0 d0 6d 70 +; + +% Packet 3 (226 bytes) +33 33 33 33 33 33 cc cc cc cc cc cc 88 a8 83 33 +81 00 80 03 08 00 4e 76 00 cc f8 4e 00 00 f6 11 +61 b1 e9 0a 5c 71 63 53 a5 ca 01 01 01 01 01 01 +01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +01 01 01 01 01 01 01 01 01 01 01 01 01 00 73 20 +85 bb 00 94 81 33 71 fb 3d 2d 60 26 42 3a 7b 2d +fb f8 1c f4 04 dd fc dc d4 83 80 82 1f 72 a2 9e +7c e8 f0 04 50 ba 2a 58 a5 59 8a d0 5a b7 f9 88 +64 55 f3 85 d0 11 2d 4a 28 12 51 da 71 33 74 3c +72 22 b0 43 de e6 57 62 61 96 6c 72 d1 3d e0 90 +98 7c 6a cf 3b 74 0d 5b d3 8b cf eb 02 94 87 de +6f 60 bb de 84 ec a6 0f 14 f4 06 ac 1f 5d 81 ae +0c 16 de 47 7c b6 5f c0 0a 31 3e 47 dc 25 c3 db +09 e8 fe e2 03 51 e0 26 06 5c 8e 02 c5 d3 b6 62 +05 10 +; + +% Packet 4 (156 bytes) +33 33 33 33 33 34 cc cc cc cc cc cd 88 a8 84 44 +81 00 30 04 08 00 4e ee 00 86 7f c2 00 00 fe 11 +2d 25 ad 85 75 e6 cc 3d 03 d7 01 01 01 01 01 01 +01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +01 01 01 01 01 01 01 01 01 01 01 01 01 00 9e 55 +51 fa 00 4e b4 fd e8 56 86 4e 2b bc f2 61 7d ec +f9 45 e3 de 15 45 85 d8 05 8a 97 8f d7 42 a5 b8 +5f 23 6f 3a 1f 6a ca a9 ae d1 b5 6b 98 03 03 24 +c1 a9 c8 5b 24 41 37 82 89 8b f9 a2 12 e1 e6 a1 +26 69 82 d7 e3 9a 44 23 39 ee a4 3e +; + +% Packet 5 (253 bytes) +2f 7b 7e ca f4 7d f0 e3 f8 fe 53 da 81 00 8c 80 +08 00 46 23 00 e7 b6 1f 00 00 45 11 92 0e 56 72 +fa c8 6b 24 6d 55 01 01 01 00 e0 3c 7d 9c 00 cf +64 c3 54 27 62 3b 3f 23 85 71 92 ba cb 46 2d 26 +57 5f 3a 9c 73 f2 26 65 cc 3d 7d 06 13 a1 5a 99 +0c bc fe b7 3c c1 39 70 dc 32 2c b1 b2 55 05 93 +c2 0b 82 eb 7e b6 68 4a a7 7c 37 d9 37 79 cd 71 +f7 37 7c bb 45 b0 9b 37 62 8f 95 42 4d dc f6 20 +e8 43 22 12 08 53 15 3d 6c 78 48 e4 5e b2 78 8a +56 26 1b 96 85 aa 7f 2d 52 36 ff a4 1f a3 a2 b3 +ae 78 c3 e1 1a 92 a9 44 3d 4e 56 26 3f 17 60 e8 +5b 68 5b b3 b7 9e 1b fa db 5a 4a a1 99 57 99 b7 +b9 0a 5d 04 6e 7f c7 db 69 83 7c 42 7a cd b1 04 +be 67 81 3d 93 c6 1b 87 af ad ed bd 5e 4a 42 ad +57 9e 55 21 89 4c 66 09 d1 a7 41 3e aa 04 c8 06 +c2 06 ff 09 44 df 93 bc 72 db 24 c6 a0 +; + +% Packet 6 (238 bytes) +64 72 7d 79 98 bb 78 37 bc 42 8a 21 08 00 47 12 +00 dc 03 82 00 00 ab 11 2c a0 0c 37 16 59 0e a8 +a7 a2 01 01 01 01 01 01 01 00 eb 3b 79 ec 00 c0 +4d bc ec 60 14 af 04 6a 6c 60 c8 31 c1 56 19 9b +68 21 16 77 93 7a bf 2c 34 a1 87 06 ed 45 54 28 +4f db 5b 95 de bd 37 5f c0 15 87 49 36 48 49 71 +21 45 a0 76 e9 ab 1a af 0a 3d 1b 59 f1 49 bb 12 +02 c3 90 77 f4 07 33 d0 aa db 4d 22 8b 6d 11 27 +f2 b4 92 39 29 fe c5 e7 f7 0d 20 bf 82 2f ac f7 +a5 36 23 22 71 4b 87 e9 f7 cb ee f2 b0 55 6a 87 +c8 ef 18 46 09 33 19 92 71 33 2b 5e 2f 0b c6 1c +ba bd 3d ad 5c 18 d2 b0 54 2e fa a9 7b 8a 71 67 +b1 c9 15 01 db cb 10 ff 6f fa ac 54 98 ac 13 d1 +6d 2a 2e 28 18 8d 1b 7b a8 34 e5 08 dc c2 c8 81 +29 e9 00 e9 d8 21 0d 6f 18 be b7 b4 d2 18 +; + +% Packet 7 (172 bytes) +99 70 ce 90 01 1e 46 2e 70 8b aa 11 81 00 3a e5 +08 00 4a 2e 00 96 95 0f 00 00 f6 11 fd ee e9 cb +04 5d 91 b0 a2 48 01 01 01 01 01 01 01 01 01 01 +01 01 01 01 01 01 01 01 01 00 92 96 e2 81 00 6e +6e 8a 51 5c 58 29 42 0b 59 d9 ba 67 42 99 bd b0 +46 68 5c 2c 35 0f f2 3c 29 a8 e3 69 44 8a 6e a3 +e2 4d df 0d b4 ec 57 bc 23 c8 75 12 ff f1 cb 09 +f4 09 ab e9 c6 cb 65 b1 67 c2 47 0c 22 1e 1b da +23 01 f8 12 1c bb 0d a6 ec 39 81 82 30 d9 81 44 +e7 46 4b e4 70 48 9f 23 a2 21 13 af 63 35 9f f3 +b0 fa 1e b5 2f e4 23 8a 41 a8 14 00 +; + +% Packet 8 (263 bytes) +dc a4 40 95 68 15 40 15 11 a3 c1 64 81 00 5d ea +08 00 45 87 00 f1 04 46 00 00 37 11 b0 36 d3 dd +9c cb e5 cb 77 84 be 0f 29 88 00 dd 0a a7 bf 24 +83 2b 81 eb bf 95 e4 c4 96 8b 71 83 79 dd 9c 5c +bc 5a b1 8f 15 68 55 fd 8c d3 cc e9 3d f9 a4 b3 +55 93 55 3d 81 4b e2 05 12 14 31 aa cf 77 67 c6 +49 12 7e 1d 09 dc d3 f3 50 37 b8 fe 63 37 ef d2 +18 dd c1 61 d9 d9 98 50 91 e2 8c 5c 2d 93 9a 6d +17 f7 9f bd 5c 82 41 40 a5 b8 01 24 f0 43 b9 8e +01 5c fd e4 00 06 3c 41 0a 75 c0 a9 96 ba 12 85 +a3 43 92 9e 88 42 b5 9b 9e db de bb f3 9e a5 27 +22 d4 1b bc 5c b1 40 9d 39 58 d2 33 76 7e a6 e5 +c2 4b 25 75 ef 50 1c d6 8c fc 21 f0 a9 1f 42 5d +32 76 ea d2 86 48 a7 2f e0 a6 59 f9 a5 0b ae c3 +0f e3 d3 2a ec 17 83 f2 84 02 9b 23 25 5c ec aa +e3 7b 33 b3 32 25 a6 44 b7 8c cc a2 cf c7 5b 8a +e8 7c 8c 20 85 59 23 +; +