aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-10-06 03:11:51 -0400
committerDavid Howells <dhowells@redhat.com>2016-10-06 03:11:51 -0400
commitbf7d620abf22c321208a4da4f435e7af52551a21 (patch)
tree9c7be57c2388c5b5ddd5c829d4ac0d98ebc9cbe1
parent9749fd2beac42e32cb3e3d85489b52b9cc71a9ac (diff)
rxrpc: Don't request an ACK on the last DATA packet of a call's Tx phase
Don't request an ACK on the last DATA packet of a call's Tx phase as for a client there will be a reply packet or some sort of ACK to shift phase. If the ACK is requested, OpenAFS sends a REQUESTED-ACK ACK with soft-ACKs in it and doesn't follow up with a hard-ACK. If we don't set the flag, OpenAFS will send a DELAY ACK that hard-ACKs the reply data, thereby allowing the call to terminate cleanly. Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--net/rxrpc/output.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c
index a12cea0cbc05..5dab1ff3a6c2 100644
--- a/net/rxrpc/output.c
+++ b/net/rxrpc/output.c
@@ -307,11 +307,12 @@ int rxrpc_send_data_packet(struct rxrpc_call *call, struct sk_buff *skb,
307 /* If our RTT cache needs working on, request an ACK. Also request 307 /* If our RTT cache needs working on, request an ACK. Also request
308 * ACKs if a DATA packet appears to have been lost. 308 * ACKs if a DATA packet appears to have been lost.
309 */ 309 */
310 if (retrans || 310 if (!(sp->hdr.flags & RXRPC_LAST_PACKET) &&
311 call->cong_mode == RXRPC_CALL_SLOW_START || 311 (retrans ||
312 (call->peer->rtt_usage < 3 && sp->hdr.seq & 1) || 312 call->cong_mode == RXRPC_CALL_SLOW_START ||
313 ktime_before(ktime_add_ms(call->peer->rtt_last_req, 1000), 313 (call->peer->rtt_usage < 3 && sp->hdr.seq & 1) ||
314 ktime_get_real())) 314 ktime_before(ktime_add_ms(call->peer->rtt_last_req, 1000),
315 ktime_get_real())))
315 whdr.flags |= RXRPC_REQUEST_ACK; 316 whdr.flags |= RXRPC_REQUEST_ACK;
316 317
317 if (IS_ENABLED(CONFIG_AF_RXRPC_INJECT_LOSS)) { 318 if (IS_ENABLED(CONFIG_AF_RXRPC_INJECT_LOSS)) {