drm: bridge: adv7511: remove s32 format from i2s capabilities
[drm/drm-misc.git] / drivers / net / ethernet / intel / iavf / iavf_trace.h
blob62212011c80706098777cd31d2f7760432f4e4d2
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2013 - 2018 Intel Corporation. */
4 /* Modeled on trace-events-sample.h */
6 /* The trace subsystem name for iavf will be "iavf".
8 * This file is named iavf_trace.h.
10 * Since this include file's name is different from the trace
11 * subsystem name, we'll have to define TRACE_INCLUDE_FILE at the end
12 * of this file.
14 #undef TRACE_SYSTEM
15 #define TRACE_SYSTEM iavf
17 /* See trace-events-sample.h for a detailed description of why this
18 * guard clause is different from most normal include files.
20 #if !defined(_IAVF_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
21 #define _IAVF_TRACE_H_
23 #include <linux/tracepoint.h>
26 * iavf_trace() macro enables shared code to refer to trace points
27 * like:
29 * trace_iavf{,vf}_example(args...)
31 * ... as:
33 * iavf_trace(example, args...)
35 * ... to resolve to the PF or VF version of the tracepoint without
36 * ifdefs, and to allow tracepoints to be disabled entirely at build
37 * time.
39 * Trace point should always be referred to in the driver via this
40 * macro.
42 * Similarly, iavf_trace_enabled(trace_name) wraps references to
43 * trace_iavf{,vf}_<trace_name>_enabled() functions.
45 #define _IAVF_TRACE_NAME(trace_name) (trace_ ## iavf ## _ ## trace_name)
46 #define IAVF_TRACE_NAME(trace_name) _IAVF_TRACE_NAME(trace_name)
48 #define iavf_trace(trace_name, args...) IAVF_TRACE_NAME(trace_name)(args)
50 #define iavf_trace_enabled(trace_name) IAVF_TRACE_NAME(trace_name##_enabled)()
52 /* Events common to PF and VF. Corresponding versions will be defined
53 * for both, named trace_iavf_* and trace_iavf_*. The iavf_trace()
54 * macro above will select the right trace point name for the driver
55 * being built from shared code.
58 /* Events related to a vsi & ring */
59 DECLARE_EVENT_CLASS(
60 iavf_tx_template,
62 TP_PROTO(struct iavf_ring *ring,
63 struct iavf_tx_desc *desc,
64 struct iavf_tx_buffer *buf),
66 TP_ARGS(ring, desc, buf),
68 /* The convention here is to make the first fields in the
69 * TP_STRUCT match the TP_PROTO exactly. This enables the use
70 * of the args struct generated by the tplist tool (from the
71 * bcc-tools package) to be used for those fields. To access
72 * fields other than the tracepoint args will require the
73 * tplist output to be adjusted.
75 TP_STRUCT__entry(
76 __field(void*, ring)
77 __field(void*, desc)
78 __field(void*, buf)
79 __string(devname, ring->netdev->name)
82 TP_fast_assign(
83 __entry->ring = ring;
84 __entry->desc = desc;
85 __entry->buf = buf;
86 __assign_str(devname);
89 TP_printk(
90 "netdev: %s ring: %p desc: %p buf %p",
91 __get_str(devname), __entry->ring,
92 __entry->desc, __entry->buf)
95 DEFINE_EVENT(
96 iavf_tx_template, iavf_clean_tx_irq,
97 TP_PROTO(struct iavf_ring *ring,
98 struct iavf_tx_desc *desc,
99 struct iavf_tx_buffer *buf),
101 TP_ARGS(ring, desc, buf));
103 DEFINE_EVENT(
104 iavf_tx_template, iavf_clean_tx_irq_unmap,
105 TP_PROTO(struct iavf_ring *ring,
106 struct iavf_tx_desc *desc,
107 struct iavf_tx_buffer *buf),
109 TP_ARGS(ring, desc, buf));
111 DECLARE_EVENT_CLASS(
112 iavf_rx_template,
114 TP_PROTO(struct iavf_ring *ring,
115 union iavf_32byte_rx_desc *desc,
116 struct sk_buff *skb),
118 TP_ARGS(ring, desc, skb),
120 TP_STRUCT__entry(
121 __field(void*, ring)
122 __field(void*, desc)
123 __field(void*, skb)
124 __string(devname, ring->netdev->name)
127 TP_fast_assign(
128 __entry->ring = ring;
129 __entry->desc = desc;
130 __entry->skb = skb;
131 __assign_str(devname);
134 TP_printk(
135 "netdev: %s ring: %p desc: %p skb %p",
136 __get_str(devname), __entry->ring,
137 __entry->desc, __entry->skb)
140 DEFINE_EVENT(
141 iavf_rx_template, iavf_clean_rx_irq,
142 TP_PROTO(struct iavf_ring *ring,
143 union iavf_32byte_rx_desc *desc,
144 struct sk_buff *skb),
146 TP_ARGS(ring, desc, skb));
148 DEFINE_EVENT(
149 iavf_rx_template, iavf_clean_rx_irq_rx,
150 TP_PROTO(struct iavf_ring *ring,
151 union iavf_32byte_rx_desc *desc,
152 struct sk_buff *skb),
154 TP_ARGS(ring, desc, skb));
156 DECLARE_EVENT_CLASS(
157 iavf_xmit_template,
159 TP_PROTO(struct sk_buff *skb,
160 struct iavf_ring *ring),
162 TP_ARGS(skb, ring),
164 TP_STRUCT__entry(
165 __field(void*, skb)
166 __field(void*, ring)
167 __string(devname, ring->netdev->name)
170 TP_fast_assign(
171 __entry->skb = skb;
172 __entry->ring = ring;
173 __assign_str(devname);
176 TP_printk(
177 "netdev: %s skb: %p ring: %p",
178 __get_str(devname), __entry->skb,
179 __entry->ring)
182 DEFINE_EVENT(
183 iavf_xmit_template, iavf_xmit_frame_ring,
184 TP_PROTO(struct sk_buff *skb,
185 struct iavf_ring *ring),
187 TP_ARGS(skb, ring));
189 DEFINE_EVENT(
190 iavf_xmit_template, iavf_xmit_frame_ring_drop,
191 TP_PROTO(struct sk_buff *skb,
192 struct iavf_ring *ring),
194 TP_ARGS(skb, ring));
196 /* Events unique to the VF. */
198 #endif /* _IAVF_TRACE_H_ */
199 /* This must be outside ifdef _IAVF_TRACE_H */
201 /* This trace include file is not located in the .../include/trace
202 * with the kernel tracepoint definitions, because we're a loadable
203 * module.
205 #undef TRACE_INCLUDE_PATH
206 #define TRACE_INCLUDE_PATH .
207 #undef TRACE_INCLUDE_FILE
208 #define TRACE_INCLUDE_FILE iavf_trace
209 #include <trace/define_trace.h>