diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-03-25 10:49:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-26 12:27:18 -0400 |
commit | c54419321455631079c7d6e60bc732dd0c5914c5 (patch) | |
tree | a0ad703b72313b98e70f4166bcea9a328d09e937 /net/ipv6 | |
parent | eaac5f3d3ad33547b299935e6db0cfc7be9a576a (diff) |
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>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/af_inet6.c | 1 | ||||
-rw-r--r-- | net/ipv6/ip6_gre.c | 1 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 1 | ||||
-rw-r--r-- | net/ipv6/sit.c | 2 |
4 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index f56277f15903..ab5c7ad482cd 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include <net/udp.h> | 49 | #include <net/udp.h> |
50 | #include <net/udplite.h> | 50 | #include <net/udplite.h> |
51 | #include <net/tcp.h> | 51 | #include <net/tcp.h> |
52 | #include <net/ipip.h> | ||
53 | #include <net/protocol.h> | 52 | #include <net/protocol.h> |
54 | #include <net/inet_common.h> | 53 | #include <net/inet_common.h> |
55 | #include <net/route.h> | 54 | #include <net/route.h> |
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 6a6ba73ff265..df89ccaaceaa 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include <net/sock.h> | 39 | #include <net/sock.h> |
40 | #include <net/ip.h> | 40 | #include <net/ip.h> |
41 | #include <net/ip_tunnels.h> | ||
41 | #include <net/icmp.h> | 42 | #include <net/icmp.h> |
42 | #include <net/protocol.h> | 43 | #include <net/protocol.h> |
43 | #include <net/addrconf.h> | 44 | #include <net/addrconf.h> |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index bef3fedfdc56..1e55866cead7 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -47,6 +47,7 @@ | |||
47 | 47 | ||
48 | #include <net/icmp.h> | 48 | #include <net/icmp.h> |
49 | #include <net/ip.h> | 49 | #include <net/ip.h> |
50 | #include <net/ip_tunnels.h> | ||
50 | #include <net/ipv6.h> | 51 | #include <net/ipv6.h> |
51 | #include <net/ip6_route.h> | 52 | #include <net/ip6_route.h> |
52 | #include <net/addrconf.h> | 53 | #include <net/addrconf.h> |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 898e671a526b..ee4fc570cf2c 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #include <net/ip.h> | 49 | #include <net/ip.h> |
50 | #include <net/udp.h> | 50 | #include <net/udp.h> |
51 | #include <net/icmp.h> | 51 | #include <net/icmp.h> |
52 | #include <net/ipip.h> | 52 | #include <net/ip_tunnels.h> |
53 | #include <net/inet_ecn.h> | 53 | #include <net/inet_ecn.h> |
54 | #include <net/xfrm.h> | 54 | #include <net/xfrm.h> |
55 | #include <net/dsfield.h> | 55 | #include <net/dsfield.h> |