Skip to content

Commit

Permalink
rxrpc: Reinitialise the call ACK and timer state for client reply phase
Browse files Browse the repository at this point in the history
Clear the ACK reason, ACK timer and resend timer when entering the client
reply phase when the first DATA packet is received.  New ACKs will be
proposed once the data is queued.

The resend timer is no longer relevant and we need to cancel ACKs scheduled
to probe for a lost reply.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Sep 24, 2016
1 parent b69d94d commit dd7c1ee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/rxrpc/ar-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ extern const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5];

enum rxrpc_timer_trace {
rxrpc_timer_begin,
rxrpc_timer_init_for_reply,
rxrpc_timer_expired,
rxrpc_timer_set_for_ack,
rxrpc_timer_set_for_resend,
Expand Down
9 changes: 9 additions & 0 deletions net/rxrpc/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ static bool rxrpc_receiving_reply(struct rxrpc_call *call)
{
rxrpc_seq_t top = READ_ONCE(call->tx_top);

if (call->ackr_reason) {
spin_lock_bh(&call->lock);
call->ackr_reason = 0;
call->resend_at = call->expire_at;
call->ack_at = call->expire_at;
spin_unlock_bh(&call->lock);
rxrpc_set_timer(call, rxrpc_timer_init_for_reply);
}

if (!test_bit(RXRPC_CALL_TX_LAST, &call->flags))
rxrpc_rotate_tx_window(call, top);
if (!test_bit(RXRPC_CALL_TX_LAST, &call->flags)) {
Expand Down
1 change: 1 addition & 0 deletions net/rxrpc/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5] = {
const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8] = {
[rxrpc_timer_begin] = "Begin ",
[rxrpc_timer_expired] = "*EXPR*",
[rxrpc_timer_init_for_reply] = "IniRpl",
[rxrpc_timer_set_for_ack] = "SetAck",
[rxrpc_timer_set_for_send] = "SetTx ",
[rxrpc_timer_set_for_resend] = "SetRTx",
Expand Down

0 comments on commit dd7c1ee

Please sign in to comment.