p4runtime
p4runtime copied to clipboard
[Deprecated] Add support for different meter types.
Currently, the P4Runtime specification only supports trTCM (two rate two color meters) as per RFC 2698. However, in real hardware these sometimes use more hardware resources compared to single rate two color meters.
This PR is trying to introduce a way of restricting the meters clients can program to not use the full power of trTCM if they don't need it in order to save resources. I'm imagining the type of the meter being populated by users in the P4 program through an annotation on the meter itself (e.g. @single_rate_two_color or @two_rate_three_color).
Obviously, this is currently a WIP and I'd want to add something to the spec too, but I wanted to check the proto idea first.
Updated the specification with the related text.
Plan from April WG meeting:
- Require
pir == cir
andpburst == cburst
. - Add Single Rate Three Color Marker (RFC 2697) type.
- Add an EBS to MeterConfig to support 2
All of the AIs should now be fixed. PTAL!
Looks like I somehow have to rebase this on main. Will figure it out :'(
I don't understand why this is complaining. I thought rebasing onto main and then pushing would resolve the merge conflicts :'(. If anyone knows git better than I (a trivial task), is there something clever I can do here to resolve this locally and then push? Resolving conflict of binaries is... painful ;).
I don't know where your merge conflicts are.
But can you just check out the version from main instead of merging?
git checkout origin/main <file>
Unfortunately not really reviewable at the moment since it seems to contain changes from other PRs in the diff.
Deprecating this in favor of https://github.com/p4lang/p4runtime/pull/484, since apparently, merge conflicts are beyond my capabilities ;D