diff options
author | David Howells <dhowells@redhat.com> | 2022-05-11 15:01:25 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2022-11-08 17:42:15 +0100 |
commit | b015424695f03a9fa5862d09c267ed458e256300 (patch) | |
tree | 5a9dfc7aaf5028ea5639bac6a58999b562cf17da /net/rxrpc/input.c | |
parent | rxrpc: Track highest acked serial (diff) | |
download | linux-b015424695f03a9fa5862d09c267ed458e256300.tar.xz linux-b015424695f03a9fa5862d09c267ed458e256300.zip |
rxrpc: Add stats procfile and DATA packet stats
Add a procfile, /proc/net/rxrpc/stats, to display some statistics about
what rxrpc has been doing. Writing a blank line to the stats file will
clear the increment-only counters. Allocated resource counters don't get
cleared.
Add some counters to count various things about DATA packets, including the
number created, transmitted and retransmitted and the number received, the
number of ACK-requests markings and the number of jumbo packets received.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Diffstat (limited to 'net/rxrpc/input.c')
-rw-r--r-- | net/rxrpc/input.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 4ba678f0c384..e7586d5ea2c3 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -443,6 +443,12 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb) } } + rxrpc_inc_stat(call->rxnet, stat_rx_data); + if (sp->hdr.flags & RXRPC_REQUEST_ACK) + rxrpc_inc_stat(call->rxnet, stat_rx_data_reqack); + if (sp->hdr.flags & RXRPC_JUMBO_PACKET) + rxrpc_inc_stat(call->rxnet, stat_rx_data_jumbo); + spin_lock(&call->input_lock); /* Received data implicitly ACKs all of the request packets we sent |