diff options
author | Martin KaFai Lau <kafai@fb.com> | 2014-10-20 16:42:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-24 00:14:39 -0400 |
commit | 94c77bb41d871deb848e5011aacb5d7c24358ddd (patch) | |
tree | 41f887167755643df1fc78d2e74f308aac020394 /net/ipv6 | |
parent | a3c00e46efdb4009369971c97203ea67f7630fe4 (diff) |
ipv6: Avoid redoing fib6_lookup() for RTF_CACHE hit case
When there is a RTF_CACHE hit, no need to redo fib6_lookup()
with reachable=0.
Cc: David Miller <davem@davemloft.net>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index f1ab2f4f4529..98c523f4a3c3 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -944,12 +944,12 @@ redo_rt6_select: | |||
944 | goto out; | 944 | goto out; |
945 | } | 945 | } |
946 | 946 | ||
947 | if (rt->rt6i_flags & RTF_CACHE) | ||
948 | goto out; | ||
949 | |||
950 | dst_hold(&rt->dst); | 947 | dst_hold(&rt->dst); |
951 | read_unlock_bh(&table->tb6_lock); | 948 | read_unlock_bh(&table->tb6_lock); |
952 | 949 | ||
950 | if (rt->rt6i_flags & RTF_CACHE) | ||
951 | goto out2; | ||
952 | |||
953 | if (!(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY))) | 953 | if (!(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY))) |
954 | nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); | 954 | nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); |
955 | else if (!(rt->dst.flags & DST_HOST)) | 955 | else if (!(rt->dst.flags & DST_HOST)) |