diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2015-11-19 21:24:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-22 17:54:10 +0100 |
commit | b811580d91e9c0945b0a923dcec3e10cce04ac30 (patch) | |
tree | edc3afb044af9fa8d12a773fe676194b939a3d7f /net/ipv6 | |
parent | net: avoid NULL deref in napi_get_frags() (diff) | |
download | linux-b811580d91e9c0945b0a923dcec3e10cce04ac30.tar.xz linux-b811580d91e9c0945b0a923dcec3e10cce04ac30.zip |
net: IPv6 fib lookup tracepoint
Add tracepoint to show fib6 table lookups and result.
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/route.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 6f01fe122abd..89758be9c6a6 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -62,6 +62,7 @@ #include <net/lwtunnel.h> #include <net/ip_tunnels.h> #include <net/l3mdev.h> +#include <trace/events/fib6.h> #include <asm/uaccess.h> @@ -865,6 +866,9 @@ restart: } dst_use(&rt->dst, jiffies); read_unlock_bh(&table->tb6_lock); + + trace_fib6_table_lookup(net, rt, table->tb6_id, fl6); + return rt; } @@ -1078,6 +1082,8 @@ redo_rt6_select: read_unlock_bh(&table->tb6_lock); rt6_dst_from_metrics_check(rt); + + trace_fib6_table_lookup(net, rt, table->tb6_id, fl6); return rt; } else if (unlikely((fl6->flowi6_flags & FLOWI_FLAG_KNOWN_NH) && !(rt->rt6i_flags & RTF_GATEWAY))) { @@ -1101,6 +1107,8 @@ redo_rt6_select: uncached_rt = net->ipv6.ip6_null_entry; dst_hold(&uncached_rt->dst); + + trace_fib6_table_lookup(net, uncached_rt, table->tb6_id, fl6); return uncached_rt; } else { @@ -1125,6 +1133,7 @@ redo_rt6_select: dst_release(&rt->dst); } + trace_fib6_table_lookup(net, pcpu_rt, table->tb6_id, fl6); return pcpu_rt; } @@ -1474,6 +1483,7 @@ out: read_unlock_bh(&table->tb6_lock); + trace_fib6_table_lookup(net, rt, table->tb6_id, fl6); return rt; }; |