xtensa: fix high memory/reserved memory collision
[cris-mirror.git] / include / trace / events / fib6.h
blob7e8d48a81b9192a07dc0f702193b0539160dcde8
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM fib6
5 #if !defined(_TRACE_FIB6_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_FIB6_H
8 #include <linux/in6.h>
9 #include <net/flow.h>
10 #include <net/ip6_fib.h>
11 #include <linux/tracepoint.h>
13 TRACE_EVENT(fib6_table_lookup,
15 TP_PROTO(const struct net *net, const struct rt6_info *rt,
16 struct fib6_table *table, const struct flowi6 *flp),
18 TP_ARGS(net, rt, table, flp),
20 TP_STRUCT__entry(
21 __field( u32, tb_id )
23 __field( int, oif )
24 __field( int, iif )
25 __field( __u8, tos )
26 __field( __u8, scope )
27 __field( __u8, flags )
28 __array( __u8, src, 16 )
29 __array( __u8, dst, 16 )
31 __dynamic_array( char, name, IFNAMSIZ )
32 __array( __u8, gw, 16 )
35 TP_fast_assign(
36 struct in6_addr *in6;
38 __entry->tb_id = table->tb6_id;
39 __entry->oif = flp->flowi6_oif;
40 __entry->iif = flp->flowi6_iif;
41 __entry->tos = ip6_tclass(flp->flowlabel);
42 __entry->scope = flp->flowi6_scope;
43 __entry->flags = flp->flowi6_flags;
45 in6 = (struct in6_addr *)__entry->src;
46 *in6 = flp->saddr;
48 in6 = (struct in6_addr *)__entry->dst;
49 *in6 = flp->daddr;
51 if (rt->rt6i_idev) {
52 __assign_str(name, rt->rt6i_idev->dev->name);
53 } else {
54 __assign_str(name, "");
56 if (rt == net->ipv6.ip6_null_entry) {
57 struct in6_addr in6_zero = {};
59 in6 = (struct in6_addr *)__entry->gw;
60 *in6 = in6_zero;
62 } else if (rt) {
63 in6 = (struct in6_addr *)__entry->gw;
64 *in6 = rt->rt6i_gateway;
68 TP_printk("table %3u oif %d iif %d src %pI6c dst %pI6c tos %d scope %d flags %x ==> dev %s gw %pI6c",
69 __entry->tb_id, __entry->oif, __entry->iif,
70 __entry->src, __entry->dst, __entry->tos, __entry->scope,
71 __entry->flags, __get_str(name), __entry->gw)
74 #endif /* _TRACE_FIB6_H */
76 /* This part must be outside protection */
77 #include <trace/define_trace.h>