Closed verios-google closed 1 year ago
My suggested update to the relevant paragraph is:
Upon receiving a binary string, the P4Runtime server checks the length of the byte string. If the string's byte length is zero, the server always rejects the string. Clients are not required to perform this check. The receiver then verifies that the value encoded by the string fits within the expected type (signed or unsigned) and P4Info-specified bitwidth for the P4 object value.
Thanks @verios-google would you be willing to submit a pull-request to make this change, assuming we can come to an agreement?
Another possible edit would be to insert the word maximum into the original description, as follows:
"Upon receiving a binary string, the P4Runtime receiver (whether the server or the client) does not impose any restrictions on the maximum length of the string itself."
Ah, that's an even simpler change, and it provides useful explicit information. I'll do that
The Bytestring section of the specification states "Upon receiving a binary string, the P4Runtime receiver (whether the server or the client) does not impose any restrictions on the length of the string itself."
But also states: 1)"As a special case, define that the value $V=0$ requires at least $A=1$ bit to represent, regardless of whether it is signed or unsigned." 2)"If the string's byte length is zero, the server always rejects the string."
The previous 2 statements conflict with the first statement. The first statement should be removed or updated to be consistent.