diff --git a/control-plane/p4RuntimeSerializer.cpp b/control-plane/p4RuntimeSerializer.cpp index 998552ddf7..bb5cb882c8 100644 --- a/control-plane/p4RuntimeSerializer.cpp +++ b/control-plane/p4RuntimeSerializer.cpp @@ -294,6 +294,14 @@ static bool getConstTable(const IR::P4Table *table) { return ep->isConstant; } +/// @return true if @table has an 'entries' or 'const entries' +/// property, and there is at least one entry in the list. +static bool getHasInitialEntries(const IR::P4Table *table) { + BUG_CHECK(table != nullptr, "Failed precondition for getConstTable"); + auto entriesList = table->getEntries(); + return (entriesList->entries.size() >= 1); +} + static std::vector getActionRefs(const IR::P4Table *table, ReferenceMap *refMap) { std::vector actions; for (auto action : table->getActionList()->actionList) { @@ -652,6 +660,7 @@ class P4RuntimeAnalyzer { auto actions = getActionRefs(tableDeclaration, refMap); bool isConstTable = getConstTable(tableDeclaration); + bool hasInitialEntries = getHasInitialEntries(tableDeclaration); auto name = archHandler->getControlPlaneName(tableBlock); auto annotations = tableDeclaration->to(); @@ -709,6 +718,9 @@ class P4RuntimeAnalyzer { if (isConstTable) { table->set_is_const_table(true); } + if (hasInitialEntries) { + table->set_has_initial_entries(true); + } archHandler->addTableProperties(symbols, p4Info, table, tableBlock); } @@ -970,9 +982,9 @@ static void analyzeParser(P4RuntimeAnalyzer &analyzer, const IR::ParserBlock *pa } } -/// A converter which translates the 'const entries' for P4 tables (if any) -/// into a P4Runtime WriteRequest message which can be used by a target to -/// initialize its tables. +/// A converter which translates the 'entries' or 'const entries' for +/// P4 tables (if any) into a P4Runtime WriteRequest message which can +/// be used by a target to initialize its tables. class P4RuntimeEntriesConverter { private: friend class P4RuntimeAnalyzer; @@ -1009,6 +1021,7 @@ class P4RuntimeEntriesConverter { protoEntry->set_table_id(tableId); addMatchKey(protoEntry, table, e->getKeys(), refMap, typeMap); addAction(protoEntry, e->getAction(), refMap, typeMap); + protoEntry->set_is_const(isConst || e->isConst); if (needsPriority) { if (!isConst) { // The entry has a priority, use it. diff --git a/testdata/p4_16_errors_outputs/table-entries-lpm-2.p4.entries.txt b/testdata/p4_16_errors_outputs/table-entries-lpm-2.p4.entries.txt index 450174ce15..6bea237625 100644 --- a/testdata/p4_16_errors_outputs/table-entries-lpm-2.p4.entries.txt +++ b/testdata/p4_16_errors_outputs/table-entries-lpm-2.p4.entries.txt @@ -19,6 +19,7 @@ updates { } } } + is_const: true } } } @@ -43,6 +44,7 @@ updates { } } } + is_const: true } } } @@ -60,6 +62,7 @@ updates { } } } + is_const: true } } } @@ -77,6 +80,7 @@ updates { } } } + is_const: true } } } @@ -101,6 +105,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_errors_outputs/table-entries-lpm-2.p4.p4info.txt b/testdata/p4_16_errors_outputs/table-entries-lpm-2.p4.p4info.txt index 687c2a991c..bb14f3a1f6 100644 --- a/testdata/p4_16_errors_outputs/table-entries-lpm-2.p4.p4info.txt +++ b/testdata/p4_16_errors_outputs/table-entries-lpm-2.p4.p4info.txt @@ -21,6 +21,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_errors_outputs/table-entries-optional-2-bmv2.p4.entries.txt b/testdata/p4_16_errors_outputs/table-entries-optional-2-bmv2.p4.entries.txt index c29040cd27..0e761c9487 100644 --- a/testdata/p4_16_errors_outputs/table-entries-optional-2-bmv2.p4.entries.txt +++ b/testdata/p4_16_errors_outputs/table-entries-optional-2-bmv2.p4.entries.txt @@ -24,6 +24,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -48,6 +49,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -72,6 +74,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_errors_outputs/table-entries-optional-2-bmv2.p4.p4info.txt b/testdata/p4_16_errors_outputs/table-entries-optional-2-bmv2.p4.p4info.txt index cd455d0950..d21b80de87 100644 --- a/testdata/p4_16_errors_outputs/table-entries-optional-2-bmv2.p4.p4info.txt +++ b/testdata/p4_16_errors_outputs/table-entries-optional-2-bmv2.p4.p4info.txt @@ -27,6 +27,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/action-two-params.p4.entries.txt b/testdata/p4_16_samples_outputs/action-two-params.p4.entries.txt index ba6b99da56..f5098fe0da 100644 --- a/testdata/p4_16_samples_outputs/action-two-params.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/action-two-params.p4.entries.txt @@ -22,6 +22,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/action-two-params.p4.p4info.txt b/testdata/p4_16_samples_outputs/action-two-params.p4.p4info.txt index e8713cefd8..a5dfd9082a 100644 --- a/testdata/p4_16_samples_outputs/action-two-params.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/action-two-params.p4.p4info.txt @@ -22,6 +22,7 @@ tables { const_default_action_id: 25652968 size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/bvec-hdr-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/bvec-hdr-bmv2.p4.entries.txt index ea865f5060..5b7ad00eac 100644 --- a/testdata/p4_16_samples_outputs/bvec-hdr-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/bvec-hdr-bmv2.p4.entries.txt @@ -18,6 +18,7 @@ updates { } } } + is_const: true } } } @@ -41,6 +42,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/bvec-hdr-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/bvec-hdr-bmv2.p4.p4info.txt index 6f599d7c72..2f5fc3e851 100644 --- a/testdata/p4_16_samples_outputs/bvec-hdr-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/bvec-hdr-bmv2.p4.p4info.txt @@ -21,6 +21,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/checksum-l4-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/checksum-l4-bmv2.p4.entries.txt index 9c379f4ccd..0c22579676 100644 --- a/testdata/p4_16_samples_outputs/checksum-l4-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/checksum-l4-bmv2.p4.entries.txt @@ -14,6 +14,7 @@ updates { action_id: 25440736 } } + is_const: true } } } @@ -33,6 +34,7 @@ updates { action_id: 18556685 } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/checksum-l4-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/checksum-l4-bmv2.p4.p4info.txt index 879ec1f8ab..e223e1b5ff 100644 --- a/testdata/p4_16_samples_outputs/checksum-l4-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/checksum-l4-bmv2.p4.p4info.txt @@ -22,6 +22,7 @@ tables { const_default_action_id: 21257015 size: 1024 is_const_table: true + has_initial_entries: true } tables { preamble { @@ -44,6 +45,7 @@ tables { const_default_action_id: 21257015 size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/crc32-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/crc32-bmv2.p4.entries.txt index b46d59913e..6c7ec24ef9 100644 --- a/testdata/p4_16_samples_outputs/crc32-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/crc32-bmv2.p4.entries.txt @@ -14,6 +14,7 @@ updates { action_id: 24785092 } } + is_const: true } } } @@ -33,6 +34,7 @@ updates { action_id: 22867470 } } + is_const: true } } } @@ -52,6 +54,7 @@ updates { action_id: 32601303 } } + is_const: true } } } @@ -71,6 +74,7 @@ updates { action_id: 17405675 } } + is_const: true } } } @@ -90,6 +94,7 @@ updates { action_id: 31935968 } } + is_const: true } } } @@ -109,6 +114,7 @@ updates { action_id: 24997060 } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/crc32-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/crc32-bmv2.p4.p4info.txt index a5eabc420b..27acd85a82 100644 --- a/testdata/p4_16_samples_outputs/crc32-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/crc32-bmv2.p4.p4info.txt @@ -37,6 +37,7 @@ tables { const_default_action_id: 32121835 size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/init-entries-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/init-entries-bmv2.p4.entries.txt index b7a2d90434..b0c3482d93 100644 --- a/testdata/p4_16_samples_outputs/init-entries-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/init-entries-bmv2.p4.entries.txt @@ -26,6 +26,7 @@ updates { } } priority: 10 + is_const: true } } } @@ -119,6 +120,7 @@ updates { } } priority: 40 + is_const: true } } } @@ -205,6 +207,7 @@ updates { } } priority: 10 + is_const: true } } } @@ -298,6 +301,7 @@ updates { } } priority: 40 + is_const: true } } } @@ -384,6 +388,7 @@ updates { } } priority: 11 + is_const: true } } } @@ -477,6 +482,7 @@ updates { } } priority: 41 + is_const: true } } } @@ -563,6 +569,7 @@ updates { } } priority: 11 + is_const: true } } } @@ -656,6 +663,7 @@ updates { } } priority: 41 + is_const: true } } } @@ -742,6 +750,7 @@ updates { } } priority: 11 + is_const: true } } } @@ -835,6 +844,7 @@ updates { } } priority: 14 + is_const: true } } } @@ -921,6 +931,7 @@ updates { } } priority: 11 + is_const: true } } } @@ -1014,6 +1025,7 @@ updates { } } priority: 14 + is_const: true } } } @@ -1100,6 +1112,7 @@ updates { } } priority: 2001 + is_const: true } } } @@ -1224,6 +1237,7 @@ updates { } } priority: 2001 + is_const: true } } } @@ -1279,6 +1293,7 @@ updates { } } priority: 2001 + is_const: true } } } @@ -1403,6 +1418,7 @@ updates { } } priority: 2001 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/init-entries-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/init-entries-bmv2.p4.p4info.txt index 38c2f68760..d9d8d89d16 100644 --- a/testdata/p4_16_samples_outputs/init-entries-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/init-entries-bmv2.p4.p4info.txt @@ -26,6 +26,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } tables { preamble { @@ -52,6 +53,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } tables { preamble { @@ -78,6 +80,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } tables { preamble { @@ -104,6 +107,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } tables { preamble { @@ -130,6 +134,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } tables { preamble { @@ -156,6 +161,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } tables { preamble { @@ -182,6 +188,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } tables { preamble { @@ -208,6 +215,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } tables { preamble { @@ -234,6 +242,7 @@ tables { id: 26776898 } size: 1024 + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/issue1107.p4.entries.txt b/testdata/p4_16_samples_outputs/issue1107.p4.entries.txt index 32e753bc2d..200abd3975 100644 --- a/testdata/p4_16_samples_outputs/issue1107.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/issue1107.p4.entries.txt @@ -24,6 +24,7 @@ updates { } } } + is_const: true } } } @@ -53,6 +54,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/issue1107.p4.p4info.txt b/testdata/p4_16_samples_outputs/issue1107.p4.p4info.txt index f9f9516585..28be72b06f 100644 --- a/testdata/p4_16_samples_outputs/issue1107.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/issue1107.p4.p4info.txt @@ -29,6 +29,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/issue1834-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/issue1834-bmv2.p4.entries.txt index 76f9961a81..828d29c811 100644 --- a/testdata/p4_16_samples_outputs/issue1834-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/issue1834-bmv2.p4.entries.txt @@ -18,6 +18,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/issue1834-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/issue1834-bmv2.p4.p4info.txt index 65ced035b3..f85ba8cf5f 100644 --- a/testdata/p4_16_samples_outputs/issue1834-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/issue1834-bmv2.p4.p4info.txt @@ -23,6 +23,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/issue2904.p4.entries.txt b/testdata/p4_16_samples_outputs/issue2904.p4.entries.txt index 97ba6d5e31..43865fa18b 100644 --- a/testdata/p4_16_samples_outputs/issue2904.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/issue2904.p4.entries.txt @@ -20,6 +20,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -45,6 +46,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -63,6 +65,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/issue2904.p4.p4info.txt b/testdata/p4_16_samples_outputs/issue2904.p4.p4info.txt index ee3eda7462..2ba00bce65 100644 --- a/testdata/p4_16_samples_outputs/issue2904.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/issue2904.p4.p4info.txt @@ -23,6 +23,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/issue3550.p4.entries.txt b/testdata/p4_16_samples_outputs/issue3550.p4.entries.txt index 0733f77270..151d40841e 100644 --- a/testdata/p4_16_samples_outputs/issue3550.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/issue3550.p4.entries.txt @@ -57,6 +57,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -119,6 +120,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -181,6 +183,7 @@ updates { } } priority: 1 + is_const: true } } } @@ -223,6 +226,7 @@ updates { } } } + is_const: true } } } @@ -265,6 +269,7 @@ updates { } } } + is_const: true } } } @@ -307,6 +312,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/issue3550.p4.p4info.txt b/testdata/p4_16_samples_outputs/issue3550.p4.p4info.txt index 6f3a4ee792..81428d399b 100644 --- a/testdata/p4_16_samples_outputs/issue3550.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/issue3550.p4.p4info.txt @@ -57,6 +57,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } tables { preamble { @@ -96,6 +97,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/psa-dpdk-table-entries-exact-ternary.p4.entries.txt b/testdata/p4_16_samples_outputs/psa-dpdk-table-entries-exact-ternary.p4.entries.txt index fd2d19bb19..2bd9f20dd3 100644 --- a/testdata/p4_16_samples_outputs/psa-dpdk-table-entries-exact-ternary.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/psa-dpdk-table-entries-exact-ternary.p4.entries.txt @@ -26,6 +26,7 @@ updates { } } priority: 4 + is_const: true } } } @@ -57,6 +58,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -88,6 +90,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -112,6 +115,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/psa-dpdk-table-entries-exact-ternary.p4.p4info.txt b/testdata/p4_16_samples_outputs/psa-dpdk-table-entries-exact-ternary.p4.p4info.txt index 3c4077510c..a631b989c7 100644 --- a/testdata/p4_16_samples_outputs/psa-dpdk-table-entries-exact-ternary.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/psa-dpdk-table-entries-exact-ternary.p4.p4info.txt @@ -27,6 +27,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/saturated-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/saturated-bmv2.p4.entries.txt index 297d598b43..1b88f986da 100644 --- a/testdata/p4_16_samples_outputs/saturated-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/saturated-bmv2.p4.entries.txt @@ -14,6 +14,7 @@ updates { action_id: 20896217 } } + is_const: true } } } @@ -33,6 +34,7 @@ updates { action_id: 28347782 } } + is_const: true } } } @@ -52,6 +54,7 @@ updates { action_id: 30797801 } } + is_const: true } } } @@ -71,6 +74,7 @@ updates { action_id: 18945827 } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/saturated-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/saturated-bmv2.p4.p4info.txt index 309934ae6b..d2c357dba3 100644 --- a/testdata/p4_16_samples_outputs/saturated-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/saturated-bmv2.p4.p4info.txt @@ -30,6 +30,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-exact-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-exact-bmv2.p4.entries.txt index ea865f5060..5b7ad00eac 100644 --- a/testdata/p4_16_samples_outputs/table-entries-exact-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-exact-bmv2.p4.entries.txt @@ -18,6 +18,7 @@ updates { } } } + is_const: true } } } @@ -41,6 +42,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-exact-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-exact-bmv2.p4.p4info.txt index 09e33c173e..b52b54f712 100644 --- a/testdata/p4_16_samples_outputs/table-entries-exact-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-exact-bmv2.p4.p4info.txt @@ -21,6 +21,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-exact-ternary-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-exact-ternary-bmv2.p4.entries.txt index fd2d19bb19..2bd9f20dd3 100644 --- a/testdata/p4_16_samples_outputs/table-entries-exact-ternary-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-exact-ternary-bmv2.p4.entries.txt @@ -26,6 +26,7 @@ updates { } } priority: 4 + is_const: true } } } @@ -57,6 +58,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -88,6 +90,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -112,6 +115,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-exact-ternary-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-exact-ternary-bmv2.p4.p4info.txt index 6d7a19b999..ff0b5e462b 100644 --- a/testdata/p4_16_samples_outputs/table-entries-exact-ternary-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-exact-ternary-bmv2.p4.p4info.txt @@ -27,6 +27,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-lpm-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-lpm-bmv2.p4.entries.txt index 00b364fe64..394a7866f3 100644 --- a/testdata/p4_16_samples_outputs/table-entries-lpm-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-lpm-bmv2.p4.entries.txt @@ -19,6 +19,7 @@ updates { } } } + is_const: true } } } @@ -43,6 +44,7 @@ updates { } } } + is_const: true } } } @@ -60,6 +62,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-lpm-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-lpm-bmv2.p4.p4info.txt index 687c2a991c..bb14f3a1f6 100644 --- a/testdata/p4_16_samples_outputs/table-entries-lpm-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-lpm-bmv2.p4.p4info.txt @@ -21,6 +21,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-optional-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-optional-bmv2.p4.entries.txt index 61e9d52698..c84154cf6e 100644 --- a/testdata/p4_16_samples_outputs/table-entries-optional-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-optional-bmv2.p4.entries.txt @@ -25,6 +25,7 @@ updates { } } priority: 4 + is_const: true } } } @@ -49,6 +50,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -73,6 +75,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -91,6 +94,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-optional-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-optional-bmv2.p4.p4info.txt index cd455d0950..d21b80de87 100644 --- a/testdata/p4_16_samples_outputs/table-entries-optional-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-optional-bmv2.p4.p4info.txt @@ -27,6 +27,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-priority-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-priority-bmv2.p4.entries.txt index 8abf680237..dc8017acc7 100644 --- a/testdata/p4_16_samples_outputs/table-entries-priority-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-priority-bmv2.p4.entries.txt @@ -20,6 +20,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -45,6 +46,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -70,6 +72,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-priority-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-priority-bmv2.p4.p4info.txt index 7ff1fa629d..7302ed9948 100644 --- a/testdata/p4_16_samples_outputs/table-entries-priority-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-priority-bmv2.p4.p4info.txt @@ -21,6 +21,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-range-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-range-bmv2.p4.entries.txt index 5941d56de5..ff3d88278f 100644 --- a/testdata/p4_16_samples_outputs/table-entries-range-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-range-bmv2.p4.entries.txt @@ -20,6 +20,7 @@ updates { } } priority: 4 + is_const: true } } } @@ -45,6 +46,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -70,6 +72,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -88,6 +91,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-range-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-range-bmv2.p4.p4info.txt index 05eb7c6d2f..a10bbe3154 100644 --- a/testdata/p4_16_samples_outputs/table-entries-range-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-range-bmv2.p4.p4info.txt @@ -21,6 +21,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-ser-enum-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-ser-enum-bmv2.p4.entries.txt index dff14368d0..3dfb64b557 100644 --- a/testdata/p4_16_samples_outputs/table-entries-ser-enum-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-ser-enum-bmv2.p4.entries.txt @@ -19,6 +19,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -50,6 +51,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -74,6 +76,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-ser-enum-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-ser-enum-bmv2.p4.p4info.txt index 5ab1fab998..cdffc59089 100644 --- a/testdata/p4_16_samples_outputs/table-entries-ser-enum-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-ser-enum-bmv2.p4.p4info.txt @@ -28,6 +28,7 @@ tables { const_default_action_id: 21186165 size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-ternary-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-ternary-bmv2.p4.entries.txt index ce1e15996f..f56353d94a 100644 --- a/testdata/p4_16_samples_outputs/table-entries-ternary-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-ternary-bmv2.p4.entries.txt @@ -20,6 +20,7 @@ updates { } } priority: 4 + is_const: true } } } @@ -45,6 +46,7 @@ updates { } } priority: 3 + is_const: true } } } @@ -70,6 +72,7 @@ updates { } } priority: 2 + is_const: true } } } @@ -88,6 +91,7 @@ updates { } } priority: 1 + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-ternary-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-ternary-bmv2.p4.p4info.txt index 7ff1fa629d..7302ed9948 100644 --- a/testdata/p4_16_samples_outputs/table-entries-ternary-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-ternary-bmv2.p4.p4info.txt @@ -21,6 +21,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-entries-valid-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-entries-valid-bmv2.p4.entries.txt index 837d6136c6..29a4c73690 100644 --- a/testdata/p4_16_samples_outputs/table-entries-valid-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-entries-valid-bmv2.p4.entries.txt @@ -24,6 +24,7 @@ updates { } } } + is_const: true } } } @@ -53,6 +54,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-entries-valid-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-entries-valid-bmv2.p4.p4info.txt index 669f24b2ce..5bcd40fbad 100644 --- a/testdata/p4_16_samples_outputs/table-entries-valid-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-entries-valid-bmv2.p4.p4info.txt @@ -27,6 +27,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/table-key-serenum-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/table-key-serenum-bmv2.p4.entries.txt index e9c10d03ca..1770910217 100644 --- a/testdata/p4_16_samples_outputs/table-key-serenum-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/table-key-serenum-bmv2.p4.entries.txt @@ -18,6 +18,7 @@ updates { } } } + is_const: true } } } @@ -41,6 +42,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/table-key-serenum-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/table-key-serenum-bmv2.p4.p4info.txt index 569d42619c..06f09e715b 100644 --- a/testdata/p4_16_samples_outputs/table-key-serenum-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/table-key-serenum-bmv2.p4.p4info.txt @@ -23,6 +23,7 @@ tables { } size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble { diff --git a/testdata/p4_16_samples_outputs/v1model-const-entries-bmv2.p4.entries.txt b/testdata/p4_16_samples_outputs/v1model-const-entries-bmv2.p4.entries.txt index 8701a5ca90..5244fedda1 100644 --- a/testdata/p4_16_samples_outputs/v1model-const-entries-bmv2.p4.entries.txt +++ b/testdata/p4_16_samples_outputs/v1model-const-entries-bmv2.p4.entries.txt @@ -19,6 +19,7 @@ updates { } } } + is_const: true } } } @@ -43,6 +44,7 @@ updates { } } } + is_const: true } } } @@ -60,6 +62,7 @@ updates { } } } + is_const: true } } } diff --git a/testdata/p4_16_samples_outputs/v1model-const-entries-bmv2.p4.p4info.txt b/testdata/p4_16_samples_outputs/v1model-const-entries-bmv2.p4.p4info.txt index baf5e01bf2..e810ff3caa 100644 --- a/testdata/p4_16_samples_outputs/v1model-const-entries-bmv2.p4.p4info.txt +++ b/testdata/p4_16_samples_outputs/v1model-const-entries-bmv2.p4.p4info.txt @@ -22,6 +22,7 @@ tables { const_default_action_id: 30352513 size: 1024 is_const_table: true + has_initial_entries: true } actions { preamble {