xref: /openbmc/linux/include/trace/events/sunvnet.h (revision 2d96b44f)
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM sunvnet
3 
4 #if !defined(_TRACE_SUNVNET_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_SUNVNET_H
6 
7 #include <linux/tracepoint.h>
8 
9 TRACE_EVENT(vnet_rx_one,
10 
11 	TP_PROTO(int lsid, int rsid, int index, int needs_ack),
12 
13 	TP_ARGS(lsid, rsid, index, needs_ack),
14 
15 	TP_STRUCT__entry(
16 		__field(int, lsid)
17 		__field(int, rsid)
18 		__field(int, index)
19 		__field(int, needs_ack)
20 	),
21 
22 	TP_fast_assign(
23 		__entry->lsid = lsid;
24 		__entry->rsid = rsid;
25 		__entry->index = index;
26 		__entry->needs_ack = needs_ack;
27 	),
28 
29 	TP_printk("(%x:%x) walk_rx_one index %d; needs_ack %d",
30 		__entry->lsid, __entry->rsid,
31 		__entry->index, __entry->needs_ack)
32 );
33 
34 DECLARE_EVENT_CLASS(vnet_tx_stopped_ack_template,
35 
36 	TP_PROTO(int lsid, int rsid, int ack_end, int npkts),
37 
38 	TP_ARGS(lsid, rsid, ack_end, npkts),
39 
40 	TP_STRUCT__entry(
41 		__field(int, lsid)
42 		__field(int, rsid)
43 		__field(int, ack_end)
44 		__field(int, npkts)
45 	),
46 
47 	TP_fast_assign(
48 		__entry->lsid = lsid;
49 		__entry->rsid = rsid;
50 		__entry->ack_end = ack_end;
51 		__entry->npkts = npkts;
52 	),
53 
54 	TP_printk("(%x:%x) stopped ack for %d; npkts %d",
55 		__entry->lsid, __entry->rsid,
56 		__entry->ack_end, __entry->npkts)
57 );
58 DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_send_stopped_ack,
59 	     TP_PROTO(int lsid, int rsid, int ack_end, int npkts),
60 	     TP_ARGS(lsid, rsid, ack_end, npkts));
61 DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_defer_stopped_ack,
62 	     TP_PROTO(int lsid, int rsid, int ack_end, int npkts),
63 	     TP_ARGS(lsid, rsid, ack_end, npkts));
64 DEFINE_EVENT(vnet_tx_stopped_ack_template, vnet_tx_pending_stopped_ack,
65 	     TP_PROTO(int lsid, int rsid, int ack_end, int npkts),
66 	     TP_ARGS(lsid, rsid, ack_end, npkts));
67 
68 TRACE_EVENT(vnet_rx_stopped_ack,
69 
70 	TP_PROTO(int lsid, int rsid, int end),
71 
72 	TP_ARGS(lsid, rsid, end),
73 
74 	TP_STRUCT__entry(
75 		__field(int, lsid)
76 		__field(int, rsid)
77 		__field(int, end)
78 	),
79 
80 	TP_fast_assign(
81 		__entry->lsid = lsid;
82 		__entry->rsid = rsid;
83 		__entry->end = end;
84 	),
85 
86 	TP_printk("(%x:%x) stopped ack for index %d",
87 		__entry->lsid, __entry->rsid, __entry->end)
88 );
89 
90 TRACE_EVENT(vnet_tx_trigger,
91 
92 	TP_PROTO(int lsid, int rsid, int start, int err),
93 
94 	TP_ARGS(lsid, rsid, start, err),
95 
96 	TP_STRUCT__entry(
97 		__field(int, lsid)
98 		__field(int, rsid)
99 		__field(int, start)
100 		__field(int, err)
101 	),
102 
103 	TP_fast_assign(
104 		__entry->lsid = lsid;
105 		__entry->rsid = rsid;
106 		__entry->start = start;
107 		__entry->err = err;
108 	),
109 
110 	TP_printk("(%x:%x) Tx trigger for %d sent with err %d %s",
111 		__entry->lsid, __entry->rsid, __entry->start,
112 		__entry->err, __entry->err > 0 ? "(ok)" : " ")
113 );
114 
115 TRACE_EVENT(vnet_skip_tx_trigger,
116 
117 	TP_PROTO(int lsid, int rsid, int last),
118 
119 	TP_ARGS(lsid, rsid, last),
120 
121 	TP_STRUCT__entry(
122 		__field(int, lsid)
123 		__field(int, rsid)
124 		__field(int, last)
125 	),
126 
127 	TP_fast_assign(
128 		__entry->lsid = lsid;
129 		__entry->rsid = rsid;
130 		__entry->last = last;
131 	),
132 
133 	TP_printk("(%x:%x) Skip Tx trigger. Last trigger sent was %d",
134 		__entry->lsid, __entry->rsid, __entry->last)
135 );
136 #endif /* _TRACE_SOCK_H */
137 
138 /* This part must be outside protection */
139 #include <trace/define_trace.h>
140