-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document JSON field base_default_next
#1289
Comments
This requires more double-checking to see whether it is actually true, but perhaps this statement is true:
Today, a JSON table produced by p4c bmv2 back end has no However, if we implement this enhancement to p4c: p4lang/p4c#5101 then those tables will also have Today, there might be P4_14 source code that the p4c bmv2 back end will have no Background: The P4_16 language spec has defined since version 1.2.2 (released May 2021 [1]) that if a P4 table does not explicitly specify a [1] See https://p4.org/wp-content/uploads/2024/10/P4-16-spec-v1.2.5.html#sec-summary-of-changes-made-in-version-122-released-may-17-2021, the bullet item mentioning NoAction, and in the section that bullet item links to, search for NoAction. |
I have today learned the following by compiling this p4c test program: https://github.com/p4lang/p4c/blob/main/testdata/p4_16_samples/action_profile-bmv2.p4 and running a simple PTF test that sends a packet through, that always misses on both tables, because no entries, profiles, or groups have been added to either of the tables. As of 2025-Jan-17, and since 2016, the p4c bmv2 backend has given a warning when attempting to compile P4_16 v1model architecture programs with a This results in those 2 tables in the JSON have no I'd be happy to forever eliminate support for tables that have no |
The current docs/JSON_format.md document does not mention field
base_default_next
. It would be good to mention something about it, including any cases where we know that its presence or absence actually affects how BMv2 behaves for such a program.Motivated by this comment, and also see the follow up comments for more details: https://github.com/p4lang/behavioral-model/pull/1287/files#r1913623565
The text was updated successfully, but these errors were encountered: