By: Wilco (Wilco.Dijkstra.delete@this.ntlworld.com), July 17, 2015 1:57 pm
Room: Moderated Discussions
Simon Farnsworth (simon.delete@this.farnz.org.uk) on July 16, 2015 12:41 pm wrote:
> The trouble here is that it's impossible to have perfect hardware for all loads - for Ethernet
> MAC handling, a 6 byte load would be lovely to have, but then the TCP sequence number is still
> unaligned - it's a 4 byte quantity that's 4 bytes into the IP payload, which is 20 + 4 * IHL
> bytes into the IP packet, which is 14 or 18 bytes into the Ethernet packet, and therefore 2
> bytes off natural alignment, even if I have instructions to load a MAC in a single run.
Has the ancient trick of prepadding with 2 bytes been forgotten? That allows for 8 byte alignment of both header and payload. Prepadding with 10 bytes would allow 16-byte alignment of the payload.
Wilco
> The trouble here is that it's impossible to have perfect hardware for all loads - for Ethernet
> MAC handling, a 6 byte load would be lovely to have, but then the TCP sequence number is still
> unaligned - it's a 4 byte quantity that's 4 bytes into the IP payload, which is 20 + 4 * IHL
> bytes into the IP packet, which is 14 or 18 bytes into the Ethernet packet, and therefore 2
> bytes off natural alignment, even if I have instructions to load a MAC in a single run.
Has the ancient trick of prepadding with 2 bytes been forgotten? That allows for 8 byte alignment of both header and payload. Prepadding with 10 bytes would allow 16-byte alignment of the payload.
Wilco