Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328407
b: refs/heads/master
c: 60769a5
h: refs/heads/master
i:
  328405: 68a1ed9
  328403: 513edf0
  328399: e975254
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 1, 2012
1 parent d454064 commit d69164a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9e6bc644e557338221e75c242ab12c275a67d1b
refs/heads/master: 60769a5dcd8755715c7143b4571d5c44f01796f1
3 changes: 3 additions & 0 deletions trunk/include/net/ipip.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define __NET_IPIP_H 1

#include <linux/if_tunnel.h>
#include <net/gro_cells.h>
#include <net/ip.h>

/* Keep error state on tunnel for 30 sec */
Expand Down Expand Up @@ -36,6 +37,8 @@ struct ip_tunnel {
#endif
struct ip_tunnel_prl_entry __rcu *prl; /* potential router list */
unsigned int prl_count; /* # of entries in PRL */

struct gro_cells gro_cells;
};

struct ip_tunnel_prl_entry {
Expand Down
13 changes: 11 additions & 2 deletions trunk/net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,7 @@ static int ipgre_rcv(struct sk_buff *skb)
tstats->rx_bytes += skb->len;
u64_stats_update_end(&tstats->syncp);

netif_rx(skb);

gro_cells_receive(&tunnel->gro_cells, skb);
return 0;
}
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
Expand Down Expand Up @@ -1319,6 +1318,9 @@ static const struct net_device_ops ipgre_netdev_ops = {

static void ipgre_dev_free(struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);

gro_cells_destroy(&tunnel->gro_cells);
free_percpu(dev->tstats);
free_netdev(dev);
}
Expand Down Expand Up @@ -1350,6 +1352,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
{
struct ip_tunnel *tunnel;
struct iphdr *iph;
int err;

tunnel = netdev_priv(dev);
iph = &tunnel->parms.iph;
Expand All @@ -1376,6 +1379,12 @@ static int ipgre_tunnel_init(struct net_device *dev)
if (!dev->tstats)
return -ENOMEM;

err = gro_cells_init(&tunnel->gro_cells, dev);
if (err) {
free_percpu(dev->tstats);
return err;
}

return 0;
}

Expand Down

0 comments on commit d69164a

Please sign in to comment.