diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-09-23 12:28:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-25 00:39:22 +0200 |
commit | a43912ab1925788765208da5cd664b6f8e011d08 (patch) | |
tree | 6f522dba1fd414b7da3999fa2da062d80a550874 /net/ipv6/ip6_tunnel.c | |
parent | ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2 (diff) | |
download | linux-a43912ab1925788765208da5cd664b6f8e011d08.tar.xz linux-a43912ab1925788765208da5cd664b6f8e011d08.zip |
tunnel: eliminate recursion field
It seems recursion field from "struct ip_tunnel" is not anymore needed.
recursion prevention is done at the upper level (in dev_queue_xmit()),
since we use HARD_TX_LOCK protection for tunnels.
This avoids a cache line ping pong on "struct ip_tunnel" : This structure
should be now mostly read on xmit and receive paths.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 7d25bbe32110..c595bbe1ed99 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -1043,11 +1043,6 @@ ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) struct net_device_stats *stats = &t->dev->stats; int ret; - if (t->recursion++) { - stats->collisions++; - goto tx_err; - } - switch (skb->protocol) { case htons(ETH_P_IP): ret = ip4ip6_tnl_xmit(skb, dev); @@ -1062,14 +1057,12 @@ ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) if (ret < 0) goto tx_err; - t->recursion--; return NETDEV_TX_OK; tx_err: stats->tx_errors++; stats->tx_dropped++; kfree_skb(skb); - t->recursion--; return NETDEV_TX_OK; } |