Vladimir Medvedkin, Jul 18, 2024 at 23:25:
I think alignment should be 1 since in FIB6 users usually don't copy IPv6 address and just provide a pointer to the memory inside the packet. Current vector implementation loads IPv6 addresses using unaligned access ( _mm512_loadu_si512) so it doesn't rely on alignment.
Yes, my intention was exactly that, being able to map that structure directly in packets without copying them on the stack.
> 2. In the IPv6 packet header, the IPv6 addresses are not 16 byte aligned, > they are 8 byte aligned. So we cannot make the IPv6 address type 16 byte > aligned.
Not necessary, if Ethernet frame in mbuf starts on 8b aligned address, then IPv6 is aligned only by 2 bytes.
We probably could safely say that aligning on 2 bytes would be OK. But is there any benefit, performance wise, in doing so? Keeping the same alignment as before the change would at least make it ABI compatible.