mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-12-26 19:51:57 +01:00
The P4Runtime server may send canonical byte strings (i.e., non-padded byte strings). In ONOS we ensure, in the codecs, that all byte strings are padded to match the model (P4Info) bit width. In this way, we provide read-write symmetry inside ONOS. ONOS always pads byte strings when sending messages to the P4Runtime server. This patch doesn't enforce read-write symmetry between P4Runtime client and server on the wire. N.B.: the current padding implementation works ONLY when using non-negative integer. Change-Id: I9f8e43de015bd0929dd543d7688c8e71bf5fe98d