Skip to content

Commit 827efed

Browse files
committed
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>
1 parent 5d22d47 commit 827efed

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

‎include/trace/events/rxrpc.h‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ rxrpc_rtt_rx_traces;
420420
rxrpc_timer_traces;
421421
rxrpc_propose_ack_traces;
422422
rxrpc_propose_ack_outcomes;
423+
rxrpc_congest_modes;
423424
rxrpc_congest_changes;
424425

425426
/*
@@ -1229,6 +1230,29 @@ TRACE_EVENT(rxrpc_connect_call,
12291230
__entry->call_id)
12301231
);
12311232

1233+
TRACE_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+
12321256
#endif /* _TRACE_RXRPC_H */
12331257

12341258
/* This part must be outside protection */

‎net/rxrpc/call_event.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j)
195195
* the packets in the Tx buffer we're going to resend and what the new
196196
* resend timeout will be.
197197
*/
198+
trace_rxrpc_resend(call, (cursor + 1) & RXRPC_RXTX_BUFF_MASK);
198199
oldest = now;
199200
for (seq = cursor + 1; before_eq(seq, top); seq++) {
200201
ix = seq & RXRPC_RXTX_BUFF_MASK;

0 commit comments

Comments
 (0)