From f2a676d10038e8f3913dc576397b9c9efb190afd Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 11 May 2022 14:01:25 +0100 Subject: rxrpc: Record statistics about ACK types Record statistics about the different types of ACKs that have been transmitted and received and the number of ACKs that have been filled out and transmitted or that have been skipped. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org --- net/rxrpc/output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'net/rxrpc/output.c') diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c index 8fddad2f63fc..f350d39e3a60 100644 --- a/net/rxrpc/output.c +++ b/net/rxrpc/output.c @@ -83,8 +83,12 @@ static size_t rxrpc_fill_out_ack(struct rxrpc_connection *conn, tmp = atomic_xchg(&call->ackr_nr_unacked, 0); tmp |= atomic_xchg(&call->ackr_nr_consumed, 0); if (!tmp && (reason == RXRPC_ACK_DELAY || - reason == RXRPC_ACK_IDLE)) + reason == RXRPC_ACK_IDLE)) { + rxrpc_inc_stat(call->rxnet, stat_tx_ack_skip); return 0; + } + + rxrpc_inc_stat(call->rxnet, stat_tx_ack_fill); /* Barrier against rxrpc_input_data(). */ serial = call->ackr_serial; @@ -253,6 +257,7 @@ int rxrpc_send_ack_packet(struct rxrpc_call *call, bool ping, if (ping) rtt_slot = rxrpc_begin_rtt_probe(call, serial, rxrpc_rtt_tx_ping); + rxrpc_inc_stat(call->rxnet, stat_tx_ack_send); ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, 2, len); conn->params.peer->last_tx_at = ktime_get_seconds(); if (ret < 0) -- cgit v1.2.3