Thread (23 messages) 23 messages, 6 authors, 2016-09-28

Re: [PATCH net-next] net/vxlan: Avoid unaligned access in vxlan_build_skb()

flat view

From: Sowmini Varadhan <hidden>
Date: 2016-09-20 15:49:31

On (09/20/16 08:31), Tom Herbert wrote:
On Tue, Sep 20, 2016 at 7:27 AM, Sowmini Varadhan
[off-list ref] wrote:
quoted
The vxlan header is at offset (14 + 20 + 8) into the packet,
so the vxh is not aligned in vxlan_build_skb. Use [get/put]_unaligned
functions to modify flags and vni field in the vxh.
I'm wondering if VXLAN is just the tip of the iceberg. Wouldn't this
is also be a problem in GRE and Geneve when they encapsulate Ethernet?
What about the outer IP header, wouldn't that potentially have
unaligned accesses also when creating it?
Indeed. All of the above are true, and we have to conquer
each unaligned access, one at a time.

There's also the over-arching problem of arbitrary encapsulations
introducing intervening headers that throw off alignment. 
That would be a design discussion to be had with the ietf.

--Sowmini
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help