aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_gre.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-09-13 17:25:33 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-19 15:40:15 -0400
commit6b78f16e4bdde3936b11690bdb970be423e07a07 (patch)
tree7653996298e2171d49dfc861b13260bdfb1c7e11 /net/ipv4/ip_gre.c
parent2c60db037034d27f8c636403355d52872da92f81 (diff)
gre: add GSO support
Add GSO support to GRE tunnels. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Maciej Żenczykowski <maze@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r--net/ipv4/ip_gre.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index b062a98574f2..f233c1da2077 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -745,6 +745,10 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
745 __be32 dst; 745 __be32 dst;
746 int mtu; 746 int mtu;
747 747
748 if (skb->ip_summed == CHECKSUM_PARTIAL &&
749 skb_checksum_help(skb))
750 goto tx_error;
751
748 if (dev->type == ARPHRD_ETHER) 752 if (dev->type == ARPHRD_ETHER)
749 IPCB(skb)->flags = 0; 753 IPCB(skb)->flags = 0;
750 754
@@ -1296,6 +1300,11 @@ static void ipgre_dev_free(struct net_device *dev)
1296 free_netdev(dev); 1300 free_netdev(dev);
1297} 1301}
1298 1302
1303#define GRE_FEATURES (NETIF_F_SG | \
1304 NETIF_F_FRAGLIST | \
1305 NETIF_F_HIGHDMA | \
1306 NETIF_F_HW_CSUM)
1307
1299static void ipgre_tunnel_setup(struct net_device *dev) 1308static void ipgre_tunnel_setup(struct net_device *dev)
1300{ 1309{
1301 dev->netdev_ops = &ipgre_netdev_ops; 1310 dev->netdev_ops = &ipgre_netdev_ops;
@@ -1309,6 +1318,9 @@ static void ipgre_tunnel_setup(struct net_device *dev)
1309 dev->addr_len = 4; 1318 dev->addr_len = 4;
1310 dev->features |= NETIF_F_NETNS_LOCAL; 1319 dev->features |= NETIF_F_NETNS_LOCAL;
1311 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 1320 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
1321
1322 dev->features |= GRE_FEATURES;
1323 dev->hw_features |= GRE_FEATURES;
1312} 1324}
1313 1325
1314static int ipgre_tunnel_init(struct net_device *dev) 1326static int ipgre_tunnel_init(struct net_device *dev)