]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf763ecd0e6eb5a08b804a4631b90c97e78c4e131
treef7be552f244d9be7eccbda77cf686f43be157739
parentdb70205e51a61fea029ce7702ea0e9fe03a83f1e
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