From: David Ahern <dsahern@kernel.org>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: idosch@mellanox.com, David Ahern <dsahern@gmail.com>
Subject: [PATCH v2 net-next 11/13] ipv6: Pass fib6_result to fib6_table_lookup tracepoint
Date: Tue, 16 Apr 2019 14:36:09 -0700 [thread overview]
Message-ID: <20190416213611.8724-12-dsahern@kernel.org> (raw)
In-Reply-To: <20190416213611.8724-1-dsahern@kernel.org>
From: David Ahern <dsahern@gmail.com>
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>
---
include/trace/events/fib6.h | 16 ++++++++--------
net/ipv6/route.c | 6 +++---
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 @@
TRACE_EVENT(fib6_table_lookup,
- TP_PROTO(const struct net *net, const struct fib6_info *f6i,
+ TP_PROTO(const struct net *net, const struct fib6_result *res,
struct fib6_table *table, const struct flowi6 *flp),
- TP_ARGS(net, f6i, table, flp),
+ TP_ARGS(net, res, table, flp),
TP_STRUCT__entry(
__field( u32, tb_id )
@@ -39,7 +39,7 @@ TRACE_EVENT(fib6_table_lookup,
struct in6_addr *in6;
__entry->tb_id = table->tb6_id;
- __entry->err = ip6_rt_type_to_error(f6i->fib6_type);
+ __entry->err = ip6_rt_type_to_error(res->f6i->fib6_type);
__entry->oif = flp->flowi6_oif;
__entry->iif = flp->flowi6_iif;
__entry->tos = ip6_tclass(flp->flowlabel);
@@ -62,20 +62,20 @@ TRACE_EVENT(fib6_table_lookup,
__entry->dport = 0;
}
- if (f6i->fib6_nh.fib_nh_dev) {
- __assign_str(name, f6i->fib6_nh.fib_nh_dev);
+ if (res->nh && res->nh->fib_nh_dev) {
+ __assign_str(name, res->nh->fib_nh_dev);
} else {
__assign_str(name, "-");
}
- if (f6i == net->ipv6.fib6_null_entry) {
+ if (res->f6i == net->ipv6.fib6_null_entry) {
struct in6_addr in6_zero = {};
in6 = (struct in6_addr *)__entry->gw;
*in6 = in6_zero;
- } else if (f6i) {
+ } else if (res->nh) {
in6 = (struct in6_addr *)__entry->gw;
- *in6 = f6i->fib6_nh.fib_nh_gw6;
+ *in6 = res->nh->fib_nh_gw6;
}
),
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index de2a901b4d30..e16d27df5dac 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1130,7 +1130,7 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net,
}
out:
- trace_fib6_table_lookup(net, res.f6i, table, fl6);
+ trace_fib6_table_lookup(net, &res, table, fl6);
rcu_read_unlock();
@@ -1865,7 +1865,7 @@ struct fib6_info *fib6_table_lookup(struct net *net, struct fib6_table *table,
}
}
- trace_fib6_table_lookup(net, res.f6i, table, fl6);
+ trace_fib6_table_lookup(net, &res, table, fl6);
return res.f6i;
}
@@ -2534,7 +2534,7 @@ static struct rt6_info *__ip6_route_redirect(struct net *net,
rcu_read_unlock();
- trace_fib6_table_lookup(net, rt, table, fl6);
+ trace_fib6_table_lookup(net, &res, table, fl6);
return ret;
};
--
2.11.0
next prev parent reply other threads:[~2019-04-16 21:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 21:35 [PATCH v2 net-next 00/13] ipv6: Use fib6_result for fib_lookups David Ahern
2019-04-16 21:35 ` [PATCH v2 net-next 01/13] ipv6: Rename fib6_multipath_select and pass fib6_result David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 02/13] ipv6: Pass fib6_result to rt6_find_cached_rt David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 03/13] ipv6: Pass fib6_result to ip6_rt_cache_alloc David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 04/13] ipv6: Pass fib6_result to ip6_create_rt_rcu David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 05/13] ipv6: Pass fib6_result to pcpu route functions David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 06/13] ipv6: Pass fib6_result to ip6_rt_get_dev_rcu and ip6_rt_copy_init David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 07/13] ipv6: Pass fib6_result to rt6_insert_exception David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 08/13] ipv6: Pass fib6_result to ip6_mtu_from_fib6 and fib6_mtu David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 09/13] ipv6: Pass fib6_result to rt6_device_match David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 10/13] ipv6: Pass fib6_result to rt6_select and find_rr_leaf David Ahern
2019-04-16 21:36 ` David Ahern [this message]
2019-04-16 21:36 ` [PATCH v2 net-next 12/13] ipv6: Pass fib6_result to fib lookups David Ahern
2019-04-16 21:36 ` [PATCH v2 net-next 13/13] ipv6: Add fib6_type and fib6_flags to fib6_result David Ahern
2019-04-18 6:16 ` [PATCH v2 net-next 00/13] ipv6: Use fib6_result for fib_lookups David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190416213611.8724-12-dsahern@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=idosch@mellanox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).