Skip to content

Commit 3e018da

Browse files
committed
rxrpc: Show a call's hard-ACK cursors in /proc/net/rxrpc_calls
Show a call's hard-ACK cursors in /proc/net/rxrpc_calls so that a call's progress can be more easily monitored. Signed-off-by: David Howells <dhowells@redhat.com>
1 parent b1d9f7f commit 3e018da

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

net/rxrpc/proc.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ static int rxrpc_call_seq_show(struct seq_file *seq, void *v)
5252
struct rxrpc_sock *rx;
5353
struct rxrpc_peer *peer;
5454
struct rxrpc_call *call;
55+
rxrpc_seq_t tx_hard_ack, rx_hard_ack;
5556
char lbuff[50], rbuff[50];
5657

5758
if (v == &rxrpc_calls) {
@@ -82,9 +83,11 @@ static int rxrpc_call_seq_show(struct seq_file *seq, void *v)
8283
else
8384
strcpy(rbuff, "no_connection");
8485

86+
tx_hard_ack = READ_ONCE(call->tx_hard_ack);
87+
rx_hard_ack = READ_ONCE(call->rx_hard_ack);
8588
seq_printf(seq,
8689
"UDP %-47.47s %-47.47s %4x %08x %08x %s %3u"
87-
" %-8.8s %08x %lx\n",
90+
" %-8.8s %08x %lx %08x %02x %08x %02x\n",
8891
lbuff,
8992
rbuff,
9093
call->service_id,
@@ -94,7 +97,9 @@ static int rxrpc_call_seq_show(struct seq_file *seq, void *v)
9497
atomic_read(&call->usage),
9598
rxrpc_call_states[call->state],
9699
call->abort_code,
97-
call->user_call_ID);
100+
call->user_call_ID,
101+
tx_hard_ack, READ_ONCE(call->tx_top) - tx_hard_ack,
102+
rx_hard_ack, READ_ONCE(call->rx_top) - rx_hard_ack);
98103

99104
return 0;
100105
}

0 commit comments

Comments
 (0)