GRE: Refactor GRE tunneling code.
authorPravin B Shelar <pshelar@nicira.com>
Mon, 25 Mar 2013 14:49:35 +0000 (14:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Mar 2013 16:27:18 +0000 (12:27 -0400)
commitc54419321455631079c7d6e60bc732dd0c5914c5
treea0ad703b72313b98e70f4166bcea9a328d09e937
parenteaac5f3d3ad33547b299935e6db0cfc7be9a576a
GRE: Refactor GRE tunneling code.

Following patch refactors GRE code into ip tunneling code and GRE
specific code. Common tunneling code is moved to ip_tunnel module.
ip_tunnel module is written as generic library which can be used
by different tunneling implementations.

ip_tunnel module contains following components:
 - packet xmit and rcv generic code. xmit flow looks like
   (gre_xmit/ipip_xmit)->ip_tunnel_xmit->ip_local_out.
 - hash table of all devices.
 - lookup for tunnel devices.
 - control plane operations like device create, destroy, ioctl, netlink
   operations code.
 - registration for tunneling modules, like gre, ipip etc.
 - define single pcpu_tstats dev->tstats.
 - struct tnl_ptk_info added to pass parsed tunnel packet parameters.

ipip.h header is renamed to ip_tunnel.h

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 files changed:
drivers/net/vxlan.c
include/net/gre.h
include/net/ip6_tunnel.h
include/net/ip_tunnels.h [new file with mode: 0644]
include/net/ipip.h [deleted file]
net/ipv4/Kconfig
net/ipv4/Makefile
net/ipv4/af_inet.c
net/ipv4/gre.c
net/ipv4/ip_gre.c
net/ipv4/ip_tunnel.c [new file with mode: 0644]
net/ipv4/ip_vti.c
net/ipv4/ipip.c
net/ipv4/ipmr.c
net/ipv6/af_inet6.c
net/ipv6/ip6_gre.c
net/ipv6/ip6_tunnel.c
net/ipv6/sit.c