On 8/8/17 12:23 PM, Vincent Bernat wrote:
If the user hasn't installed any custom rules, don't go through the
whole FIB rules layer. This is pretty similar to f4530fa574df (ipv4:
Avoid overhead when no custom FIB rules are installed).
Using a micro-benchmark module [1], timing ip6_route_output() with
get_cycles(), with 40,000 routes in the main routing table, before this
patch:
...
At the frequency of the host during the bench (~ 3.7 GHz), this is
about a 100 ns difference on the median value.
A next step would be to collapse local and main tables, as in
0ddcf43d5d4a (ipv4: FIB Local/MAIN table collapse).
[1]: https://github.com/vincentbernat/network-lab/blob/master/lab-routes-ipv6/kbench_mod.c
Signed-off-by: Vincent Bernat <redacted>
Reviewed-by: Jiri Pirko <redacted>
---
include/net/netns/ipv6.h | 1 +
net/ipv6/fib6_rules.c | 40 +++++++++++++++++++++++++++-------------
net/ipv6/route.c | 1 +
3 files changed, 29 insertions(+), 13 deletions(-)
LGTM.
Acked-by: David Ahern <redacted>