Minor fix-ups to support for tables with initial entries and their P4Runtime API output files #4016
Labels
control-plane
Topics related to the control-plane or P4Runtime.
enhancement
This topic discusses an improvement to existing compiler code.
I approved of PR #3748 because I think it is a good significant start at a full implementation of tables with
entries
withoutconst
beforeentries
, and I preferred having something that is nearly complete merged in sooner, and make minor additions or fixes to it later, because I do not know how long it will take for the P4 API work group to finalize their decisions on those details.See p4lang/p4runtime#426 for the issue on the P4Runtime API specification. When that issue is resolved, this one should be revisited.
The minor issues that I know of that remain are:
it seems likely that we will want some per-table property in the P4Info file for tables that have
entries
but notconst entries
, and this seems likely to be some new field, notis_const_table
. When a name and semantics for that new field have been decided, it should be written to the P4Info file for such tables by p4c.How should entries marked
const
inside ofentries
be distinguished from those NOT markedconst
, inside of the "entries" output file?How should priorities be written to the entries output file for tables with
largest_priority_wins = false
? Since the entries file is always consumed by P4Runtime API, I would recommend that the priority values calculated for entries from the source code by p4c should become(M-P)
in the P4Runtime entries file, whereP
is the priority of the entry calculated by p4c, andM
is some maximum supported priority value by P4Runtime API, perhaps 2^32 or (2^32-1).The text was updated successfully, but these errors were encountered: