diff --git a/backends/dpdk/dpdkAsmOpt.cpp b/backends/dpdk/dpdkAsmOpt.cpp index b35ee77a728..1223634823c 100644 --- a/backends/dpdk/dpdkAsmOpt.cpp +++ b/backends/dpdk/dpdkAsmOpt.cpp @@ -619,7 +619,7 @@ bool EmitDpdkTableConfig::isAllKeysDefaultExpression(const IR::ListExpression *k void EmitDpdkTableConfig::postorder(const IR::DpdkTable *table) { auto entriesList = table->getEntries(); if (entriesList == nullptr) return; - dpdkTableConfigFile.open(table->name + ".txt"); + dpdkTableConfigFile.open(table->name + ".txtpb"); auto needsPriority = tableNeedsPriority(table, refMap); int entryPriority = entriesList->entries.size(); for (auto e : entriesList->entries) { diff --git a/backends/dpdk/run-dpdk-ptf-test.py b/backends/dpdk/run-dpdk-ptf-test.py index efc184ede7e..aa6314e152f 100755 --- a/backends/dpdk/run-dpdk-ptf-test.py +++ b/backends/dpdk/run-dpdk-ptf-test.py @@ -288,7 +288,7 @@ def run_test(options: Options) -> int: # Define the test environment and compile the P4 target test_name = Path(options.p4_file.name) - info_name = options.testdir.joinpath("p4Info.txt") + info_name = options.testdir.joinpath("p4Info.txtpb") bf_rt_schema = options.testdir.joinpath("bf-rt.json") conf_bin = options.testdir.joinpath(test_name.with_suffix(".pb.bin")) # Files needed by the pipeline diff --git a/backends/dpdk/run-dpdk-test.py b/backends/dpdk/run-dpdk-test.py index f7e608e5a6e..13c54d21bc2 100755 --- a/backends/dpdk/run-dpdk-test.py +++ b/backends/dpdk/run-dpdk-test.py @@ -281,8 +281,8 @@ def process_file(options, argv): print("Writing temporary files into ", tmpdir) stderr = os.path.join(tmpdir, basename + "-error") spec = os.path.join(tmpdir, basename + ".spec") - p4runtimeFile = os.path.join(tmpdir, basename + ".p4info.txt") - p4runtimeEntriesFile = os.path.join(tmpdir, basename + ".entries.txt") + p4runtimeFile = os.path.join(tmpdir, basename + ".p4info.txtpb") + p4runtimeEntriesFile = os.path.join(tmpdir, basename + ".entries.txtpb") bfRtSchemaFile = os.path.join(tmpdir, basename + ".bfrt.json") def getArch(path): diff --git a/backends/ebpf/ebpfParser.cpp b/backends/ebpf/ebpfParser.cpp index 85389667ffc..8637ca370fb 100644 --- a/backends/ebpf/ebpfParser.cpp +++ b/backends/ebpf/ebpfParser.cpp @@ -326,7 +326,7 @@ void StateTranslationVisitor::compileExtractField(const IR::Expression *expr, // 0x112233445566778809 // 0x112233445566778890 // To correctly insert that padding, the length of field must be known, but tools like - // nikss-ctl (and the nikss library) don't consume P4info.txt to have such knowledge. + // nikss-ctl (and the nikss library) don't consume P4info.txtpb to have such knowledge. // There is also a bug in (de)parser causing such fields to be deparsed incorrectly. ::error(ErrorType::ERR_UNSUPPORTED_ON_TARGET, "%1%: fields wider than 64 bits must have a size multiple of 8 bits (1 byte) " diff --git a/backends/ebpf/psa/examples/bng.p4info.txt b/backends/ebpf/psa/examples/bng.p4info.txtpb similarity index 100% rename from backends/ebpf/psa/examples/bng.p4info.txt rename to backends/ebpf/psa/examples/bng.p4info.txtpb diff --git a/backends/ebpf/psa/examples/l2l3-acl.p4info.txt b/backends/ebpf/psa/examples/l2l3-acl.p4info.txtpb similarity index 100% rename from backends/ebpf/psa/examples/l2l3-acl.p4info.txt rename to backends/ebpf/psa/examples/l2l3-acl.p4info.txtpb diff --git a/backends/ebpf/psa/examples/upf.p4info.txt b/backends/ebpf/psa/examples/upf.p4info.txtpb similarity index 100% rename from backends/ebpf/psa/examples/upf.p4info.txt rename to backends/ebpf/psa/examples/upf.p4info.txtpb diff --git a/backends/ebpf/tests/p4testdata/action-profile2.p4info.txt b/backends/ebpf/tests/p4testdata/action-profile2.p4info.txtpb similarity index 100% rename from backends/ebpf/tests/p4testdata/action-profile2.p4info.txt rename to backends/ebpf/tests/p4testdata/action-profile2.p4info.txtpb diff --git a/backends/ebpf/tests/p4testdata/action-selector2.p4info.txt b/backends/ebpf/tests/p4testdata/action-selector2.p4info.txtpb similarity index 100% rename from backends/ebpf/tests/p4testdata/action-selector2.p4info.txt rename to backends/ebpf/tests/p4testdata/action-selector2.p4info.txtpb diff --git a/backends/ebpf/tests/p4testdata/counters.p4info.txt b/backends/ebpf/tests/p4testdata/counters.p4info.txtpb similarity index 100% rename from backends/ebpf/tests/p4testdata/counters.p4info.txt rename to backends/ebpf/tests/p4testdata/counters.p4info.txtpb diff --git a/backends/ebpf/tests/p4testdata/digest.p4info.txt b/backends/ebpf/tests/p4testdata/digest.p4info.txtpb similarity index 100% rename from backends/ebpf/tests/p4testdata/digest.p4info.txt rename to backends/ebpf/tests/p4testdata/digest.p4info.txtpb diff --git a/backends/ebpf/tests/p4testdata/meters-direct.p4info.txt b/backends/ebpf/tests/p4testdata/meters-direct.p4info.txtpb similarity index 100% rename from backends/ebpf/tests/p4testdata/meters-direct.p4info.txt rename to backends/ebpf/tests/p4testdata/meters-direct.p4info.txtpb diff --git a/backends/ebpf/tests/p4testdata/meters.p4info.txt b/backends/ebpf/tests/p4testdata/meters.p4info.txtpb similarity index 100% rename from backends/ebpf/tests/p4testdata/meters.p4info.txt rename to backends/ebpf/tests/p4testdata/meters.p4info.txtpb diff --git a/backends/ebpf/tests/p4testdata/pvs.p4info.txt b/backends/ebpf/tests/p4testdata/pvs.p4info.txtpb similarity index 100% rename from backends/ebpf/tests/p4testdata/pvs.p4info.txt rename to backends/ebpf/tests/p4testdata/pvs.p4info.txtpb diff --git a/backends/ebpf/tests/p4testdata/register-apply.p4info.txt b/backends/ebpf/tests/p4testdata/register-apply.p4info.txtpb similarity index 100% rename from backends/ebpf/tests/p4testdata/register-apply.p4info.txt rename to backends/ebpf/tests/p4testdata/register-apply.p4info.txtpb diff --git a/backends/ebpf/tests/ptf/bng.py b/backends/ebpf/tests/ptf/bng.py index be157c1ba81..d410f934af5 100644 --- a/backends/ebpf/tests/ptf/bng.py +++ b/backends/ebpf/tests/ptf/bng.py @@ -118,7 +118,7 @@ def pkt_decrement_ttl(pkt): class BNGTest(P4EbpfTest): p4_file_path = "../psa/examples/bng.p4" - p4info_reference_file_path = "../psa/examples/bng.p4info.txt" + p4info_reference_file_path = "../psa/examples/bng.p4info.txtpb" session_installed = False def setUp(self): diff --git a/backends/ebpf/tests/ptf/common.py b/backends/ebpf/tests/ptf/common.py index 5c48884df8c..97780410afa 100644 --- a/backends/ebpf/tests/ptf/common.py +++ b/backends/ebpf/tests/ptf/common.py @@ -130,7 +130,7 @@ def setUp(self): p4args += " --xdp" if self.p4info_reference_file_path: - self.p4info_p4c_generated = os.path.join("ptf_out", filename + ".p4info.txt") + self.p4info_p4c_generated = os.path.join("ptf_out", filename + ".p4info.txtpb") p4args += " --p4runtime-files {}".format(self.p4info_p4c_generated) p4args = p4args + " " + self.p4c_additional_args diff --git a/backends/ebpf/tests/ptf/l2l3_acl.py b/backends/ebpf/tests/ptf/l2l3_acl.py index 43325caadc7..804f9ce30a1 100644 --- a/backends/ebpf/tests/ptf/l2l3_acl.py +++ b/backends/ebpf/tests/ptf/l2l3_acl.py @@ -38,7 +38,7 @@ def pkt_add_vlan(pkt, vlan_vid=10, vlan_pcp=0, dl_vlan_cfi=0): class L2L3SwitchTest(P4EbpfTest): p4_file_path = "../psa/examples/l2l3-acl.p4" - p4info_reference_file_path = "../psa/examples/l2l3-acl.p4info.txt" + p4info_reference_file_path = "../psa/examples/l2l3-acl.p4info.txtpb" def configure_port(self, port_id, vlan_id=None): if vlan_id is None: diff --git a/backends/ebpf/tests/ptf/meters.py b/backends/ebpf/tests/ptf/meters.py index ac8938bfacd..e725fa6cf3e 100644 --- a/backends/ebpf/tests/ptf/meters.py +++ b/backends/ebpf/tests/ptf/meters.py @@ -123,7 +123,7 @@ class MeterPSATest(P4EbpfTest): """ p4_file_path = "p4testdata/meters.p4" - p4info_reference_file_path = "p4testdata/meters.p4info.txt" + p4info_reference_file_path = "p4testdata/meters.p4info.txtpb" def runTest(self): pkt = testutils.simple_ip_packet() @@ -237,7 +237,7 @@ class DirectMeterPSATest(P4EbpfTest): """ p4_file_path = "p4testdata/meters-direct.p4" - p4info_reference_file_path = "p4testdata/meters-direct.p4info.txt" + p4info_reference_file_path = "p4testdata/meters-direct.p4info.txtpb" def runTest(self): pkt = testutils.simple_ip_packet() diff --git a/backends/ebpf/tests/ptf/register.py b/backends/ebpf/tests/ptf/register.py index 19b61634ada..d80506ccd60 100644 --- a/backends/ebpf/tests/ptf/register.py +++ b/backends/ebpf/tests/ptf/register.py @@ -66,7 +66,7 @@ class RegisterApplyPSATest(P4EbpfTest): """ p4_file_path = "p4testdata/register-apply.p4" - p4info_reference_file_path = "p4testdata/register-apply.p4info.txt" + p4info_reference_file_path = "p4testdata/register-apply.p4info.txtpb" def runTest(self): pkt = testutils.simple_ip_packet() diff --git a/backends/ebpf/tests/ptf/table_implementation.py b/backends/ebpf/tests/ptf/table_implementation.py index 6f4a4224217..41726cc6325 100644 --- a/backends/ebpf/tests/ptf/table_implementation.py +++ b/backends/ebpf/tests/ptf/table_implementation.py @@ -54,7 +54,7 @@ class ActionProfileTwoTablesSameInstancePSATest(P4EbpfTest): """ p4_file_path = "p4testdata/action-profile2.p4" - p4info_reference_file_path = "p4testdata/action-profile2.p4info.txt" + p4info_reference_file_path = "p4testdata/action-profile2.p4info.txtpb" def runTest(self): ref = self.action_profile_add_action(ap="MyIC_ap", action=2, data=[0x1122]) @@ -236,7 +236,7 @@ class ActionSelectorTwoTablesSameInstancePSATest(ActionSelectorTest): """ p4_file_path = "p4testdata/action-selector2.p4" - p4info_reference_file_path = "p4testdata/action-selector2.p4info.txt" + p4info_reference_file_path = "p4testdata/action-selector2.p4info.txtpb" def runTest(self): self.create_default_rule_set(table="MyIC_tbl", selector="MyIC_as") diff --git a/backends/ebpf/tests/ptf/test.py b/backends/ebpf/tests/ptf/test.py index 4a849db0d32..621100c6f02 100644 --- a/backends/ebpf/tests/ptf/test.py +++ b/backends/ebpf/tests/ptf/test.py @@ -366,7 +366,7 @@ def runTest(self): class DigestPSATest(P4EbpfTest): p4_file_path = "p4testdata/digest.p4" - p4info_reference_file_path = "p4testdata/digest.p4info.txt" + p4info_reference_file_path = "p4testdata/digest.p4info.txtpb" def runTest(self): pkt = testutils.simple_ip_packet(eth_src="fa:fb:fc:fd:fe:f0") @@ -409,7 +409,7 @@ def runTest(self): class CountersPSATest(P4EbpfTest): p4_file_path = "p4testdata/counters.p4" - p4info_reference_file_path = "p4testdata/counters.p4info.txt" + p4info_reference_file_path = "p4testdata/counters.p4info.txtpb" def runTest(self): pkt = testutils.simple_ip_packet( @@ -481,7 +481,7 @@ class ParserValueSetPSATest(P4EbpfTest): """ p4_file_path = "p4testdata/pvs.p4" - p4info_reference_file_path = "p4testdata/pvs.p4info.txt" + p4info_reference_file_path = "p4testdata/pvs.p4info.txtpb" def runTest(self): pkt = testutils.simple_udp_packet(ip_dst="10.0.0.1", udp_dport=80) diff --git a/backends/ebpf/tests/ptf/upf.py b/backends/ebpf/tests/ptf/upf.py index bce77933623..74de6c7073d 100644 --- a/backends/ebpf/tests/ptf/upf.py +++ b/backends/ebpf/tests/ptf/upf.py @@ -79,7 +79,7 @@ def pkt_route(pkt, mac_src, mac_dst): class UPFTest(P4EbpfTest): p4_file_path = "../psa/examples/upf.p4" - p4info_reference_file_path = "../psa/examples/upf.p4info.txt" + p4info_reference_file_path = "../psa/examples/upf.p4info.txtpb" def setup_pfcp_session(self, seid, teid, ue_ip): self.table_add( diff --git a/testdata/p4_16_psa_errors_outputs/psa-action-profile2.p4-error b/testdata/p4_16_psa_errors_outputs/psa-action-profile2.p4-error new file mode 100644 index 00000000000..031fd2faf49 --- /dev/null +++ b/testdata/p4_16_psa_errors_outputs/psa-action-profile2.p4-error @@ -0,0 +1,6 @@ +psa-action-profile2.p4(59): [--Werror=invalid] error: Expected psa_implementation property value for table MyIC.tbl to resolve to an extern instance: psa_implementation + psa_implementation = { ap, ap1 }; + ^^^^^^^^^^^^^^^^^^ +psa-action-profile2.p4(59): [--Werror=invalid] error: Expected psa_implementation property value for table MyIC.tbl to resolve to an extern instance: psa_implementation + psa_implementation = { ap, ap1 }; + ^^^^^^^^^^^^^^^^^^ diff --git a/testdata/p4_16_psa_errors_outputs/psa-action-profile2.p4.bfrt.json b/testdata/p4_16_psa_errors_outputs/psa-action-profile2.p4.bfrt.json new file mode 100644 index 00000000000..85bdc66e50b --- /dev/null +++ b/testdata/p4_16_psa_errors_outputs/psa-action-profile2.p4.bfrt.json @@ -0,0 +1,81 @@ +{ + "schema_version" : "1.0.0", + "tables" : [ + { + "name" : "ip.MyIC.tbl", + "id" : 39967501, + "table_type" : "MatchAction_Direct", + "size" : 1024, + "annotations" : [], + "depends_on" : [], + "has_const_default_action" : false, + "key" : [ + { + "id" : 1, + "name" : "hdr.ethernet.srcAddr", + "repeated" : false, + "annotations" : [], + "mandatory" : false, + "match_type" : "Exact", + "type" : { + "type" : "bytes", + "width" : 48 + } + } + ], + "action_specs" : [ + { + "id" : 21257015, + "name" : "NoAction", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + }, + { + "id" : 21832421, + "name" : "MyIC.a1", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [ + { + "id" : 1, + "name" : "param", + "repeated" : false, + "mandatory" : true, + "read_only" : false, + "annotations" : [], + "type" : { + "type" : "bytes", + "width" : 48 + } + } + ] + }, + { + "id" : 23466264, + "name" : "MyIC.a2", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [ + { + "id" : 1, + "name" : "param", + "repeated" : false, + "mandatory" : true, + "read_only" : false, + "annotations" : [], + "type" : { + "type" : "bytes", + "width" : 16 + } + } + ] + } + ], + "data" : [], + "supported_operations" : [], + "attributes" : ["EntryScope"] + } + ], + "learn_filters" : [] +} \ No newline at end of file diff --git a/testdata/p4_16_psa_errors_outputs/psa-counter6.p4-error b/testdata/p4_16_psa_errors_outputs/psa-counter6.p4-error new file mode 100644 index 00000000000..c46de5be3f2 --- /dev/null +++ b/testdata/p4_16_psa_errors_outputs/psa-counter6.p4-error @@ -0,0 +1,2 @@ +[--Werror=duplicate] error: Name 'MyIC.counter0' is used for multiple direct counter objects in the P4Info message +[--Werror=duplicate] error: Found 1 duplicate name(s) in the P4Info diff --git a/testdata/p4_16_psa_errors_outputs/psa-counter6.p4.bfrt.json b/testdata/p4_16_psa_errors_outputs/psa-counter6.p4.bfrt.json new file mode 100644 index 00000000000..7c5331edce1 --- /dev/null +++ b/testdata/p4_16_psa_errors_outputs/psa-counter6.p4.bfrt.json @@ -0,0 +1,120 @@ +{ + "schema_version" : "1.0.0", + "tables" : [ + { + "name" : "ip.MyIC.tbl", + "id" : 39967501, + "table_type" : "MatchAction_Direct", + "size" : 1024, + "annotations" : [], + "depends_on" : [], + "has_const_default_action" : false, + "key" : [ + { + "id" : 1, + "name" : "hdr.ethernet.srcAddr", + "repeated" : false, + "annotations" : [], + "mandatory" : false, + "match_type" : "Exact", + "type" : { + "type" : "bytes", + "width" : 48 + } + } + ], + "action_specs" : [ + { + "id" : 21257015, + "name" : "NoAction", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + }, + { + "id" : 22078320, + "name" : "MyIC.execute", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + } + ], + "data" : [ + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65554, + "name" : "$COUNTER_SPEC_PKTS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 0 + } + } + } + ], + "supported_operations" : ["SyncCounters"], + "attributes" : ["EntryScope"] + }, + { + "name" : "ip.MyIC.tbl2", + "id" : 47318070, + "table_type" : "MatchAction_Direct", + "size" : 1024, + "annotations" : [], + "depends_on" : [], + "has_const_default_action" : false, + "key" : [ + { + "id" : 1, + "name" : "hdr.ethernet.srcAddr", + "repeated" : false, + "annotations" : [], + "mandatory" : false, + "match_type" : "Exact", + "type" : { + "type" : "bytes", + "width" : 48 + } + } + ], + "action_specs" : [ + { + "id" : 21257015, + "name" : "NoAction", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + }, + { + "id" : 22078320, + "name" : "MyIC.execute", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + } + ], + "data" : [ + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65554, + "name" : "$COUNTER_SPEC_PKTS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 0 + } + } + } + ], + "supported_operations" : ["SyncCounters"], + "attributes" : ["EntryScope"] + } + ], + "learn_filters" : [] +} \ No newline at end of file diff --git a/testdata/p4_16_psa_errors_outputs/psa-example-dpdk-directmeter-err.p4-error b/testdata/p4_16_psa_errors_outputs/psa-example-dpdk-directmeter-err.p4-error new file mode 100644 index 00000000000..845acc057ea --- /dev/null +++ b/testdata/p4_16_psa_errors_outputs/psa-example-dpdk-directmeter-err.p4-error @@ -0,0 +1,3 @@ +psa.p4(670): [--Werror=unexpected] error: dpdk_execute method of meter0 extern can only be invoked from within action of ownertable + PSA_MeterColor_t dpdk_execute(in bit<32> pkt_len); + ^^^^^^^^^^^^ diff --git a/testdata/p4_16_psa_errors_outputs/psa-example-dpdk-directmeter-err.p4.bfrt.json b/testdata/p4_16_psa_errors_outputs/psa-example-dpdk-directmeter-err.p4.bfrt.json new file mode 100644 index 00000000000..4c131216b0c --- /dev/null +++ b/testdata/p4_16_psa_errors_outputs/psa-example-dpdk-directmeter-err.p4.bfrt.json @@ -0,0 +1,140 @@ +{ + "schema_version" : "1.0.0", + "tables" : [ + { + "name" : "ip.MyIC.tbl", + "id" : 39967501, + "table_type" : "MatchAction_Direct", + "size" : 1024, + "annotations" : [], + "depends_on" : [], + "has_const_default_action" : false, + "key" : [ + { + "id" : 1, + "name" : "hdr.ethernet.srcAddr", + "repeated" : false, + "annotations" : [], + "mandatory" : false, + "match_type" : "Exact", + "type" : { + "type" : "bytes", + "width" : 48 + } + } + ], + "action_specs" : [ + { + "id" : 21257015, + "name" : "NoAction", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + } + ], + "data" : [ + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65545, + "name" : "$METER_SPEC_CIR_KBPS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 18446744073709551615 + } + } + }, + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65546, + "name" : "$METER_SPEC_PIR_KBPS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 18446744073709551615 + } + } + }, + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65547, + "name" : "$METER_SPEC_CBS_KBITS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 18446744073709551615 + } + } + }, + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65548, + "name" : "$METER_SPEC_PBS_KBITS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 18446744073709551615 + } + } + } + ], + "supported_operations" : [], + "attributes" : ["MeterByteCountAdjust", "EntryScope"] + }, + { + "name" : "ip.MyIC.tbl2", + "id" : 47318070, + "table_type" : "MatchAction_Direct", + "size" : 1024, + "annotations" : [], + "depends_on" : [], + "has_const_default_action" : false, + "key" : [ + { + "id" : 1, + "name" : "hdr.ethernet.srcAddr", + "repeated" : false, + "annotations" : [], + "mandatory" : false, + "match_type" : "Exact", + "type" : { + "type" : "bytes", + "width" : 48 + } + } + ], + "action_specs" : [ + { + "id" : 21257015, + "name" : "NoAction", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + }, + { + "id" : 18579058, + "name" : "MyIC.execute_meter", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + } + ], + "data" : [], + "supported_operations" : [], + "attributes" : ["EntryScope"] + } + ], + "learn_filters" : [] +} \ No newline at end of file diff --git a/testdata/p4_16_psa_errors_outputs/psa-meter6.p4-error b/testdata/p4_16_psa_errors_outputs/psa-meter6.p4-error new file mode 100644 index 00000000000..5fbfe5d38e6 --- /dev/null +++ b/testdata/p4_16_psa_errors_outputs/psa-meter6.p4-error @@ -0,0 +1,4 @@ +psa-meter6.p4(51): [--Wwarn=unsupported] warning: MyIC.meter0: Packet metering is not supported. Falling back to byte metering. + DirectMeter(PSA_MeterType_t.PACKETS) meter0; + ^^^^^^ +[--Werror=unexpected] error: execute method not supported for DirectMeter extern diff --git a/testdata/p4_16_psa_errors_outputs/psa-meter6.p4.bfrt.json b/testdata/p4_16_psa_errors_outputs/psa-meter6.p4.bfrt.json new file mode 100644 index 00000000000..8feb572bea0 --- /dev/null +++ b/testdata/p4_16_psa_errors_outputs/psa-meter6.p4.bfrt.json @@ -0,0 +1,140 @@ +{ + "schema_version" : "1.0.0", + "tables" : [ + { + "name" : "ip.MyIC.tbl", + "id" : 39967501, + "table_type" : "MatchAction_Direct", + "size" : 1024, + "annotations" : [], + "depends_on" : [], + "has_const_default_action" : false, + "key" : [ + { + "id" : 1, + "name" : "hdr.ethernet.srcAddr", + "repeated" : false, + "annotations" : [], + "mandatory" : false, + "match_type" : "Exact", + "type" : { + "type" : "bytes", + "width" : 48 + } + } + ], + "action_specs" : [ + { + "id" : 21257015, + "name" : "NoAction", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + } + ], + "data" : [ + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65549, + "name" : "$METER_SPEC_CIR_PPS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 18446744073709551615 + } + } + }, + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65550, + "name" : "$METER_SPEC_PIR_PPS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 18446744073709551615 + } + } + }, + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65551, + "name" : "$METER_SPEC_CBS_PKTS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 18446744073709551615 + } + } + }, + { + "mandatory" : false, + "read_only" : false, + "singleton" : { + "id" : 65552, + "name" : "$METER_SPEC_PBS_PKTS", + "repeated" : false, + "annotations" : [], + "type" : { + "type" : "uint64", + "default_value" : 18446744073709551615 + } + } + } + ], + "supported_operations" : [], + "attributes" : ["MeterByteCountAdjust", "EntryScope"] + }, + { + "name" : "ip.MyIC.tbl2", + "id" : 47318070, + "table_type" : "MatchAction_Direct", + "size" : 1024, + "annotations" : [], + "depends_on" : [], + "has_const_default_action" : false, + "key" : [ + { + "id" : 1, + "name" : "hdr.ethernet.srcAddr", + "repeated" : false, + "annotations" : [], + "mandatory" : false, + "match_type" : "Exact", + "type" : { + "type" : "bytes", + "width" : 48 + } + } + ], + "action_specs" : [ + { + "id" : 21257015, + "name" : "NoAction", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + }, + { + "id" : 18579058, + "name" : "MyIC.execute_meter", + "action_scope" : "TableAndDefault", + "annotations" : [], + "data" : [] + } + ], + "data" : [], + "supported_operations" : [], + "attributes" : ["EntryScope"] + } + ], + "learn_filters" : [] +} \ No newline at end of file