net: lwtunnel: Handle fragmentation
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Thu, 25 Aug 2016 03:10:43 +0000 (20:10 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Aug 2016 05:27:18 +0000 (22:27 -0700)
commit14972cbd34ff668c390cbd2e6497323484c9e812
tree2931fb8d4a03a3ecf457f9789abd802cecdc4fbb
parent41852497a9205964b958a245a9526040b980926f
net: lwtunnel: Handle fragmentation

Today mpls iptunnel lwtunnel_output redirect expects the tunnel
output function to handle fragmentation. This is ok but can be
avoided if we did not do the mpls output redirect too early.
ie we could wait until ip fragmentation is done and then call
mpls output for each ip fragment.

To make this work we will need,
1) the lwtunnel state to carry encap headroom
2) and do the redirect to the encap output handler on the ip fragment
(essentially do the output redirect after fragmentation)

This patch adds tunnel headroom in lwtstate to make sure we
account for tunnel data in mtu calculations during fragmentation
and adds new xmit redirect handler to redirect to lwtunnel xmit func
after ip fragmentation.

This includes IPV6 and some mtu fixes and testing from David Ahern.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/lwtunnel.h
net/core/lwtunnel.c
net/ipv4/ip_output.c
net/ipv4/route.c
net/ipv6/ip6_output.c
net/ipv6/route.c
net/mpls/mpls_iptunnel.c