net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()
authorAmir Vadai <amir@vadai.me>
Thu, 8 Sep 2016 13:23:45 +0000 (16:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Sep 2016 03:53:55 +0000 (20:53 -0700)
commitd817f432c2ab7639a4f69de73eafdc55e57c45ad
treefc378fb961d465b15248076fc884e3c90fb228f6
parente808bb6ed042020d3a15cb6e85ca646bc7c9eda8
net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

Add utility functions to convert a 32 bits key into a 64 bits tunnel and
vice versa.
These functions will be used instead of cloning code in GRE and VXLAN,
and in tc act_iptunnel which will be introduced in a following patch in
this patchset.

Signed-off-by: Amir Vadai <amir@vadai.me>
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c
include/net/ip_tunnels.h
include/net/vxlan.h
net/ipv4/ip_gre.c