Thread (4 messages) 4 messages, 3 authors, 2017-08-21

RE: [PATCH net-next v4] openvswitch: enable NSH support

flat view

From: Jan Scheurich <hidden>
Date: 2017-08-21 10:10:41

quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help