aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rxrpc/input.c')
-rw-r--r--net/rxrpc/input.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index a0a5bd108c9e..c121949de3c8 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -356,6 +356,38 @@ ack:
356} 356}
357 357
358/* 358/*
359 * Process a requested ACK.
360 */
361static void rxrpc_input_requested_ack(struct rxrpc_call *call,
362 ktime_t resp_time,
363 rxrpc_serial_t orig_serial,
364 rxrpc_serial_t ack_serial)
365{
366 struct rxrpc_skb_priv *sp;
367 struct sk_buff *skb;
368 ktime_t sent_at;
369 int ix;
370
371 for (ix = 0; ix < RXRPC_RXTX_BUFF_SIZE; ix++) {
372 skb = call->rxtx_buffer[ix];
373 if (!skb)
374 continue;
375
376 sp = rxrpc_skb(skb);
377 if (sp->hdr.serial != orig_serial)
378 continue;
379 smp_rmb();
380 sent_at = skb->tstamp;
381 goto found;
382 }
383 return;
384
385found:
386 rxrpc_peer_add_rtt(call, rxrpc_rtt_rx_requested_ack,
387 orig_serial, ack_serial, sent_at, resp_time);
388}
389
390/*
359 * Process a ping response. 391 * Process a ping response.
360 */ 392 */
361static void rxrpc_input_ping_response(struct rxrpc_call *call, 393static void rxrpc_input_ping_response(struct rxrpc_call *call,
@@ -508,6 +540,9 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb,
508 if (buf.ack.reason == RXRPC_ACK_PING_RESPONSE) 540 if (buf.ack.reason == RXRPC_ACK_PING_RESPONSE)
509 rxrpc_input_ping_response(call, skb->tstamp, acked_serial, 541 rxrpc_input_ping_response(call, skb->tstamp, acked_serial,
510 sp->hdr.serial); 542 sp->hdr.serial);
543 if (buf.ack.reason == RXRPC_ACK_REQUESTED)
544 rxrpc_input_requested_ack(call, skb->tstamp, acked_serial,
545 sp->hdr.serial);
511 546
512 if (buf.ack.reason == RXRPC_ACK_PING) { 547 if (buf.ack.reason == RXRPC_ACK_PING) {
513 _proto("Rx ACK %%%u PING Request", sp->hdr.serial); 548 _proto("Rx ACK %%%u PING Request", sp->hdr.serial);