vxlan: keep flags and vni in network byte order
authorJiri Benc <jbenc@redhat.com>
Tue, 16 Feb 2016 20:58:58 +0000 (21:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2016 04:52:11 +0000 (23:52 -0500)
commit54bfd872bf16d40b61bd0cd9b769b2fef67dd272
treef7be552f244d9be7eccbda77cf686f43be157739
parentd4ac05ff3697e036dcb0e2e284c5f7eb77cc0966
vxlan: keep flags and vni in network byte order

Prevent repeated conversions from and to network order in the fast path.

To achieve this, define all flag constants in big endian order and store VNI
as __be32. To prevent confusion between the actual VNI value and the VNI
field from the header (which contains additional reserved byte), strictly
distinguish between "vni" and "vni_field".

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c
include/net/vxlan.h