2 #define TRACE_SYSTEM fib6
4 #if !defined(_TRACE_FIB6_H) || defined(TRACE_HEADER_MULTI_READ)
9 #include <net/ip6_fib.h>
10 #include <linux/tracepoint.h>
12 TRACE_EVENT(fib6_table_lookup
,
14 TP_PROTO(const struct net
*net
, const struct rt6_info
*rt
,
15 u32 tb_id
, const struct flowi6
*flp
),
17 TP_ARGS(net
, rt
, tb_id
, flp
),
25 __field( __u8
, scope
)
26 __field( __u8
, flags
)
27 __array( __u8
, src
, 16 )
28 __array( __u8
, dst
, 16 )
30 __dynamic_array( char, name
, IFNAMSIZ
)
31 __array( __u8
, gw
, 16 )
37 __entry
->tb_id
= tb_id
;
38 __entry
->oif
= flp
->flowi6_oif
;
39 __entry
->iif
= flp
->flowi6_iif
;
40 __entry
->tos
= ip6_tclass(flp
->flowlabel
);
41 __entry
->scope
= flp
->flowi6_scope
;
42 __entry
->flags
= flp
->flowi6_flags
;
44 in6
= (struct in6_addr
*)__entry
->src
;
47 in6
= (struct in6_addr
*)__entry
->dst
;
51 __assign_str(name
, rt
->rt6i_idev
->dev
->name
);
53 __assign_str(name
, "");
55 if (rt
== net
->ipv6
.ip6_null_entry
) {
56 struct in6_addr in6_zero
= {};
58 in6
= (struct in6_addr
*)__entry
->gw
;
62 in6
= (struct in6_addr
*)__entry
->gw
;
63 *in6
= rt
->rt6i_gateway
;
67 TP_printk("table %3u oif %d iif %d src %pI6c dst %pI6c tos %d scope %d flags %x ==> dev %s gw %pI6c",
68 __entry
->tb_id
, __entry
->oif
, __entry
->iif
,
69 __entry
->src
, __entry
->dst
, __entry
->tos
, __entry
->scope
,
70 __entry
->flags
, __get_str(name
), __entry
->gw
)
73 #endif /* _TRACE_FIB6_H */
75 /* This part must be outside protection */
76 #include <trace/define_trace.h>