diff options
author | David Howells <dhowells@redhat.com> | 2022-10-17 10:55:41 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-01-31 16:38:10 +0000 |
commit | 84e28aa513af814807a5e9a0e5f3cab773946f3c (patch) | |
tree | 5f32370250102d92ccc9d9d66d6fae24ab3eff8f /net/rxrpc/output.c | |
parent | af094824f20b454ee23b7b5a860b3ba58f4e6938 (diff) | |
download | lwn-84e28aa513af814807a5e9a0e5f3cab773946f3c.tar.gz lwn-84e28aa513af814807a5e9a0e5f3cab773946f3c.zip |
rxrpc: Generate extra pings for RTT during heavy-receive call
When doing a call that has a single transmitted data packet and a massive
amount of received data packets, we only ping for one RTT sample, which
means we don't get a good reading on it.
Fix this by converting occasional IDLE ACKs into PING ACKs to elicit a
response.
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/output.c')
-rw-r--r-- | net/rxrpc/output.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c index a9746be29634..98b5d0db7761 100644 --- a/net/rxrpc/output.c +++ b/net/rxrpc/output.c @@ -253,12 +253,15 @@ int rxrpc_send_ack_packet(struct rxrpc_call *call, struct rxrpc_txbuf *txb) iov_iter_kvec(&msg.msg_iter, WRITE, iov, 1, len); ret = do_udp_sendmsg(conn->local->socket, &msg, len); call->peer->last_tx_at = ktime_get_seconds(); - if (ret < 0) + if (ret < 0) { trace_rxrpc_tx_fail(call->debug_id, serial, ret, rxrpc_tx_point_call_ack); - else + } else { trace_rxrpc_tx_packet(call->debug_id, &txb->wire, rxrpc_tx_point_call_ack); + if (txb->wire.flags & RXRPC_REQUEST_ACK) + call->peer->rtt_last_req = ktime_get_real(); + } rxrpc_tx_backoff(call, ret); if (!__rxrpc_call_is_complete(call)) { |