From: Jiri Benc <jb...@redhat.com> Date: Tue, 20 Sep 2016 19:09:29 +0200
> But the point stands, we have much greater problems here than VXLAN. > And I don't think that wrapping all IP address accesses into > get/put_unaligned all around the stack is the solution. Right, and I don't like marking things as packed either. We need something that really solves the problem. We can't change the existing protocols, but we can perhaps change the geometry of the SKB when we deal with such protocols. For example, we can memmove() to align the headers at skb->data and then for the skb->data portion past the headers we insert a frag pointing to it at the front of the frag list. So we "memmove" down, creating a gap, and then past the gap is the post-header area which gets inserted into the head of the SKB's fraglist. That will align all of the subsequent headers and avoid the unaligned accesses after the vxlan header. Alternatively we can do Alexander Duyck's trick, by pushing the headers into the frag list, forcing a pull and realignment by the next protocol layer. This is so much better than the little hacks sprinkled all over the problem and tackles the fundamental issue. Thanks.