diff options
-rw-r--r-- | include/net/ipip.h | 3 | ||||
-rw-r--r-- | net/ipv4/ip_gre.c | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/net/ipip.h b/include/net/ipip.h index a93cf6d7e94b..ddc077c51f32 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __NET_IPIP_H 1 | 2 | #define __NET_IPIP_H 1 |
3 | 3 | ||
4 | #include <linux/if_tunnel.h> | 4 | #include <linux/if_tunnel.h> |
5 | #include <net/gro_cells.h> | ||
5 | #include <net/ip.h> | 6 | #include <net/ip.h> |
6 | 7 | ||
7 | /* Keep error state on tunnel for 30 sec */ | 8 | /* Keep error state on tunnel for 30 sec */ |
@@ -36,6 +37,8 @@ struct ip_tunnel { | |||
36 | #endif | 37 | #endif |
37 | struct ip_tunnel_prl_entry __rcu *prl; /* potential router list */ | 38 | struct ip_tunnel_prl_entry __rcu *prl; /* potential router list */ |
38 | unsigned int prl_count; /* # of entries in PRL */ | 39 | unsigned int prl_count; /* # of entries in PRL */ |
40 | |||
41 | struct gro_cells gro_cells; | ||
39 | }; | 42 | }; |
40 | 43 | ||
41 | struct ip_tunnel_prl_entry { | 44 | struct ip_tunnel_prl_entry { |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index ef0b861ce044..b1871d993d22 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -740,8 +740,7 @@ static int ipgre_rcv(struct sk_buff *skb) | |||
740 | tstats->rx_bytes += skb->len; | 740 | tstats->rx_bytes += skb->len; |
741 | u64_stats_update_end(&tstats->syncp); | 741 | u64_stats_update_end(&tstats->syncp); |
742 | 742 | ||
743 | netif_rx(skb); | 743 | gro_cells_receive(&tunnel->gro_cells, skb); |
744 | |||
745 | return 0; | 744 | return 0; |
746 | } | 745 | } |
747 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); | 746 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); |
@@ -1319,6 +1318,9 @@ static const struct net_device_ops ipgre_netdev_ops = { | |||
1319 | 1318 | ||
1320 | static void ipgre_dev_free(struct net_device *dev) | 1319 | static void ipgre_dev_free(struct net_device *dev) |
1321 | { | 1320 | { |
1321 | struct ip_tunnel *tunnel = netdev_priv(dev); | ||
1322 | |||
1323 | gro_cells_destroy(&tunnel->gro_cells); | ||
1322 | free_percpu(dev->tstats); | 1324 | free_percpu(dev->tstats); |
1323 | free_netdev(dev); | 1325 | free_netdev(dev); |
1324 | } | 1326 | } |
@@ -1350,6 +1352,7 @@ static int ipgre_tunnel_init(struct net_device *dev) | |||
1350 | { | 1352 | { |
1351 | struct ip_tunnel *tunnel; | 1353 | struct ip_tunnel *tunnel; |
1352 | struct iphdr *iph; | 1354 | struct iphdr *iph; |
1355 | int err; | ||
1353 | 1356 | ||
1354 | tunnel = netdev_priv(dev); | 1357 | tunnel = netdev_priv(dev); |
1355 | iph = &tunnel->parms.iph; | 1358 | iph = &tunnel->parms.iph; |
@@ -1376,6 +1379,12 @@ static int ipgre_tunnel_init(struct net_device *dev) | |||
1376 | if (!dev->tstats) | 1379 | if (!dev->tstats) |
1377 | return -ENOMEM; | 1380 | return -ENOMEM; |
1378 | 1381 | ||
1382 | err = gro_cells_init(&tunnel->gro_cells, dev); | ||
1383 | if (err) { | ||
1384 | free_percpu(dev->tstats); | ||
1385 | return err; | ||
1386 | } | ||
1387 | |||
1379 | return 0; | 1388 | return 0; |
1380 | } | 1389 | } |
1381 | 1390 | ||