Loading include/trace/events/fib6.h +7 −7 Original line number Diff line number Diff line Loading @@ -12,10 +12,10 @@ TRACE_EVENT(fib6_table_lookup, TP_PROTO(const struct net *net, const struct rt6_info *rt, TP_PROTO(const struct net *net, const struct fib6_info *f6i, struct fib6_table *table, const struct flowi6 *flp), TP_ARGS(net, rt, table, flp), TP_ARGS(net, f6i, table, flp), TP_STRUCT__entry( __field( u32, tb_id ) Loading Loading @@ -48,20 +48,20 @@ TRACE_EVENT(fib6_table_lookup, in6 = (struct in6_addr *)__entry->dst; *in6 = flp->daddr; if (rt->rt6i_idev) { __assign_str(name, rt->rt6i_idev->dev->name); if (f6i->fib6_nh.nh_dev) { __assign_str(name, f6i->fib6_nh.nh_dev); } else { __assign_str(name, ""); } if (rt == net->ipv6.ip6_null_entry) { if (f6i == net->ipv6.fib6_null_entry) { struct in6_addr in6_zero = {}; in6 = (struct in6_addr *)__entry->gw; *in6 = in6_zero; } else if (rt) { } else if (f6i) { in6 = (struct in6_addr *)__entry->gw; *in6 = rt->rt6i_gateway; *in6 = f6i->fib6_nh.nh_gw; } ), Loading net/ipv6/route.c +6 −8 Original line number Diff line number Diff line Loading @@ -1078,6 +1078,8 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net, goto restart; } trace_fib6_table_lookup(net, f6i, table, fl6); /* Search through exception table */ rt = rt6_find_cached_rt(f6i, &fl6->daddr, &fl6->saddr); if (rt) { Loading @@ -1096,8 +1098,6 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net, rcu_read_unlock(); trace_fib6_table_lookup(net, rt, table, fl6); return rt; } Loading Loading @@ -1827,6 +1827,8 @@ struct fib6_info *fib6_table_lookup(struct net *net, struct fib6_table *table, } } trace_fib6_table_lookup(net, f6i, table, fl6); return f6i; } Loading @@ -1853,7 +1855,6 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, rt = net->ipv6.ip6_null_entry; rcu_read_unlock(); dst_hold(&rt->dst); trace_fib6_table_lookup(net, rt, table, fl6); return rt; } Loading @@ -1864,7 +1865,6 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, dst_use_noref(&rt->dst, jiffies); rcu_read_unlock(); trace_fib6_table_lookup(net, rt, table, fl6); return rt; } else if (unlikely((fl6->flowi6_flags & FLOWI_FLAG_KNOWN_NH) && !(f6i->fib6_flags & RTF_GATEWAY))) { Loading @@ -1890,9 +1890,7 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, dst_hold(&uncached_rt->dst); } trace_fib6_table_lookup(net, uncached_rt, table, fl6); return uncached_rt; } else { /* Get a percpu copy */ Loading @@ -1906,7 +1904,7 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, local_bh_enable(); rcu_read_unlock(); trace_fib6_table_lookup(net, pcpu_rt, table, fl6); return pcpu_rt; } } Loading Loading @@ -2491,7 +2489,7 @@ static struct rt6_info *__ip6_route_redirect(struct net *net, rcu_read_unlock(); trace_fib6_table_lookup(net, ret, table, fl6); trace_fib6_table_lookup(net, rt, table, fl6); return ret; }; Loading Loading
include/trace/events/fib6.h +7 −7 Original line number Diff line number Diff line Loading @@ -12,10 +12,10 @@ TRACE_EVENT(fib6_table_lookup, TP_PROTO(const struct net *net, const struct rt6_info *rt, TP_PROTO(const struct net *net, const struct fib6_info *f6i, struct fib6_table *table, const struct flowi6 *flp), TP_ARGS(net, rt, table, flp), TP_ARGS(net, f6i, table, flp), TP_STRUCT__entry( __field( u32, tb_id ) Loading Loading @@ -48,20 +48,20 @@ TRACE_EVENT(fib6_table_lookup, in6 = (struct in6_addr *)__entry->dst; *in6 = flp->daddr; if (rt->rt6i_idev) { __assign_str(name, rt->rt6i_idev->dev->name); if (f6i->fib6_nh.nh_dev) { __assign_str(name, f6i->fib6_nh.nh_dev); } else { __assign_str(name, ""); } if (rt == net->ipv6.ip6_null_entry) { if (f6i == net->ipv6.fib6_null_entry) { struct in6_addr in6_zero = {}; in6 = (struct in6_addr *)__entry->gw; *in6 = in6_zero; } else if (rt) { } else if (f6i) { in6 = (struct in6_addr *)__entry->gw; *in6 = rt->rt6i_gateway; *in6 = f6i->fib6_nh.nh_gw; } ), Loading
net/ipv6/route.c +6 −8 Original line number Diff line number Diff line Loading @@ -1078,6 +1078,8 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net, goto restart; } trace_fib6_table_lookup(net, f6i, table, fl6); /* Search through exception table */ rt = rt6_find_cached_rt(f6i, &fl6->daddr, &fl6->saddr); if (rt) { Loading @@ -1096,8 +1098,6 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net, rcu_read_unlock(); trace_fib6_table_lookup(net, rt, table, fl6); return rt; } Loading Loading @@ -1827,6 +1827,8 @@ struct fib6_info *fib6_table_lookup(struct net *net, struct fib6_table *table, } } trace_fib6_table_lookup(net, f6i, table, fl6); return f6i; } Loading @@ -1853,7 +1855,6 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, rt = net->ipv6.ip6_null_entry; rcu_read_unlock(); dst_hold(&rt->dst); trace_fib6_table_lookup(net, rt, table, fl6); return rt; } Loading @@ -1864,7 +1865,6 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, dst_use_noref(&rt->dst, jiffies); rcu_read_unlock(); trace_fib6_table_lookup(net, rt, table, fl6); return rt; } else if (unlikely((fl6->flowi6_flags & FLOWI_FLAG_KNOWN_NH) && !(f6i->fib6_flags & RTF_GATEWAY))) { Loading @@ -1890,9 +1890,7 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, dst_hold(&uncached_rt->dst); } trace_fib6_table_lookup(net, uncached_rt, table, fl6); return uncached_rt; } else { /* Get a percpu copy */ Loading @@ -1906,7 +1904,7 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, local_bh_enable(); rcu_read_unlock(); trace_fib6_table_lookup(net, pcpu_rt, table, fl6); return pcpu_rt; } } Loading Loading @@ -2491,7 +2489,7 @@ static struct rt6_info *__ip6_route_redirect(struct net *net, rcu_read_unlock(); trace_fib6_table_lookup(net, ret, table, fl6); trace_fib6_table_lookup(net, rt, table, fl6); return ret; }; Loading