* [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit
@ 2014-10-03 22:12 Martin KaFai Lau
2014-10-03 22:12 ` [PATCH RFC net 1/2] ipv6: Remove the net->ipv6.ip6_null_entry check Martin KaFai Lau
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Martin KaFai Lau @ 2014-10-03 22:12 UTC (permalink / raw)
To: netdev; +Cc: Hannes Frederic Sowa
I am trying to understand why there is a need to restart fib6_lookup() after
getting rt with RTF_CACHE.
I have adapted the davem's udpflood test
(https://git.kernel.org/pub/scm/linux/kernel/git/davem/net_test_tools.git) to
support IPv6 and here is the result:
#root > time ./udpflood -l 20000000 -c 250 2401:db00:face:face::2
Before:
real 0m33.224s
user 0m2.941s
sys 0m30.232s
After:
real 0m31.517s
user 0m2.938s
sys 0m28.536s
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH RFC net 1/2] ipv6: Remove the net->ipv6.ip6_null_entry check
2014-10-03 22:12 [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit Martin KaFai Lau
@ 2014-10-03 22:12 ` Martin KaFai Lau
2014-10-03 22:12 ` [PATCH RFC net 2/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit case Martin KaFai Lau
2014-10-06 21:10 ` [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Martin KaFai Lau @ 2014-10-03 22:12 UTC (permalink / raw)
To: netdev; +Cc: Hannes Frederic Sowa
The above BACKTRACK have already caught the rt == net->ipv6.ip6_null_entry case
---
net/ipv6/route.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index bafde82..d53dc4f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -936,8 +936,7 @@ restart:
if (rt->rt6i_nsiblings)
rt = rt6_multipath_select(rt, fl6, oif, strict | reachable);
BACKTRACK(net, &fl6->saddr);
- if (rt == net->ipv6.ip6_null_entry ||
- rt->rt6i_flags & RTF_CACHE)
+ if (rt->rt6i_flags & RTF_CACHE)
goto out;
dst_hold(&rt->dst);
--
1.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RFC net 2/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit case
2014-10-03 22:12 [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit Martin KaFai Lau
2014-10-03 22:12 ` [PATCH RFC net 1/2] ipv6: Remove the net->ipv6.ip6_null_entry check Martin KaFai Lau
@ 2014-10-03 22:12 ` Martin KaFai Lau
2014-10-06 21:10 ` [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Martin KaFai Lau @ 2014-10-03 22:12 UTC (permalink / raw)
To: netdev; +Cc: Hannes Frederic Sowa
When there is a RTF_CACHE hit, no need to redo fib6_lookup()
with reachable=0.
---
net/ipv6/route.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d53dc4f..e40b5dc 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -937,7 +937,7 @@ restart:
rt = rt6_multipath_select(rt, fl6, oif, strict | reachable);
BACKTRACK(net, &fl6->saddr);
if (rt->rt6i_flags & RTF_CACHE)
- goto out;
+ goto out1;
dst_hold(&rt->dst);
read_unlock_bh(&table->tb6_lock);
@@ -974,6 +974,7 @@ out:
reachable = 0;
goto restart_2;
}
+out1:
dst_hold(&rt->dst);
read_unlock_bh(&table->tb6_lock);
out2:
--
1.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit
2014-10-03 22:12 [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit Martin KaFai Lau
2014-10-03 22:12 ` [PATCH RFC net 1/2] ipv6: Remove the net->ipv6.ip6_null_entry check Martin KaFai Lau
2014-10-03 22:12 ` [PATCH RFC net 2/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit case Martin KaFai Lau
@ 2014-10-06 21:10 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-10-06 21:10 UTC (permalink / raw)
To: kafai; +Cc: netdev, hannes
From: Martin KaFai Lau <kafai@fb.com>
Date: Fri, 3 Oct 2014 15:12:10 -0700
> I am trying to understand why there is a need to restart fib6_lookup() after
> getting rt with RTF_CACHE.
>
> I have adapted the davem's udpflood test
> (https://git.kernel.org/pub/scm/linux/kernel/git/davem/net_test_tools.git) to
> support IPv6 and here is the result:
>
> #root > time ./udpflood -l 20000000 -c 250 2401:db00:face:face::2
>
> Before:
> real 0m33.224s
> user 0m2.941s
> sys 0m30.232s
>
> After:
> real 0m31.517s
> user 0m2.938s
> sys 0m28.536s
If you are serious about seeing these patches integrated, you must
freshly repost this series and provide a proper "Signed-off-by: " tag
for yourself in the commit messages.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-06 21:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-03 22:12 [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit Martin KaFai Lau
2014-10-03 22:12 ` [PATCH RFC net 1/2] ipv6: Remove the net->ipv6.ip6_null_entry check Martin KaFai Lau
2014-10-03 22:12 ` [PATCH RFC net 2/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit case Martin KaFai Lau
2014-10-06 21:10 ` [PATCH RFC net 0/2] ipv6: Avoid restarting fib6_lookup() for RTF_CACHE hit David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).