diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-09-23 06:28:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-24 18:39:22 -0400 |
commit | a43912ab1925788765208da5cd664b6f8e011d08 (patch) | |
tree | 6f522dba1fd414b7da3999fa2da062d80a550874 /net/ipv6/ip6_tunnel.c | |
parent | edf42a27e8e242e543716663e54aa2b592ea070a (diff) |
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) | |||
1043 | struct net_device_stats *stats = &t->dev->stats; | 1043 | struct net_device_stats *stats = &t->dev->stats; |
1044 | int ret; | 1044 | int ret; |
1045 | 1045 | ||
1046 | if (t->recursion++) { | ||
1047 | stats->collisions++; | ||
1048 | goto tx_err; | ||
1049 | } | ||
1050 | |||
1051 | switch (skb->protocol) { | 1046 | switch (skb->protocol) { |
1052 | case htons(ETH_P_IP): | 1047 | case htons(ETH_P_IP): |
1053 | ret = ip4ip6_tnl_xmit(skb, dev); | 1048 | ret = ip4ip6_tnl_xmit(skb, dev); |
@@ -1062,14 +1057,12 @@ ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1062 | if (ret < 0) | 1057 | if (ret < 0) |
1063 | goto tx_err; | 1058 | goto tx_err; |
1064 | 1059 | ||
1065 | t->recursion--; | ||
1066 | return NETDEV_TX_OK; | 1060 | return NETDEV_TX_OK; |
1067 | 1061 | ||
1068 | tx_err: | 1062 | tx_err: |
1069 | stats->tx_errors++; | 1063 | stats->tx_errors++; |
1070 | stats->tx_dropped++; | 1064 | stats->tx_dropped++; |
1071 | kfree_skb(skb); | 1065 | kfree_skb(skb); |
1072 | t->recursion--; | ||
1073 | return NETDEV_TX_OK; | 1066 | return NETDEV_TX_OK; |
1074 | } | 1067 | } |
1075 | 1068 | ||