The different values for the ID prefix (first byte of every ID) are now
defined in p4info.proto. In this commit, we switch to using these values
when generating the P4Info message. One notable difference is that the
direct & indirect versions of counters / meters now use a different
prefix value for their ids.
This required modifying the control-plane Makefile because of the
addition of a new protobuf source file (p4types.proto).
348cdc7...
by
Calin Cascaval <email address hidden>
adds support for saturating arithmetic in P4_16 (#1241)
* adds support for saturating arithmetic in P4_16
We add support for |+| and |-| in the frontend of the compiler, as
well as bmv2 backend support. This includes defining two binary
operation IR nodes for saturating addition and subtraction, and
generating the json for bmv2 as defined in https://github.com/p4lang/behavioral-model/pull/590. For that, we
update the json version to 2.18.
We also added a test that ensures that saturating arithmetic properly
bounds the min and max values for signed and unsigned integer
operations.
Still to do:
- translate P4_14 saturating operations to the new IR expression nodes.