Skip to content

Commit 89ca694

Browse files
committed
rxrpc: Trace client call connection
Add a tracepoint (rxrpc_connect_call) to log the combination of rxrpc_call pointer, afs_call pointer/user data and wire call parameters to make it easier to match the tracebuffer contents to captured network packets. Signed-off-by: David Howells <dhowells@redhat.com>
1 parent 740586d commit 89ca694

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

include/trace/events/rxrpc.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,32 @@ TRACE_EVENT(rxrpc_rx_eproto,
11621162
__entry->why)
11631163
);
11641164

1165+
TRACE_EVENT(rxrpc_connect_call,
1166+
TP_PROTO(struct rxrpc_call *call),
1167+
1168+
TP_ARGS(call),
1169+
1170+
TP_STRUCT__entry(
1171+
__field(struct rxrpc_call *, call )
1172+
__field(unsigned long, user_call_ID )
1173+
__field(u32, cid )
1174+
__field(u32, call_id )
1175+
),
1176+
1177+
TP_fast_assign(
1178+
__entry->call = call;
1179+
__entry->user_call_ID = call->user_call_ID;
1180+
__entry->cid = call->cid;
1181+
__entry->call_id = call->call_id;
1182+
),
1183+
1184+
TP_printk("c=%p u=%p %08x:%08x",
1185+
__entry->call,
1186+
(void *)__entry->user_call_ID,
1187+
__entry->cid,
1188+
__entry->call_id)
1189+
);
1190+
11651191
#endif /* _TRACE_RXRPC_H */
11661192

11671193
/* This part must be outside protection */

net/rxrpc/conn_client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ static void rxrpc_activate_one_channel(struct rxrpc_connection *conn,
550550
call->cid = conn->proto.cid | channel;
551551
call->call_id = call_id;
552552

553+
trace_rxrpc_connect_call(call);
553554
_net("CONNECT call %08x:%08x as call %d on conn %d",
554555
call->cid, call->call_id, call->debug_id, conn->debug_id);
555556

0 commit comments

Comments
 (0)