We can avoid extra computational cycles in coverting header fields from network to host in parser and host to network in deparser. Everytime we do, for example, a comparison between header fields and a value, we should convert that value to network order. For example, something like comparing the ether type should to see if it's IP should do the following:
select_0 = hdr->ethernet.etherType;
if (select_0 == htons(0x800))goto parse_ipv4;
Since hdr->ethernet.etherType is in big endian.
We are using comparison as an example, but this applies to all arithmetic/logical operations where we have a header and another value that is in host endian.