Closed duskmoon314 closed 1 month ago
If the counter_id
field is set to 0, then I would expect a P4Runtime implementation not to even bother looking at the index
field, and the value you set should be irrelevant.
Maybe the second bullet point should just start with Otherwise,
, to make it clear that these 2 checks are really ordered and mutually exclusive.
@duskmoon314 Would you like to submit a PR to clarify the spec's language per @antoninbas 's feedback above? It'd be great to get your contribution. Thanks in advance!
Sure! I have submitted a PR based on the feedback above.
I'm sorry for responding late due to some personal issue.
I'm reading the doc of reading and writing CounterEntry and getting confused about wildcard reading.
In the doc:
In the proto:
To my understanding, the results of different parameters are:
counter_id: x, index: y
=> one entry of counterx
and its index isy
counter_id: x, index: UNSET
=> all entries of counterx
counter_id: 0, index: UNSET
=> all entries of all counterscounter_id: 0, index: y
=> Undefined behavior? Or all entries that index arey
? Or does some error indicate that the parameter is illegal?