The p4 spec states that the first bit from a packet extracts into the last bit of bit-string types, this means that we go from protocol-endian to p4-endian and then back to protocol-endian on the way out.
This patch introduces reordering logic over bit<n> types to ensure that bits land in header fields in the expected order.
The p4 spec states that the first bit from a packet extracts into the last bit of bit-string types, this means that we go from protocol-endian to p4-endian and then back to protocol-endian on the way out.
This patch introduces reordering logic over
bit<n>
types to ensure that bits land in header fields in the expected order.Fixes #5.