[PATCH v9 2/2] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests
David Laight
David.Laight at ACULAB.COM
Fri Feb 23 21:28:57 AEDT 2024
From: Christophe Leroy
> Sent: 23 February 2024 10:07
...
> > +/* Ethernet headers are 14 bytes and NET_IP_ALIGN is used to align them */
> > +#define IP_ALIGNMENT (14 + NET_IP_ALIGN)
>
> Only if no VLAN.
>
> When using VLANs it is 4 bytes more. But why do you mind that at all ?
Wasn't one architecture faulting on a double-register read?
Where that had to be aligned (probably 8 bytes) but a normal
memory read could be misaligned?
I doubt it is valid to assume that the IP headers is 8 byte
aligned when NET_IP_ALIGN is 2.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
More information about the Linuxppc-dev
mailing list