Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rxrpc: Don't use received skbuff timestamps

Don't use received skbuff timestamps, but rather set a timestamp when an
ack is processed so that the time taken to get to rxrpc_input_ack() is
included in the RTT.

The timestamp of the latest ACK received is tracked in
call->acks_latest_ts.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/20241204074710.990092-26-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

David Howells and committed by
Jakub Kicinski
7903d443 dcdff0d8

+10 -12
+10 -9
net/rxrpc/input.c
··· 1037 1037 rxrpc_inc_stat(call->rxnet, stat_rx_acks[summary.ack_reason]); 1038 1038 prefetch(call->tx_queue); 1039 1039 1040 - if (summary.acked_serial != 0) { 1041 - if (summary.ack_reason == RXRPC_ACK_PING_RESPONSE) 1042 - rxrpc_complete_rtt_probe(call, skb->tstamp, summary.acked_serial, 1043 - ack_serial, rxrpc_rtt_rx_ping_response); 1044 - else 1045 - summary.rtt_sample_avail = true; 1046 - } 1047 - 1048 1040 /* If we get an EXCEEDS_WINDOW ACK from the server, it probably 1049 1041 * indicates that the client address changed due to NAT. The server 1050 1042 * lost the call because it switched to a different peer. ··· 1079 1087 if (nr_acks > 0) 1080 1088 skb_condense(skb); 1081 1089 1082 - call->acks_latest_ts = skb->tstamp; 1090 + call->acks_latest_ts = ktime_get_real(); 1083 1091 call->acks_hard_ack = hard_ack; 1084 1092 call->acks_prev_seq = prev_pkt; 1085 1093 ··· 1099 1107 1100 1108 if (hard_ack + 1 == 0) 1101 1109 return rxrpc_proto_abort(call, 0, rxrpc_eproto_ackr_zero); 1110 + 1111 + if (summary.acked_serial != 0) { 1112 + if (summary.ack_reason == RXRPC_ACK_PING_RESPONSE) 1113 + rxrpc_complete_rtt_probe(call, call->acks_latest_ts, 1114 + summary.acked_serial, ack_serial, 1115 + rxrpc_rtt_rx_ping_response); 1116 + else 1117 + summary.rtt_sample_avail = true; 1118 + } 1102 1119 1103 1120 /* Ignore ACKs unless we are or have just been transmitting. */ 1104 1121 switch (__rxrpc_call_state(call)) {
-3
net/rxrpc/local_object.c
··· 215 215 216 216 /* we want to set the don't fragment bit */ 217 217 rxrpc_local_dont_fragment(local, true); 218 - 219 - /* We want receive timestamps. */ 220 - sock_enable_timestamps(usk); 221 218 break; 222 219 223 220 default: