diff options
author | David Howells <dhowells@redhat.com> | 2017-01-05 05:38:33 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-01-05 05:38:33 -0500 |
commit | b54a134a7de461f804cf0e28331d0a43ee82fb13 (patch) | |
tree | 4cf4e55a9ee30e6d9b1ed4804cee3d467e09e56e | |
parent | 57ea884b0dcf1e59661955919976ef138ec9cdb0 (diff) |
rxrpc: Fix handling of enums-to-string translation in tracing
Fix the way enum values are translated into strings in AF_RXRPC
tracepoints. The problem with just doing a lookup in a normal flat array
of strings or chars is that external tracing infrastructure can't find it.
Rather, TRACE_DEFINE_ENUM must be used.
Also sort the enums and string tables to make it easier to keep them in
order so that a future patch to __print_symbolic() can be optimised to try
a direct lookup into the table first before iterating over it.
A couple of _proto() macro calls are removed because they refered to tables
that got moved to the tracing infrastructure. The relevant data can be
found by way of tracing.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | include/trace/events/rxrpc.h | 424 | ||||
-rw-r--r-- | net/rxrpc/ar-internal.h | 194 | ||||
-rw-r--r-- | net/rxrpc/call_object.c | 18 | ||||
-rw-r--r-- | net/rxrpc/conn_client.c | 8 | ||||
-rw-r--r-- | net/rxrpc/input.c | 10 | ||||
-rw-r--r-- | net/rxrpc/misc.c | 151 |
6 files changed, 403 insertions, 402 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index 0383e5e9a0f3..2395a57462c9 100644 --- a/include/trace/events/rxrpc.h +++ b/include/trace/events/rxrpc.h | |||
@@ -16,6 +16,386 @@ | |||
16 | 16 | ||
17 | #include <linux/tracepoint.h> | 17 | #include <linux/tracepoint.h> |
18 | 18 | ||
19 | /* | ||
20 | * Define enums for tracing information. | ||
21 | * | ||
22 | * These should all be kept sorted, making it easier to match the string | ||
23 | * mapping tables further on. | ||
24 | */ | ||
25 | #ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY | ||
26 | #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY | ||
27 | |||
28 | enum rxrpc_skb_trace { | ||
29 | rxrpc_skb_rx_cleaned, | ||
30 | rxrpc_skb_rx_freed, | ||
31 | rxrpc_skb_rx_got, | ||
32 | rxrpc_skb_rx_lost, | ||
33 | rxrpc_skb_rx_purged, | ||
34 | rxrpc_skb_rx_received, | ||
35 | rxrpc_skb_rx_rotated, | ||
36 | rxrpc_skb_rx_seen, | ||
37 | rxrpc_skb_tx_cleaned, | ||
38 | rxrpc_skb_tx_freed, | ||
39 | rxrpc_skb_tx_got, | ||
40 | rxrpc_skb_tx_new, | ||
41 | rxrpc_skb_tx_rotated, | ||
42 | rxrpc_skb_tx_seen, | ||
43 | }; | ||
44 | |||
45 | enum rxrpc_conn_trace { | ||
46 | rxrpc_conn_got, | ||
47 | rxrpc_conn_new_client, | ||
48 | rxrpc_conn_new_service, | ||
49 | rxrpc_conn_put_client, | ||
50 | rxrpc_conn_put_service, | ||
51 | rxrpc_conn_queued, | ||
52 | rxrpc_conn_seen, | ||
53 | }; | ||
54 | |||
55 | enum rxrpc_client_trace { | ||
56 | rxrpc_client_activate_chans, | ||
57 | rxrpc_client_alloc, | ||
58 | rxrpc_client_chan_activate, | ||
59 | rxrpc_client_chan_disconnect, | ||
60 | rxrpc_client_chan_pass, | ||
61 | rxrpc_client_chan_unstarted, | ||
62 | rxrpc_client_cleanup, | ||
63 | rxrpc_client_count, | ||
64 | rxrpc_client_discard, | ||
65 | rxrpc_client_duplicate, | ||
66 | rxrpc_client_exposed, | ||
67 | rxrpc_client_replace, | ||
68 | rxrpc_client_to_active, | ||
69 | rxrpc_client_to_culled, | ||
70 | rxrpc_client_to_idle, | ||
71 | rxrpc_client_to_inactive, | ||
72 | rxrpc_client_to_upgrade, | ||
73 | rxrpc_client_to_waiting, | ||
74 | rxrpc_client_uncount, | ||
75 | }; | ||
76 | |||
77 | enum rxrpc_call_trace { | ||
78 | rxrpc_call_connected, | ||
79 | rxrpc_call_error, | ||
80 | rxrpc_call_got, | ||
81 | rxrpc_call_got_kernel, | ||
82 | rxrpc_call_got_userid, | ||
83 | rxrpc_call_new_client, | ||
84 | rxrpc_call_new_service, | ||
85 | rxrpc_call_put, | ||
86 | rxrpc_call_put_kernel, | ||
87 | rxrpc_call_put_noqueue, | ||
88 | rxrpc_call_put_userid, | ||
89 | rxrpc_call_queued, | ||
90 | rxrpc_call_queued_ref, | ||
91 | rxrpc_call_release, | ||
92 | rxrpc_call_seen, | ||
93 | }; | ||
94 | |||
95 | enum rxrpc_transmit_trace { | ||
96 | rxrpc_transmit_await_reply, | ||
97 | rxrpc_transmit_end, | ||
98 | rxrpc_transmit_queue, | ||
99 | rxrpc_transmit_queue_last, | ||
100 | rxrpc_transmit_rotate, | ||
101 | rxrpc_transmit_rotate_last, | ||
102 | rxrpc_transmit_wait, | ||
103 | }; | ||
104 | |||
105 | enum rxrpc_receive_trace { | ||
106 | rxrpc_receive_end, | ||
107 | rxrpc_receive_front, | ||
108 | rxrpc_receive_incoming, | ||
109 | rxrpc_receive_queue, | ||
110 | rxrpc_receive_queue_last, | ||
111 | rxrpc_receive_rotate, | ||
112 | }; | ||
113 | |||
114 | enum rxrpc_recvmsg_trace { | ||
115 | rxrpc_recvmsg_cont, | ||
116 | rxrpc_recvmsg_data_return, | ||
117 | rxrpc_recvmsg_dequeue, | ||
118 | rxrpc_recvmsg_enter, | ||
119 | rxrpc_recvmsg_full, | ||
120 | rxrpc_recvmsg_hole, | ||
121 | rxrpc_recvmsg_next, | ||
122 | rxrpc_recvmsg_return, | ||
123 | rxrpc_recvmsg_terminal, | ||
124 | rxrpc_recvmsg_to_be_accepted, | ||
125 | rxrpc_recvmsg_wait, | ||
126 | }; | ||
127 | |||
128 | enum rxrpc_rtt_tx_trace { | ||
129 | rxrpc_rtt_tx_data, | ||
130 | rxrpc_rtt_tx_ping, | ||
131 | }; | ||
132 | |||
133 | enum rxrpc_rtt_rx_trace { | ||
134 | rxrpc_rtt_rx_ping_response, | ||
135 | rxrpc_rtt_rx_requested_ack, | ||
136 | }; | ||
137 | |||
138 | enum rxrpc_timer_trace { | ||
139 | rxrpc_timer_begin, | ||
140 | rxrpc_timer_expired, | ||
141 | rxrpc_timer_init_for_reply, | ||
142 | rxrpc_timer_init_for_send_reply, | ||
143 | rxrpc_timer_set_for_ack, | ||
144 | rxrpc_timer_set_for_ping, | ||
145 | rxrpc_timer_set_for_resend, | ||
146 | rxrpc_timer_set_for_send, | ||
147 | }; | ||
148 | |||
149 | enum rxrpc_propose_ack_trace { | ||
150 | rxrpc_propose_ack_client_tx_end, | ||
151 | rxrpc_propose_ack_input_data, | ||
152 | rxrpc_propose_ack_ping_for_lost_ack, | ||
153 | rxrpc_propose_ack_ping_for_lost_reply, | ||
154 | rxrpc_propose_ack_ping_for_params, | ||
155 | rxrpc_propose_ack_processing_op, | ||
156 | rxrpc_propose_ack_respond_to_ack, | ||
157 | rxrpc_propose_ack_respond_to_ping, | ||
158 | rxrpc_propose_ack_retry_tx, | ||
159 | rxrpc_propose_ack_rotate_rx, | ||
160 | rxrpc_propose_ack_terminal_ack, | ||
161 | }; | ||
162 | |||
163 | enum rxrpc_propose_ack_outcome { | ||
164 | rxrpc_propose_ack_subsume, | ||
165 | rxrpc_propose_ack_update, | ||
166 | rxrpc_propose_ack_use, | ||
167 | }; | ||
168 | |||
169 | enum rxrpc_congest_change { | ||
170 | rxrpc_cong_begin_retransmission, | ||
171 | rxrpc_cong_cleared_nacks, | ||
172 | rxrpc_cong_new_low_nack, | ||
173 | rxrpc_cong_no_change, | ||
174 | rxrpc_cong_progress, | ||
175 | rxrpc_cong_retransmit_again, | ||
176 | rxrpc_cong_rtt_window_end, | ||
177 | rxrpc_cong_saw_nack, | ||
178 | }; | ||
179 | |||
180 | #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ | ||
181 | |||
182 | /* | ||
183 | * Declare tracing information enums and their string mappings for display. | ||
184 | */ | ||
185 | #define rxrpc_skb_traces \ | ||
186 | EM(rxrpc_skb_rx_cleaned, "Rx CLN") \ | ||
187 | EM(rxrpc_skb_rx_freed, "Rx FRE") \ | ||
188 | EM(rxrpc_skb_rx_got, "Rx GOT") \ | ||
189 | EM(rxrpc_skb_rx_lost, "Rx *L*") \ | ||
190 | EM(rxrpc_skb_rx_purged, "Rx PUR") \ | ||
191 | EM(rxrpc_skb_rx_received, "Rx RCV") \ | ||
192 | EM(rxrpc_skb_rx_rotated, "Rx ROT") \ | ||
193 | EM(rxrpc_skb_rx_seen, "Rx SEE") \ | ||
194 | EM(rxrpc_skb_tx_cleaned, "Tx CLN") \ | ||
195 | EM(rxrpc_skb_tx_freed, "Tx FRE") \ | ||
196 | EM(rxrpc_skb_tx_got, "Tx GOT") \ | ||
197 | EM(rxrpc_skb_tx_new, "Tx NEW") \ | ||
198 | EM(rxrpc_skb_tx_rotated, "Tx ROT") \ | ||
199 | E_(rxrpc_skb_tx_seen, "Tx SEE") | ||
200 | |||
201 | #define rxrpc_conn_traces \ | ||
202 | EM(rxrpc_conn_got, "GOT") \ | ||
203 | EM(rxrpc_conn_new_client, "NWc") \ | ||
204 | EM(rxrpc_conn_new_service, "NWs") \ | ||
205 | EM(rxrpc_conn_put_client, "PTc") \ | ||
206 | EM(rxrpc_conn_put_service, "PTs") \ | ||
207 | EM(rxrpc_conn_queued, "QUE") \ | ||
208 | E_(rxrpc_conn_seen, "SEE") | ||
209 | |||
210 | #define rxrpc_client_traces \ | ||
211 | EM(rxrpc_client_activate_chans, "Activa") \ | ||
212 | EM(rxrpc_client_alloc, "Alloc ") \ | ||
213 | EM(rxrpc_client_chan_activate, "ChActv") \ | ||
214 | EM(rxrpc_client_chan_disconnect, "ChDisc") \ | ||
215 | EM(rxrpc_client_chan_pass, "ChPass") \ | ||
216 | EM(rxrpc_client_chan_unstarted, "ChUnst") \ | ||
217 | EM(rxrpc_client_cleanup, "Clean ") \ | ||
218 | EM(rxrpc_client_count, "Count ") \ | ||
219 | EM(rxrpc_client_discard, "Discar") \ | ||
220 | EM(rxrpc_client_duplicate, "Duplic") \ | ||
221 | EM(rxrpc_client_exposed, "Expose") \ | ||
222 | EM(rxrpc_client_replace, "Replac") \ | ||
223 | EM(rxrpc_client_to_active, "->Actv") \ | ||
224 | EM(rxrpc_client_to_culled, "->Cull") \ | ||
225 | EM(rxrpc_client_to_idle, "->Idle") \ | ||
226 | EM(rxrpc_client_to_inactive, "->Inac") \ | ||
227 | EM(rxrpc_client_to_upgrade, "->Upgd") \ | ||
228 | EM(rxrpc_client_to_waiting, "->Wait") \ | ||
229 | E_(rxrpc_client_uncount, "Uncoun") | ||
230 | |||
231 | #define rxrpc_conn_cache_states \ | ||
232 | EM(RXRPC_CONN_CLIENT_INACTIVE, "Inac") \ | ||
233 | EM(RXRPC_CONN_CLIENT_WAITING, "Wait") \ | ||
234 | EM(RXRPC_CONN_CLIENT_ACTIVE, "Actv") \ | ||
235 | EM(RXRPC_CONN_CLIENT_CULLED, "Cull") \ | ||
236 | E_(RXRPC_CONN_CLIENT_IDLE, "Idle") \ | ||
237 | |||
238 | #define rxrpc_call_traces \ | ||
239 | EM(rxrpc_call_connected, "CON") \ | ||
240 | EM(rxrpc_call_error, "*E*") \ | ||
241 | EM(rxrpc_call_got, "GOT") \ | ||
242 | EM(rxrpc_call_got_kernel, "Gke") \ | ||
243 | EM(rxrpc_call_got_userid, "Gus") \ | ||
244 | EM(rxrpc_call_new_client, "NWc") \ | ||
245 | EM(rxrpc_call_new_service, "NWs") \ | ||
246 | EM(rxrpc_call_put, "PUT") \ | ||
247 | EM(rxrpc_call_put_kernel, "Pke") \ | ||
248 | EM(rxrpc_call_put_noqueue, "PNQ") \ | ||
249 | EM(rxrpc_call_put_userid, "Pus") \ | ||
250 | EM(rxrpc_call_queued, "QUE") \ | ||
251 | EM(rxrpc_call_queued_ref, "QUR") \ | ||
252 | EM(rxrpc_call_release, "RLS") \ | ||
253 | E_(rxrpc_call_seen, "SEE") | ||
254 | |||
255 | #define rxrpc_transmit_traces \ | ||
256 | EM(rxrpc_transmit_await_reply, "AWR") \ | ||
257 | EM(rxrpc_transmit_end, "END") \ | ||
258 | EM(rxrpc_transmit_queue, "QUE") \ | ||
259 | EM(rxrpc_transmit_queue_last, "QLS") \ | ||
260 | EM(rxrpc_transmit_rotate, "ROT") \ | ||
261 | EM(rxrpc_transmit_rotate_last, "RLS") \ | ||
262 | E_(rxrpc_transmit_wait, "WAI") | ||
263 | |||
264 | #define rxrpc_receive_traces \ | ||
265 | EM(rxrpc_receive_end, "END") \ | ||
266 | EM(rxrpc_receive_front, "FRN") \ | ||
267 | EM(rxrpc_receive_incoming, "INC") \ | ||
268 | EM(rxrpc_receive_queue, "QUE") \ | ||
269 | EM(rxrpc_receive_queue_last, "QLS") \ | ||
270 | E_(rxrpc_receive_rotate, "ROT") | ||
271 | |||
272 | #define rxrpc_recvmsg_traces \ | ||
273 | EM(rxrpc_recvmsg_cont, "CONT") \ | ||
274 | EM(rxrpc_recvmsg_data_return, "DATA") \ | ||
275 | EM(rxrpc_recvmsg_dequeue, "DEQU") \ | ||
276 | EM(rxrpc_recvmsg_enter, "ENTR") \ | ||
277 | EM(rxrpc_recvmsg_full, "FULL") \ | ||
278 | EM(rxrpc_recvmsg_hole, "HOLE") \ | ||
279 | EM(rxrpc_recvmsg_next, "NEXT") \ | ||
280 | EM(rxrpc_recvmsg_return, "RETN") \ | ||
281 | EM(rxrpc_recvmsg_terminal, "TERM") \ | ||
282 | EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ | ||
283 | E_(rxrpc_recvmsg_wait, "WAIT") | ||
284 | |||
285 | #define rxrpc_rtt_tx_traces \ | ||
286 | EM(rxrpc_rtt_tx_data, "DATA") \ | ||
287 | E_(rxrpc_rtt_tx_ping, "PING") | ||
288 | |||
289 | #define rxrpc_rtt_rx_traces \ | ||
290 | EM(rxrpc_rtt_rx_ping_response, "PONG") \ | ||
291 | E_(rxrpc_rtt_rx_requested_ack, "RACK") | ||
292 | |||
293 | #define rxrpc_timer_traces \ | ||
294 | EM(rxrpc_timer_begin, "Begin ") \ | ||
295 | EM(rxrpc_timer_expired, "*EXPR*") \ | ||
296 | EM(rxrpc_timer_init_for_reply, "IniRpl") \ | ||
297 | EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ | ||
298 | EM(rxrpc_timer_set_for_ack, "SetAck") \ | ||
299 | EM(rxrpc_timer_set_for_ping, "SetPng") \ | ||
300 | EM(rxrpc_timer_set_for_resend, "SetRTx") \ | ||
301 | E_(rxrpc_timer_set_for_send, "SetTx ") | ||
302 | |||
303 | #define rxrpc_propose_ack_traces \ | ||
304 | EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ | ||
305 | EM(rxrpc_propose_ack_input_data, "DataIn ") \ | ||
306 | EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ | ||
307 | EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ | ||
308 | EM(rxrpc_propose_ack_ping_for_params, "Params ") \ | ||
309 | EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ | ||
310 | EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ | ||
311 | EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ | ||
312 | EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ | ||
313 | EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ | ||
314 | E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") | ||
315 | |||
316 | #define rxrpc_propose_ack_outcomes \ | ||
317 | EM(rxrpc_propose_ack_subsume, " Subsume") \ | ||
318 | EM(rxrpc_propose_ack_update, " Update") \ | ||
319 | E_(rxrpc_propose_ack_use, "") | ||
320 | |||
321 | #define rxrpc_congest_modes \ | ||
322 | EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ | ||
323 | EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ | ||
324 | EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ | ||
325 | E_(RXRPC_CALL_SLOW_START, "SlowStart") | ||
326 | |||
327 | #define rxrpc_congest_changes \ | ||
328 | EM(rxrpc_cong_begin_retransmission, " Retrans") \ | ||
329 | EM(rxrpc_cong_cleared_nacks, " Cleared") \ | ||
330 | EM(rxrpc_cong_new_low_nack, " NewLowN") \ | ||
331 | EM(rxrpc_cong_no_change, "") \ | ||
332 | EM(rxrpc_cong_progress, " Progres") \ | ||
333 | EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ | ||
334 | EM(rxrpc_cong_rtt_window_end, " RttWinE") \ | ||
335 | E_(rxrpc_cong_saw_nack, " SawNack") | ||
336 | |||
337 | #define rxrpc_pkts \ | ||
338 | EM(0, "?00") \ | ||
339 | EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ | ||
340 | EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ | ||
341 | EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ | ||
342 | EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ | ||
343 | EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ | ||
344 | EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ | ||
345 | EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ | ||
346 | EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ | ||
347 | EM(9, "?09") \ | ||
348 | EM(10, "?10") \ | ||
349 | EM(11, "?11") \ | ||
350 | EM(12, "?12") \ | ||
351 | EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ | ||
352 | EM(14, "?14") \ | ||
353 | E_(15, "?15") | ||
354 | |||
355 | #define rxrpc_ack_names \ | ||
356 | EM(0, "-0-") \ | ||
357 | EM(RXRPC_ACK_REQUESTED, "REQ") \ | ||
358 | EM(RXRPC_ACK_DUPLICATE, "DUP") \ | ||
359 | EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ | ||
360 | EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ | ||
361 | EM(RXRPC_ACK_NOSPACE, "MEM") \ | ||
362 | EM(RXRPC_ACK_PING, "PNG") \ | ||
363 | EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ | ||
364 | EM(RXRPC_ACK_DELAY, "DLY") \ | ||
365 | EM(RXRPC_ACK_IDLE, "IDL") \ | ||
366 | E_(RXRPC_ACK__INVALID, "-?-") | ||
367 | |||
368 | /* | ||
369 | * Export enum symbols via userspace. | ||
370 | */ | ||
371 | #undef EM | ||
372 | #undef E_ | ||
373 | #define EM(a, b) TRACE_DEFINE_ENUM(a); | ||
374 | #define E_(a, b) TRACE_DEFINE_ENUM(a); | ||
375 | |||
376 | rxrpc_skb_traces; | ||
377 | rxrpc_conn_traces; | ||
378 | rxrpc_client_traces; | ||
379 | rxrpc_call_traces; | ||
380 | rxrpc_transmit_traces; | ||
381 | rxrpc_receive_traces; | ||
382 | rxrpc_recvmsg_traces; | ||
383 | rxrpc_rtt_tx_traces; | ||
384 | rxrpc_rtt_rx_traces; | ||
385 | rxrpc_timer_traces; | ||
386 | rxrpc_propose_ack_traces; | ||
387 | rxrpc_propose_ack_outcomes; | ||
388 | rxrpc_congest_changes; | ||
389 | |||
390 | /* | ||
391 | * Now redefine the EM() and E_() macros to map the enums to the strings that | ||
392 | * will be printed in the output. | ||
393 | */ | ||
394 | #undef EM | ||
395 | #undef E_ | ||
396 | #define EM(a, b) { a, b }, | ||
397 | #define E_(a, b) { a, b } | ||
398 | |||
19 | TRACE_EVENT(rxrpc_conn, | 399 | TRACE_EVENT(rxrpc_conn, |
20 | TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op, | 400 | TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op, |
21 | int usage, const void *where), | 401 | int usage, const void *where), |
@@ -38,7 +418,7 @@ TRACE_EVENT(rxrpc_conn, | |||
38 | 418 | ||
39 | TP_printk("C=%p %s u=%d sp=%pSR", | 419 | TP_printk("C=%p %s u=%d sp=%pSR", |
40 | __entry->conn, | 420 | __entry->conn, |
41 | rxrpc_conn_traces[__entry->op], | 421 | __print_symbolic(__entry->op, rxrpc_conn_traces), |
42 | __entry->usage, | 422 | __entry->usage, |
43 | __entry->where) | 423 | __entry->where) |
44 | ); | 424 | ); |
@@ -70,8 +450,8 @@ TRACE_EVENT(rxrpc_client, | |||
70 | TP_printk("C=%p h=%2d %s %s i=%08x u=%d", | 450 | TP_printk("C=%p h=%2d %s %s i=%08x u=%d", |
71 | __entry->conn, | 451 | __entry->conn, |
72 | __entry->channel, | 452 | __entry->channel, |
73 | rxrpc_client_traces[__entry->op], | 453 | __print_symbolic(__entry->op, rxrpc_client_traces), |
74 | rxrpc_conn_cache_states[__entry->cs], | 454 | __print_symbolic(__entry->cs, rxrpc_conn_cache_states), |
75 | __entry->cid, | 455 | __entry->cid, |
76 | __entry->usage) | 456 | __entry->usage) |
77 | ); | 457 | ); |
@@ -100,7 +480,7 @@ TRACE_EVENT(rxrpc_call, | |||
100 | 480 | ||
101 | TP_printk("c=%p %s u=%d sp=%pSR a=%p", | 481 | TP_printk("c=%p %s u=%d sp=%pSR a=%p", |
102 | __entry->call, | 482 | __entry->call, |
103 | rxrpc_call_traces[__entry->op], | 483 | __print_symbolic(__entry->op, rxrpc_call_traces), |
104 | __entry->usage, | 484 | __entry->usage, |
105 | __entry->where, | 485 | __entry->where, |
106 | __entry->aux) | 486 | __entry->aux) |
@@ -130,7 +510,7 @@ TRACE_EVENT(rxrpc_skb, | |||
130 | 510 | ||
131 | TP_printk("s=%p %s u=%d m=%d p=%pSR", | 511 | TP_printk("s=%p %s u=%d m=%d p=%pSR", |
132 | __entry->skb, | 512 | __entry->skb, |
133 | rxrpc_skb_traces[__entry->op], | 513 | __print_symbolic(__entry->op, rxrpc_skb_traces), |
134 | __entry->usage, | 514 | __entry->usage, |
135 | __entry->mod_count, | 515 | __entry->mod_count, |
136 | __entry->where) | 516 | __entry->where) |
@@ -154,7 +534,8 @@ TRACE_EVENT(rxrpc_rx_packet, | |||
154 | __entry->hdr.callNumber, __entry->hdr.serviceId, | 534 | __entry->hdr.callNumber, __entry->hdr.serviceId, |
155 | __entry->hdr.serial, __entry->hdr.seq, | 535 | __entry->hdr.serial, __entry->hdr.seq, |
156 | __entry->hdr.type, __entry->hdr.flags, | 536 | __entry->hdr.type, __entry->hdr.flags, |
157 | __entry->hdr.type <= 15 ? rxrpc_pkts[__entry->hdr.type] : "?UNK") | 537 | __entry->hdr.type <= 15 ? |
538 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") | ||
158 | ); | 539 | ); |
159 | 540 | ||
160 | TRACE_EVENT(rxrpc_rx_done, | 541 | TRACE_EVENT(rxrpc_rx_done, |
@@ -225,7 +606,7 @@ TRACE_EVENT(rxrpc_transmit, | |||
225 | 606 | ||
226 | TP_printk("c=%p %s f=%08x n=%u", | 607 | TP_printk("c=%p %s f=%08x n=%u", |
227 | __entry->call, | 608 | __entry->call, |
228 | rxrpc_transmit_traces[__entry->why], | 609 | __print_symbolic(__entry->why, rxrpc_transmit_traces), |
229 | __entry->tx_hard_ack + 1, | 610 | __entry->tx_hard_ack + 1, |
230 | __entry->tx_top - __entry->tx_hard_ack) | 611 | __entry->tx_top - __entry->tx_hard_ack) |
231 | ); | 612 | ); |
@@ -251,7 +632,7 @@ TRACE_EVENT(rxrpc_rx_ack, | |||
251 | 632 | ||
252 | TP_printk("c=%p %s f=%08x n=%u", | 633 | TP_printk("c=%p %s f=%08x n=%u", |
253 | __entry->call, | 634 | __entry->call, |
254 | rxrpc_ack_names[__entry->reason], | 635 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
255 | __entry->first, | 636 | __entry->first, |
256 | __entry->n_acks) | 637 | __entry->n_acks) |
257 | ); | 638 | ); |
@@ -317,7 +698,7 @@ TRACE_EVENT(rxrpc_tx_ack, | |||
317 | TP_printk(" c=%p ACK %08x %s f=%08x r=%08x n=%u", | 698 | TP_printk(" c=%p ACK %08x %s f=%08x r=%08x n=%u", |
318 | __entry->call, | 699 | __entry->call, |
319 | __entry->serial, | 700 | __entry->serial, |
320 | rxrpc_ack_names[__entry->reason], | 701 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
321 | __entry->ack_first, | 702 | __entry->ack_first, |
322 | __entry->ack_serial, | 703 | __entry->ack_serial, |
323 | __entry->n_acks) | 704 | __entry->n_acks) |
@@ -349,7 +730,7 @@ TRACE_EVENT(rxrpc_receive, | |||
349 | 730 | ||
350 | TP_printk("c=%p %s r=%08x q=%08x w=%08x-%08x", | 731 | TP_printk("c=%p %s r=%08x q=%08x w=%08x-%08x", |
351 | __entry->call, | 732 | __entry->call, |
352 | rxrpc_receive_traces[__entry->why], | 733 | __print_symbolic(__entry->why, rxrpc_receive_traces), |
353 | __entry->serial, | 734 | __entry->serial, |
354 | __entry->seq, | 735 | __entry->seq, |
355 | __entry->hard_ack, | 736 | __entry->hard_ack, |
@@ -383,7 +764,7 @@ TRACE_EVENT(rxrpc_recvmsg, | |||
383 | 764 | ||
384 | TP_printk("c=%p %s q=%08x o=%u l=%u ret=%d", | 765 | TP_printk("c=%p %s q=%08x o=%u l=%u ret=%d", |
385 | __entry->call, | 766 | __entry->call, |
386 | rxrpc_recvmsg_traces[__entry->why], | 767 | __print_symbolic(__entry->why, rxrpc_recvmsg_traces), |
387 | __entry->seq, | 768 | __entry->seq, |
388 | __entry->offset, | 769 | __entry->offset, |
389 | __entry->len, | 770 | __entry->len, |
@@ -410,7 +791,7 @@ TRACE_EVENT(rxrpc_rtt_tx, | |||
410 | 791 | ||
411 | TP_printk("c=%p %s sr=%08x", | 792 | TP_printk("c=%p %s sr=%08x", |
412 | __entry->call, | 793 | __entry->call, |
413 | rxrpc_rtt_tx_traces[__entry->why], | 794 | __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), |
414 | __entry->send_serial) | 795 | __entry->send_serial) |
415 | ); | 796 | ); |
416 | 797 | ||
@@ -443,7 +824,7 @@ TRACE_EVENT(rxrpc_rtt_rx, | |||
443 | 824 | ||
444 | TP_printk("c=%p %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", | 825 | TP_printk("c=%p %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", |
445 | __entry->call, | 826 | __entry->call, |
446 | rxrpc_rtt_rx_traces[__entry->why], | 827 | __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), |
447 | __entry->send_serial, | 828 | __entry->send_serial, |
448 | __entry->resp_serial, | 829 | __entry->resp_serial, |
449 | __entry->rtt, | 830 | __entry->rtt, |
@@ -481,7 +862,7 @@ TRACE_EVENT(rxrpc_timer, | |||
481 | 862 | ||
482 | TP_printk("c=%p %s x=%lld a=%lld r=%lld t=%ld", | 863 | TP_printk("c=%p %s x=%lld a=%lld r=%lld t=%ld", |
483 | __entry->call, | 864 | __entry->call, |
484 | rxrpc_timer_traces[__entry->why], | 865 | __print_symbolic(__entry->why, rxrpc_timer_traces), |
485 | ktime_to_ns(ktime_sub(__entry->expire_at, __entry->now)), | 866 | ktime_to_ns(ktime_sub(__entry->expire_at, __entry->now)), |
486 | ktime_to_ns(ktime_sub(__entry->ack_at, __entry->now)), | 867 | ktime_to_ns(ktime_sub(__entry->ack_at, __entry->now)), |
487 | ktime_to_ns(ktime_sub(__entry->resend_at, __entry->now)), | 868 | ktime_to_ns(ktime_sub(__entry->resend_at, __entry->now)), |
@@ -506,7 +887,8 @@ TRACE_EVENT(rxrpc_rx_lose, | |||
506 | __entry->hdr.callNumber, __entry->hdr.serviceId, | 887 | __entry->hdr.callNumber, __entry->hdr.serviceId, |
507 | __entry->hdr.serial, __entry->hdr.seq, | 888 | __entry->hdr.serial, __entry->hdr.seq, |
508 | __entry->hdr.type, __entry->hdr.flags, | 889 | __entry->hdr.type, __entry->hdr.flags, |
509 | __entry->hdr.type <= 15 ? rxrpc_pkts[__entry->hdr.type] : "?UNK") | 890 | __entry->hdr.type <= 15 ? |
891 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") | ||
510 | ); | 892 | ); |
511 | 893 | ||
512 | TRACE_EVENT(rxrpc_propose_ack, | 894 | TRACE_EVENT(rxrpc_propose_ack, |
@@ -539,12 +921,12 @@ TRACE_EVENT(rxrpc_propose_ack, | |||
539 | 921 | ||
540 | TP_printk("c=%p %s %s r=%08x i=%u b=%u%s", | 922 | TP_printk("c=%p %s %s r=%08x i=%u b=%u%s", |
541 | __entry->call, | 923 | __entry->call, |
542 | rxrpc_propose_ack_traces[__entry->why], | 924 | __print_symbolic(__entry->why, rxrpc_propose_ack_traces), |
543 | rxrpc_ack_names[__entry->ack_reason], | 925 | __print_symbolic(__entry->ack_reason, rxrpc_ack_names), |
544 | __entry->serial, | 926 | __entry->serial, |
545 | __entry->immediate, | 927 | __entry->immediate, |
546 | __entry->background, | 928 | __entry->background, |
547 | rxrpc_propose_ack_outcomes[__entry->outcome]) | 929 | __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes)) |
548 | ); | 930 | ); |
549 | 931 | ||
550 | TRACE_EVENT(rxrpc_retransmit, | 932 | TRACE_EVENT(rxrpc_retransmit, |
@@ -603,9 +985,9 @@ TRACE_EVENT(rxrpc_congest, | |||
603 | TP_printk("c=%p %08x %s %08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s", | 985 | TP_printk("c=%p %08x %s %08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s", |
604 | __entry->call, | 986 | __entry->call, |
605 | __entry->ack_serial, | 987 | __entry->ack_serial, |
606 | rxrpc_ack_names[__entry->sum.ack_reason], | 988 | __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), |
607 | __entry->hard_ack, | 989 | __entry->hard_ack, |
608 | rxrpc_congest_modes[__entry->sum.mode], | 990 | __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), |
609 | __entry->sum.cwnd, | 991 | __entry->sum.cwnd, |
610 | __entry->sum.ssthresh, | 992 | __entry->sum.ssthresh, |
611 | __entry->sum.nr_acks, __entry->sum.nr_nacks, | 993 | __entry->sum.nr_acks, __entry->sum.nr_nacks, |
@@ -615,7 +997,7 @@ TRACE_EVENT(rxrpc_congest, | |||
615 | __entry->sum.cumulative_acks, | 997 | __entry->sum.cumulative_acks, |
616 | __entry->sum.dup_acks, | 998 | __entry->sum.dup_acks, |
617 | __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", | 999 | __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", |
618 | rxrpc_congest_changes[__entry->change], | 1000 | __print_symbolic(__entry->change, rxrpc_congest_changes), |
619 | __entry->sum.retrans_timeo ? " rTxTo" : "") | 1001 | __entry->sum.retrans_timeo ? " rTxTo" : "") |
620 | ); | 1002 | ); |
621 | 1003 | ||
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index f60e35576526..84927c7b5fdf 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h | |||
@@ -593,200 +593,6 @@ struct rxrpc_ack_summary { | |||
593 | u8 cumulative_acks; | 593 | u8 cumulative_acks; |
594 | }; | 594 | }; |
595 | 595 | ||
596 | enum rxrpc_skb_trace { | ||
597 | rxrpc_skb_rx_cleaned, | ||
598 | rxrpc_skb_rx_freed, | ||
599 | rxrpc_skb_rx_got, | ||
600 | rxrpc_skb_rx_lost, | ||
601 | rxrpc_skb_rx_received, | ||
602 | rxrpc_skb_rx_rotated, | ||
603 | rxrpc_skb_rx_purged, | ||
604 | rxrpc_skb_rx_seen, | ||
605 | rxrpc_skb_tx_cleaned, | ||
606 | rxrpc_skb_tx_freed, | ||
607 | rxrpc_skb_tx_got, | ||
608 | rxrpc_skb_tx_new, | ||
609 | rxrpc_skb_tx_rotated, | ||
610 | rxrpc_skb_tx_seen, | ||
611 | rxrpc_skb__nr_trace | ||
612 | }; | ||
613 | |||
614 | extern const char rxrpc_skb_traces[rxrpc_skb__nr_trace][7]; | ||
615 | |||
616 | enum rxrpc_conn_trace { | ||
617 | rxrpc_conn_new_client, | ||
618 | rxrpc_conn_new_service, | ||
619 | rxrpc_conn_queued, | ||
620 | rxrpc_conn_seen, | ||
621 | rxrpc_conn_got, | ||
622 | rxrpc_conn_put_client, | ||
623 | rxrpc_conn_put_service, | ||
624 | rxrpc_conn__nr_trace | ||
625 | }; | ||
626 | |||
627 | extern const char rxrpc_conn_traces[rxrpc_conn__nr_trace][4]; | ||
628 | |||
629 | enum rxrpc_client_trace { | ||
630 | rxrpc_client_activate_chans, | ||
631 | rxrpc_client_alloc, | ||
632 | rxrpc_client_chan_activate, | ||
633 | rxrpc_client_chan_disconnect, | ||
634 | rxrpc_client_chan_pass, | ||
635 | rxrpc_client_chan_unstarted, | ||
636 | rxrpc_client_cleanup, | ||
637 | rxrpc_client_count, | ||
638 | rxrpc_client_discard, | ||
639 | rxrpc_client_duplicate, | ||
640 | rxrpc_client_exposed, | ||
641 | rxrpc_client_replace, | ||
642 | rxrpc_client_to_active, | ||
643 | rxrpc_client_to_culled, | ||
644 | rxrpc_client_to_idle, | ||
645 | rxrpc_client_to_inactive, | ||
646 | rxrpc_client_to_waiting, | ||
647 | rxrpc_client_uncount, | ||
648 | rxrpc_client__nr_trace | ||
649 | }; | ||
650 | |||
651 | extern const char rxrpc_client_traces[rxrpc_client__nr_trace][7]; | ||
652 | extern const char rxrpc_conn_cache_states[RXRPC_CONN__NR_CACHE_STATES][5]; | ||
653 | |||
654 | enum rxrpc_call_trace { | ||
655 | rxrpc_call_new_client, | ||
656 | rxrpc_call_new_service, | ||
657 | rxrpc_call_queued, | ||
658 | rxrpc_call_queued_ref, | ||
659 | rxrpc_call_seen, | ||
660 | rxrpc_call_connected, | ||
661 | rxrpc_call_release, | ||
662 | rxrpc_call_got, | ||
663 | rxrpc_call_got_userid, | ||
664 | rxrpc_call_got_kernel, | ||
665 | rxrpc_call_put, | ||
666 | rxrpc_call_put_userid, | ||
667 | rxrpc_call_put_kernel, | ||
668 | rxrpc_call_put_noqueue, | ||
669 | rxrpc_call_error, | ||
670 | rxrpc_call__nr_trace | ||
671 | }; | ||
672 | |||
673 | extern const char rxrpc_call_traces[rxrpc_call__nr_trace][4]; | ||
674 | |||
675 | enum rxrpc_transmit_trace { | ||
676 | rxrpc_transmit_wait, | ||
677 | rxrpc_transmit_queue, | ||
678 | rxrpc_transmit_queue_last, | ||
679 | rxrpc_transmit_rotate, | ||
680 | rxrpc_transmit_rotate_last, | ||
681 | rxrpc_transmit_await_reply, | ||
682 | rxrpc_transmit_end, | ||
683 | rxrpc_transmit__nr_trace | ||
684 | }; | ||
685 | |||
686 | extern const char rxrpc_transmit_traces[rxrpc_transmit__nr_trace][4]; | ||
687 | |||
688 | enum rxrpc_receive_trace { | ||
689 | rxrpc_receive_incoming, | ||
690 | rxrpc_receive_queue, | ||
691 | rxrpc_receive_queue_last, | ||
692 | rxrpc_receive_front, | ||
693 | rxrpc_receive_rotate, | ||
694 | rxrpc_receive_end, | ||
695 | rxrpc_receive__nr_trace | ||
696 | }; | ||
697 | |||
698 | extern const char rxrpc_receive_traces[rxrpc_receive__nr_trace][4]; | ||
699 | |||
700 | enum rxrpc_recvmsg_trace { | ||
701 | rxrpc_recvmsg_enter, | ||
702 | rxrpc_recvmsg_wait, | ||
703 | rxrpc_recvmsg_dequeue, | ||
704 | rxrpc_recvmsg_hole, | ||
705 | rxrpc_recvmsg_next, | ||
706 | rxrpc_recvmsg_cont, | ||
707 | rxrpc_recvmsg_full, | ||
708 | rxrpc_recvmsg_data_return, | ||
709 | rxrpc_recvmsg_terminal, | ||
710 | rxrpc_recvmsg_to_be_accepted, | ||
711 | rxrpc_recvmsg_return, | ||
712 | rxrpc_recvmsg__nr_trace | ||
713 | }; | ||
714 | |||
715 | extern const char rxrpc_recvmsg_traces[rxrpc_recvmsg__nr_trace][5]; | ||
716 | |||
717 | enum rxrpc_rtt_tx_trace { | ||
718 | rxrpc_rtt_tx_ping, | ||
719 | rxrpc_rtt_tx_data, | ||
720 | rxrpc_rtt_tx__nr_trace | ||
721 | }; | ||
722 | |||
723 | extern const char rxrpc_rtt_tx_traces[rxrpc_rtt_tx__nr_trace][5]; | ||
724 | |||
725 | enum rxrpc_rtt_rx_trace { | ||
726 | rxrpc_rtt_rx_ping_response, | ||
727 | rxrpc_rtt_rx_requested_ack, | ||
728 | rxrpc_rtt_rx__nr_trace | ||
729 | }; | ||
730 | |||
731 | extern const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5]; | ||
732 | |||
733 | enum rxrpc_timer_trace { | ||
734 | rxrpc_timer_begin, | ||
735 | rxrpc_timer_init_for_reply, | ||
736 | rxrpc_timer_init_for_send_reply, | ||
737 | rxrpc_timer_expired, | ||
738 | rxrpc_timer_set_for_ack, | ||
739 | rxrpc_timer_set_for_ping, | ||
740 | rxrpc_timer_set_for_resend, | ||
741 | rxrpc_timer_set_for_send, | ||
742 | rxrpc_timer__nr_trace | ||
743 | }; | ||
744 | |||
745 | extern const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8]; | ||
746 | |||
747 | enum rxrpc_propose_ack_trace { | ||
748 | rxrpc_propose_ack_client_tx_end, | ||
749 | rxrpc_propose_ack_input_data, | ||
750 | rxrpc_propose_ack_ping_for_lost_ack, | ||
751 | rxrpc_propose_ack_ping_for_lost_reply, | ||
752 | rxrpc_propose_ack_ping_for_params, | ||
753 | rxrpc_propose_ack_processing_op, | ||
754 | rxrpc_propose_ack_respond_to_ack, | ||
755 | rxrpc_propose_ack_respond_to_ping, | ||
756 | rxrpc_propose_ack_retry_tx, | ||
757 | rxrpc_propose_ack_rotate_rx, | ||
758 | rxrpc_propose_ack_terminal_ack, | ||
759 | rxrpc_propose_ack__nr_trace | ||
760 | }; | ||
761 | |||
762 | enum rxrpc_propose_ack_outcome { | ||
763 | rxrpc_propose_ack_use, | ||
764 | rxrpc_propose_ack_update, | ||
765 | rxrpc_propose_ack_subsume, | ||
766 | rxrpc_propose_ack__nr_outcomes | ||
767 | }; | ||
768 | |||
769 | extern const char rxrpc_propose_ack_traces[rxrpc_propose_ack__nr_trace][8]; | ||
770 | extern const char *const rxrpc_propose_ack_outcomes[rxrpc_propose_ack__nr_outcomes]; | ||
771 | |||
772 | enum rxrpc_congest_change { | ||
773 | rxrpc_cong_begin_retransmission, | ||
774 | rxrpc_cong_cleared_nacks, | ||
775 | rxrpc_cong_new_low_nack, | ||
776 | rxrpc_cong_no_change, | ||
777 | rxrpc_cong_progress, | ||
778 | rxrpc_cong_retransmit_again, | ||
779 | rxrpc_cong_rtt_window_end, | ||
780 | rxrpc_cong_saw_nack, | ||
781 | rxrpc_congest__nr_change | ||
782 | }; | ||
783 | |||
784 | extern const char rxrpc_congest_modes[NR__RXRPC_CONGEST_MODES][10]; | ||
785 | extern const char rxrpc_congest_changes[rxrpc_congest__nr_change][9]; | ||
786 | |||
787 | extern const char *const rxrpc_pkts[]; | ||
788 | extern const char rxrpc_ack_names[RXRPC_ACK__INVALID + 1][4]; | ||
789 | |||
790 | #include <trace/events/rxrpc.h> | 596 | #include <trace/events/rxrpc.h> |
791 | 597 | ||
792 | /* | 598 | /* |
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 1ed18d8c9c9f..8b94db3c9b2e 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c | |||
@@ -43,24 +43,6 @@ const char *const rxrpc_call_completions[NR__RXRPC_CALL_COMPLETIONS] = { | |||
43 | [RXRPC_CALL_NETWORK_ERROR] = "NetError", | 43 | [RXRPC_CALL_NETWORK_ERROR] = "NetError", |
44 | }; | 44 | }; |
45 | 45 | ||
46 | const char rxrpc_call_traces[rxrpc_call__nr_trace][4] = { | ||
47 | [rxrpc_call_new_client] = "NWc", | ||
48 | [rxrpc_call_new_service] = "NWs", | ||
49 | [rxrpc_call_queued] = "QUE", | ||
50 | [rxrpc_call_queued_ref] = "QUR", | ||
51 | [rxrpc_call_connected] = "CON", | ||
52 | [rxrpc_call_release] = "RLS", | ||
53 | [rxrpc_call_seen] = "SEE", | ||
54 | [rxrpc_call_got] = "GOT", | ||
55 | [rxrpc_call_got_userid] = "Gus", | ||
56 | [rxrpc_call_got_kernel] = "Gke", | ||
57 | [rxrpc_call_put] = "PUT", | ||
58 | [rxrpc_call_put_userid] = "Pus", | ||
59 | [rxrpc_call_put_kernel] = "Pke", | ||
60 | [rxrpc_call_put_noqueue] = "PNQ", | ||
61 | [rxrpc_call_error] = "*E*", | ||
62 | }; | ||
63 | |||
64 | struct kmem_cache *rxrpc_call_jar; | 46 | struct kmem_cache *rxrpc_call_jar; |
65 | LIST_HEAD(rxrpc_calls); | 47 | LIST_HEAD(rxrpc_calls); |
66 | DEFINE_RWLOCK(rxrpc_call_lock); | 48 | DEFINE_RWLOCK(rxrpc_call_lock); |
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c index 6cbcdcc29853..40a1ef2adeb4 100644 --- a/net/rxrpc/conn_client.c +++ b/net/rxrpc/conn_client.c | |||
@@ -105,14 +105,6 @@ static void rxrpc_discard_expired_client_conns(struct work_struct *); | |||
105 | static DECLARE_DELAYED_WORK(rxrpc_client_conn_reap, | 105 | static DECLARE_DELAYED_WORK(rxrpc_client_conn_reap, |
106 | rxrpc_discard_expired_client_conns); | 106 | rxrpc_discard_expired_client_conns); |
107 | 107 | ||
108 | const char rxrpc_conn_cache_states[RXRPC_CONN__NR_CACHE_STATES][5] = { | ||
109 | [RXRPC_CONN_CLIENT_INACTIVE] = "Inac", | ||
110 | [RXRPC_CONN_CLIENT_WAITING] = "Wait", | ||
111 | [RXRPC_CONN_CLIENT_ACTIVE] = "Actv", | ||
112 | [RXRPC_CONN_CLIENT_CULLED] = "Cull", | ||
113 | [RXRPC_CONN_CLIENT_IDLE] = "Idle", | ||
114 | }; | ||
115 | |||
116 | /* | 108 | /* |
117 | * Get a connection ID and epoch for a client connection from the global pool. | 109 | * Get a connection ID and epoch for a client connection from the global pool. |
118 | * The connection struct pointer is then recorded in the idr radix tree. The | 110 | * The connection struct pointer is then recorded in the idr radix tree. The |
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 1d87b5453ef7..7c2abd85def9 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c | |||
@@ -767,15 +767,6 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb, | |||
767 | 767 | ||
768 | trace_rxrpc_rx_ack(call, first_soft_ack, summary.ack_reason, nr_acks); | 768 | trace_rxrpc_rx_ack(call, first_soft_ack, summary.ack_reason, nr_acks); |
769 | 769 | ||
770 | _proto("Rx ACK %%%u { m=%hu f=#%u p=#%u s=%%%u r=%s n=%u }", | ||
771 | sp->hdr.serial, | ||
772 | ntohs(buf.ack.maxSkew), | ||
773 | first_soft_ack, | ||
774 | ntohl(buf.ack.previousPacket), | ||
775 | acked_serial, | ||
776 | rxrpc_ack_names[summary.ack_reason], | ||
777 | buf.ack.nAcks); | ||
778 | |||
779 | if (buf.ack.reason == RXRPC_ACK_PING_RESPONSE) | 770 | if (buf.ack.reason == RXRPC_ACK_PING_RESPONSE) |
780 | rxrpc_input_ping_response(call, skb->tstamp, acked_serial, | 771 | rxrpc_input_ping_response(call, skb->tstamp, acked_serial, |
781 | sp->hdr.serial); | 772 | sp->hdr.serial); |
@@ -931,7 +922,6 @@ static void rxrpc_input_call_packet(struct rxrpc_call *call, | |||
931 | break; | 922 | break; |
932 | 923 | ||
933 | default: | 924 | default: |
934 | _proto("Rx %s %%%u", rxrpc_pkts[sp->hdr.type], sp->hdr.serial); | ||
935 | break; | 925 | break; |
936 | } | 926 | } |
937 | 927 | ||
diff --git a/net/rxrpc/misc.c b/net/rxrpc/misc.c index 6dee55fad2d3..1a2d4b112064 100644 --- a/net/rxrpc/misc.c +++ b/net/rxrpc/misc.c | |||
@@ -77,12 +77,6 @@ unsigned int rxrpc_rx_jumbo_max = 4; | |||
77 | */ | 77 | */ |
78 | unsigned int rxrpc_resend_timeout = 4 * 1000; | 78 | unsigned int rxrpc_resend_timeout = 4 * 1000; |
79 | 79 | ||
80 | const char *const rxrpc_pkts[] = { | ||
81 | "?00", | ||
82 | "DATA", "ACK", "BUSY", "ABORT", "ACKALL", "CHALL", "RESP", "DEBUG", | ||
83 | "?09", "?10", "?11", "?12", "VERSION", "?14", "?15" | ||
84 | }; | ||
85 | |||
86 | const s8 rxrpc_ack_priority[] = { | 80 | const s8 rxrpc_ack_priority[] = { |
87 | [0] = 0, | 81 | [0] = 0, |
88 | [RXRPC_ACK_DELAY] = 1, | 82 | [RXRPC_ACK_DELAY] = 1, |
@@ -94,148 +88,3 @@ const s8 rxrpc_ack_priority[] = { | |||
94 | [RXRPC_ACK_NOSPACE] = 7, | 88 | [RXRPC_ACK_NOSPACE] = 7, |
95 | [RXRPC_ACK_PING_RESPONSE] = 8, | 89 | [RXRPC_ACK_PING_RESPONSE] = 8, |
96 | }; | 90 | }; |
97 | |||
98 | const char rxrpc_ack_names[RXRPC_ACK__INVALID + 1][4] = { | ||
99 | "---", "REQ", "DUP", "OOS", "WIN", "MEM", "PNG", "PNR", "DLY", | ||
100 | "IDL", "-?-" | ||
101 | }; | ||
102 | |||
103 | const char rxrpc_skb_traces[rxrpc_skb__nr_trace][7] = { | ||
104 | [rxrpc_skb_rx_cleaned] = "Rx CLN", | ||
105 | [rxrpc_skb_rx_freed] = "Rx FRE", | ||
106 | [rxrpc_skb_rx_got] = "Rx GOT", | ||
107 | [rxrpc_skb_rx_lost] = "Rx *L*", | ||
108 | [rxrpc_skb_rx_received] = "Rx RCV", | ||
109 | [rxrpc_skb_rx_purged] = "Rx PUR", | ||
110 | [rxrpc_skb_rx_rotated] = "Rx ROT", | ||
111 | [rxrpc_skb_rx_seen] = "Rx SEE", | ||
112 | [rxrpc_skb_tx_cleaned] = "Tx CLN", | ||
113 | [rxrpc_skb_tx_freed] = "Tx FRE", | ||
114 | [rxrpc_skb_tx_got] = "Tx GOT", | ||
115 | [rxrpc_skb_tx_new] = "Tx NEW", | ||
116 | [rxrpc_skb_tx_rotated] = "Tx ROT", | ||
117 | [rxrpc_skb_tx_seen] = "Tx SEE", | ||
118 | }; | ||
119 | |||
120 | const char rxrpc_conn_traces[rxrpc_conn__nr_trace][4] = { | ||
121 | [rxrpc_conn_new_client] = "NWc", | ||
122 | [rxrpc_conn_new_service] = "NWs", | ||
123 | [rxrpc_conn_queued] = "QUE", | ||
124 | [rxrpc_conn_seen] = "SEE", | ||
125 | [rxrpc_conn_got] = "GOT", | ||
126 | [rxrpc_conn_put_client] = "PTc", | ||
127 | [rxrpc_conn_put_service] = "PTs", | ||
128 | }; | ||
129 | |||
130 | const char rxrpc_client_traces[rxrpc_client__nr_trace][7] = { | ||
131 | [rxrpc_client_activate_chans] = "Activa", | ||
132 | [rxrpc_client_alloc] = "Alloc ", | ||
133 | [rxrpc_client_chan_activate] = "ChActv", | ||
134 | [rxrpc_client_chan_disconnect] = "ChDisc", | ||
135 | [rxrpc_client_chan_pass] = "ChPass", | ||
136 | [rxrpc_client_chan_unstarted] = "ChUnst", | ||
137 | [rxrpc_client_cleanup] = "Clean ", | ||
138 | [rxrpc_client_count] = "Count ", | ||
139 | [rxrpc_client_discard] = "Discar", | ||
140 | [rxrpc_client_duplicate] = "Duplic", | ||
141 | [rxrpc_client_exposed] = "Expose", | ||
142 | [rxrpc_client_replace] = "Replac", | ||
143 | [rxrpc_client_to_active] = "->Actv", | ||
144 | [rxrpc_client_to_culled] = "->Cull", | ||
145 | [rxrpc_client_to_idle] = "->Idle", | ||
146 | [rxrpc_client_to_inactive] = "->Inac", | ||
147 | [rxrpc_client_to_waiting] = "->Wait", | ||
148 | [rxrpc_client_uncount] = "Uncoun", | ||
149 | }; | ||
150 | |||
151 | const char rxrpc_transmit_traces[rxrpc_transmit__nr_trace][4] = { | ||
152 | [rxrpc_transmit_wait] = "WAI", | ||
153 | [rxrpc_transmit_queue] = "QUE", | ||
154 | [rxrpc_transmit_queue_last] = "QLS", | ||
155 | [rxrpc_transmit_rotate] = "ROT", | ||
156 | [rxrpc_transmit_rotate_last] = "RLS", | ||
157 | [rxrpc_transmit_await_reply] = "AWR", | ||
158 | [rxrpc_transmit_end] = "END", | ||
159 | }; | ||
160 | |||
161 | const char rxrpc_receive_traces[rxrpc_receive__nr_trace][4] = { | ||
162 | [rxrpc_receive_incoming] = "INC", | ||
163 | [rxrpc_receive_queue] = "QUE", | ||
164 | [rxrpc_receive_queue_last] = "QLS", | ||
165 | [rxrpc_receive_front] = "FRN", | ||
166 | [rxrpc_receive_rotate] = "ROT", | ||
167 | [rxrpc_receive_end] = "END", | ||
168 | }; | ||
169 | |||
170 | const char rxrpc_recvmsg_traces[rxrpc_recvmsg__nr_trace][5] = { | ||
171 | [rxrpc_recvmsg_enter] = "ENTR", | ||
172 | [rxrpc_recvmsg_wait] = "WAIT", | ||
173 | [rxrpc_recvmsg_dequeue] = "DEQU", | ||
174 | [rxrpc_recvmsg_hole] = "HOLE", | ||
175 | [rxrpc_recvmsg_next] = "NEXT", | ||
176 | [rxrpc_recvmsg_cont] = "CONT", | ||
177 | [rxrpc_recvmsg_full] = "FULL", | ||
178 | [rxrpc_recvmsg_data_return] = "DATA", | ||
179 | [rxrpc_recvmsg_terminal] = "TERM", | ||
180 | [rxrpc_recvmsg_to_be_accepted] = "TBAC", | ||
181 | [rxrpc_recvmsg_return] = "RETN", | ||
182 | }; | ||
183 | |||
184 | const char rxrpc_rtt_tx_traces[rxrpc_rtt_tx__nr_trace][5] = { | ||
185 | [rxrpc_rtt_tx_ping] = "PING", | ||
186 | [rxrpc_rtt_tx_data] = "DATA", | ||
187 | }; | ||
188 | |||
189 | const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5] = { | ||
190 | [rxrpc_rtt_rx_ping_response] = "PONG", | ||
191 | [rxrpc_rtt_rx_requested_ack] = "RACK", | ||
192 | }; | ||
193 | |||
194 | const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8] = { | ||
195 | [rxrpc_timer_begin] = "Begin ", | ||
196 | [rxrpc_timer_expired] = "*EXPR*", | ||
197 | [rxrpc_timer_init_for_reply] = "IniRpl", | ||
198 | [rxrpc_timer_init_for_send_reply] = "SndRpl", | ||
199 | [rxrpc_timer_set_for_ack] = "SetAck", | ||
200 | [rxrpc_timer_set_for_ping] = "SetPng", | ||
201 | [rxrpc_timer_set_for_send] = "SetTx ", | ||
202 | [rxrpc_timer_set_for_resend] = "SetRTx", | ||
203 | }; | ||
204 | |||
205 | const char rxrpc_propose_ack_traces[rxrpc_propose_ack__nr_trace][8] = { | ||
206 | [rxrpc_propose_ack_client_tx_end] = "ClTxEnd", | ||
207 | [rxrpc_propose_ack_input_data] = "DataIn ", | ||
208 | [rxrpc_propose_ack_ping_for_lost_ack] = "LostAck", | ||
209 | [rxrpc_propose_ack_ping_for_lost_reply] = "LostRpl", | ||
210 | [rxrpc_propose_ack_ping_for_params] = "Params ", | ||
211 | [rxrpc_propose_ack_processing_op] = "ProcOp ", | ||
212 | [rxrpc_propose_ack_respond_to_ack] = "Rsp2Ack", | ||
213 | [rxrpc_propose_ack_respond_to_ping] = "Rsp2Png", | ||
214 | [rxrpc_propose_ack_retry_tx] = "RetryTx", | ||
215 | [rxrpc_propose_ack_rotate_rx] = "RxAck ", | ||
216 | [rxrpc_propose_ack_terminal_ack] = "ClTerm ", | ||
217 | }; | ||
218 | |||
219 | const char *const rxrpc_propose_ack_outcomes[rxrpc_propose_ack__nr_outcomes] = { | ||
220 | [rxrpc_propose_ack_use] = "", | ||
221 | [rxrpc_propose_ack_update] = " Update", | ||
222 | [rxrpc_propose_ack_subsume] = " Subsume", | ||
223 | }; | ||
224 | |||
225 | const char rxrpc_congest_modes[NR__RXRPC_CONGEST_MODES][10] = { | ||
226 | [RXRPC_CALL_SLOW_START] = "SlowStart", | ||
227 | [RXRPC_CALL_CONGEST_AVOIDANCE] = "CongAvoid", | ||
228 | [RXRPC_CALL_PACKET_LOSS] = "PktLoss ", | ||
229 | [RXRPC_CALL_FAST_RETRANSMIT] = "FastReTx ", | ||
230 | }; | ||
231 | |||
232 | const char rxrpc_congest_changes[rxrpc_congest__nr_change][9] = { | ||
233 | [rxrpc_cong_begin_retransmission] = " Retrans", | ||
234 | [rxrpc_cong_cleared_nacks] = " Cleared", | ||
235 | [rxrpc_cong_new_low_nack] = " NewLowN", | ||
236 | [rxrpc_cong_no_change] = "", | ||
237 | [rxrpc_cong_progress] = " Progres", | ||
238 | [rxrpc_cong_retransmit_again] = " ReTxAgn", | ||
239 | [rxrpc_cong_rtt_window_end] = " RttWinE", | ||
240 | [rxrpc_cong_saw_nack] = " SawNack", | ||
241 | }; | ||