diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-05-10 07:33:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-17 20:18:51 -0400 |
commit | 4a94445c9a5cf5461fb41d80040033b9a8e2a85a (patch) | |
tree | 7891df11e4df4dd2c5149ef4fdc7d1301e7fca36 /net/ipv4/ip_input.c | |
parent | 407eadd996dc62a827db85f1d0c286a98fd5d336 (diff) |
net: Use ip_route_input_noref() in input path
Use ip_route_input_noref() in ip fast path, to avoid two atomic ops per
incoming packet.
Note: loopback is excluded from this optimization in ip_rcv_finish()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_input.c')
-rw-r--r-- | net/ipv4/ip_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index af76de5f76de..d930dc5e4d85 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -331,8 +331,8 @@ static int ip_rcv_finish(struct sk_buff *skb) | |||
331 | * how the packet travels inside Linux networking. | 331 | * how the packet travels inside Linux networking. |
332 | */ | 332 | */ |
333 | if (skb_dst(skb) == NULL) { | 333 | if (skb_dst(skb) == NULL) { |
334 | int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, | 334 | int err = ip_route_input_noref(skb, iph->daddr, iph->saddr, |
335 | skb->dev); | 335 | iph->tos, skb->dev); |
336 | if (unlikely(err)) { | 336 | if (unlikely(err)) { |
337 | if (err == -EHOSTUNREACH) | 337 | if (err == -EHOSTUNREACH) |
338 | IP_INC_STATS_BH(dev_net(skb->dev), | 338 | IP_INC_STATS_BH(dev_net(skb->dev), |