aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-03-27 18:02:47 -0400
committerDavid Howells <dhowells@redhat.com>2018-03-27 18:02:47 -0400
commit827efed6a66ef8a1c071400b5952fee4a5ffedf9 (patch)
treee78399fd82660abab6d225b8326b041a2fdbf621
parent5d22d47b9ed96eddb35821dc2cc4f629f45827f7 (diff)
rxrpc: Trace resend
Add a tracepoint to trace packet resend events and to dump the Tx annotation buffer for added illumination. Signed-off-by: David Howells <dhowells@rdhat.com>
-rw-r--r--include/trace/events/rxrpc.h24
-rw-r--r--net/rxrpc/call_event.c1
2 files changed, 25 insertions, 0 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index 36cb50c111a6..41979f907575 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -420,6 +420,7 @@ rxrpc_rtt_rx_traces;
420rxrpc_timer_traces; 420rxrpc_timer_traces;
421rxrpc_propose_ack_traces; 421rxrpc_propose_ack_traces;
422rxrpc_propose_ack_outcomes; 422rxrpc_propose_ack_outcomes;
423rxrpc_congest_modes;
423rxrpc_congest_changes; 424rxrpc_congest_changes;
424 425
425/* 426/*
@@ -1229,6 +1230,29 @@ TRACE_EVENT(rxrpc_connect_call,
1229 __entry->call_id) 1230 __entry->call_id)
1230 ); 1231 );
1231 1232
1233TRACE_EVENT(rxrpc_resend,
1234 TP_PROTO(struct rxrpc_call *call, int ix),
1235
1236 TP_ARGS(call, ix),
1237
1238 TP_STRUCT__entry(
1239 __field(struct rxrpc_call *, call )
1240 __field(int, ix )
1241 __array(u8, anno, 64 )
1242 ),
1243
1244 TP_fast_assign(
1245 __entry->call = call;
1246 __entry->ix = ix;
1247 memcpy(__entry->anno, call->rxtx_annotations, 64);
1248 ),
1249
1250 TP_printk("c=%p ix=%u a=%64phN",
1251 __entry->call,
1252 __entry->ix,
1253 __entry->anno)
1254 );
1255
1232#endif /* _TRACE_RXRPC_H */ 1256#endif /* _TRACE_RXRPC_H */
1233 1257
1234/* This part must be outside protection */ 1258/* This part must be outside protection */
diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
index ad2ab1103189..6a62e42e1d8d 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -195,6 +195,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j)
195 * the packets in the Tx buffer we're going to resend and what the new 195 * the packets in the Tx buffer we're going to resend and what the new
196 * resend timeout will be. 196 * resend timeout will be.
197 */ 197 */
198 trace_rxrpc_resend(call, (cursor + 1) & RXRPC_RXTX_BUFF_MASK);
198 oldest = now; 199 oldest = now;
199 for (seq = cursor + 1; before_eq(seq, top); seq++) { 200 for (seq = cursor + 1; before_eq(seq, top); seq++) {
200 ix = seq & RXRPC_RXTX_BUFF_MASK; 201 ix = seq & RXRPC_RXTX_BUFF_MASK;