summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2019-04-16 17:36:09 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-18 02:10:47 -0400
commit8ff2e5b26cb84b1b0f502c0b7a3c62e4c4d86acc (patch)
tree3676e0050d1656c48ba403efbe74053c73e2f364
parentb7bc4b6a620becacbc70fc617b8bbdb16f401f85 (diff)
ipv6: Pass fib6_result to fib6_table_lookup tracepoint
Change fib6_table_lookup tracepoint to take the fib6_result and use the fib6_info and fib6_nh from it. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/trace/events/fib6.h16
-rw-r--r--net/ipv6/route.c6
2 files changed, 11 insertions, 11 deletions
diff --git a/include/trace/events/fib6.h b/include/trace/events/fib6.h
index 6d05ebdd669c..70e252d926ea 100644
--- a/include/trace/events/fib6.h
+++ b/include/trace/events/fib6.h
@@ -12,10 +12,10 @@
12 12
13TRACE_EVENT(fib6_table_lookup, 13TRACE_EVENT(fib6_table_lookup,
14 14
15 TP_PROTO(const struct net *net, const struct fib6_info *f6i, 15 TP_PROTO(const struct net *net, const struct fib6_result *res,
16 struct fib6_table *table, const struct flowi6 *flp), 16 struct fib6_table *table, const struct flowi6 *flp),
17 17
18 TP_ARGS(net, f6i, table, flp), 18 TP_ARGS(net, res, table, flp),
19 19
20 TP_STRUCT__entry( 20 TP_STRUCT__entry(
21 __field( u32, tb_id ) 21 __field( u32, tb_id )
@@ -39,7 +39,7 @@ TRACE_EVENT(fib6_table_lookup,
39 struct in6_addr *in6; 39 struct in6_addr *in6;
40 40
41 __entry->tb_id = table->tb6_id; 41 __entry->tb_id = table->tb6_id;
42 __entry->err = ip6_rt_type_to_error(f6i->fib6_type); 42 __entry->err = ip6_rt_type_to_error(res->f6i->fib6_type);
43 __entry->oif = flp->flowi6_oif; 43 __entry->oif = flp->flowi6_oif;
44 __entry->iif = flp->flowi6_iif; 44 __entry->iif = flp->flowi6_iif;
45 __entry->tos = ip6_tclass(flp->flowlabel); 45 __entry->tos = ip6_tclass(flp->flowlabel);
@@ -62,20 +62,20 @@ TRACE_EVENT(fib6_table_lookup,
62 __entry->dport = 0; 62 __entry->dport = 0;
63 } 63 }
64 64
65 if (f6i->fib6_nh.fib_nh_dev) { 65 if (res->nh && res->nh->fib_nh_dev) {
66 __assign_str(name, f6i->fib6_nh.fib_nh_dev); 66 __assign_str(name, res->nh->fib_nh_dev);
67 } else { 67 } else {
68 __assign_str(name, "-"); 68 __assign_str(name, "-");
69 } 69 }
70 if (f6i == net->ipv6.fib6_null_entry) { 70 if (res->f6i == net->ipv6.fib6_null_entry) {
71 struct in6_addr in6_zero = {}; 71 struct in6_addr in6_zero = {};
72 72
73 in6 = (struct in6_addr *)__entry->gw; 73 in6 = (struct in6_addr *)__entry->gw;
74 *in6 = in6_zero; 74 *in6 = in6_zero;
75 75
76 } else if (f6i) { 76 } else if (res->nh) {
77 in6 = (struct in6_addr *)__entry->gw; 77 in6 = (struct in6_addr *)__entry->gw;
78 *in6 = f6i->fib6_nh.fib_nh_gw6; 78 *in6 = res->nh->fib_nh_gw6;
79 } 79 }
80 ), 80 ),
81 81
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a466e2e478e8..405e0784d13b 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1130,7 +1130,7 @@ restart:
1130 } 1130 }
1131 1131
1132out: 1132out:
1133 trace_fib6_table_lookup(net, res.f6i, table, fl6); 1133 trace_fib6_table_lookup(net, &res, table, fl6);
1134 1134
1135 rcu_read_unlock(); 1135 rcu_read_unlock();
1136 1136
@@ -1865,7 +1865,7 @@ redo_rt6_select:
1865 } 1865 }
1866 } 1866 }
1867 1867
1868 trace_fib6_table_lookup(net, res.f6i, table, fl6); 1868 trace_fib6_table_lookup(net, &res, table, fl6);
1869 1869
1870 return res.f6i; 1870 return res.f6i;
1871} 1871}
@@ -2538,7 +2538,7 @@ out:
2538 2538
2539 rcu_read_unlock(); 2539 rcu_read_unlock();
2540 2540
2541 trace_fib6_table_lookup(net, rt, table, fl6); 2541 trace_fib6_table_lookup(net, &res, table, fl6);
2542 return ret; 2542 return ret;
2543}; 2543};
2544 2544