aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipip.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-11-08 04:59:52 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-09 17:01:05 -0500
commitc3b89fbba339aae533e380839fa078787635356e (patch)
treebeaf74351d9282e7e3ba17710155258f97890f9d /net/ipv4/ipip.c
parentd1ee40f96036e838f0849dd31c16e548a904176c (diff)
ipip: add GSO support
In commit 6b78f16e4b (gre: add GSO support) we added GSO support to GRE tunnels. This patch does the same for IPIP tunnels. Performance of single TCP flow over an IPIP tunnel is increased by 40% Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Maciej Żenczykowski <maze@google.com> Cc: Tom Herbert <therbert@google.com> Cc: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r--net/ipv4/ipip.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index e15b45297c09..cc49cc1ff3b9 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -479,6 +479,10 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
479 if (skb->protocol != htons(ETH_P_IP)) 479 if (skb->protocol != htons(ETH_P_IP))
480 goto tx_error; 480 goto tx_error;
481 481
482 if (skb->ip_summed == CHECKSUM_PARTIAL &&
483 skb_checksum_help(skb))
484 goto tx_error;
485
482 if (tos & 1) 486 if (tos & 1)
483 tos = old_iph->tos; 487 tos = old_iph->tos;
484 488
@@ -773,6 +777,11 @@ static void ipip_dev_free(struct net_device *dev)
773 free_netdev(dev); 777 free_netdev(dev);
774} 778}
775 779
780#define IPIP_FEATURES (NETIF_F_SG | \
781 NETIF_F_FRAGLIST | \
782 NETIF_F_HIGHDMA | \
783 NETIF_F_HW_CSUM)
784
776static void ipip_tunnel_setup(struct net_device *dev) 785static void ipip_tunnel_setup(struct net_device *dev)
777{ 786{
778 dev->netdev_ops = &ipip_netdev_ops; 787 dev->netdev_ops = &ipip_netdev_ops;
@@ -787,6 +796,9 @@ static void ipip_tunnel_setup(struct net_device *dev)
787 dev->features |= NETIF_F_NETNS_LOCAL; 796 dev->features |= NETIF_F_NETNS_LOCAL;
788 dev->features |= NETIF_F_LLTX; 797 dev->features |= NETIF_F_LLTX;
789 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 798 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
799
800 dev->features |= IPIP_FEATURES;
801 dev->hw_features |= IPIP_FEATURES;
790} 802}
791 803
792static int ipip_tunnel_init(struct net_device *dev) 804static int ipip_tunnel_init(struct net_device *dev)