> > NSH can be carried over Ethernet with a 14 byte header. In that case > > the total NSH header would typically be 16-bit aligned, so that all > > 32-bit members would be misaligned. > > See NET_IP_ALIGN in include/linux/skbuff.h.
If I understand correctly, this is a default definition that can be overridden by drivers so that we still cannot rely on the Ethernet payload always being 32-bit-aligned. Furthermore, there seem to be machine architectures that cannot handle misaligned 32-bit access at all (not even with a performance penalty). Or why else does OVS user space code take so great pain to model possible misalignment and provide/use safe access functions? Does Linux kernel code generally ignore this risk? /Jan