From 42f8c24972976bc9bad46d3d97251be2a43ed458 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 30 Sep 2010 10:48:58 -0400 Subject: [PATCH] Revert "Rx: When call receive is done, send ack all packet" This reverts commit 3cd3715e608b801b4848399e42cb47464e6e3cc3, which replaces an ack with an ackall; ackall processing does not actually mark all packets acked when it is received, so it is insufficient. Reviewed-on: http://gerrit.openafs.org/4837 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 358099b21c5c888c02bf3754702ae623378c507d) Change-Id: I7accb0e176c6143d87bb7809ead7ced63b9d86dd Reviewed-on: http://gerrit.openafs.org/4946 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/rx/rx.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index d4777367a..a5127482f 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -4120,23 +4120,8 @@ rxi_ReceiveDataPacket(struct rx_call *call, * Send an ack when requested by the peer, or once every * rxi_SoftAckRate packets until the last packet has been * received. Always send a soft ack for the last packet in - * the server's reply. - * - * If there was more than one packet received for the call - * and we have received all of them, immediately send an - * RX_PACKET_TYPE_ACKALL packet so that the peer can empty - * its packet transmit queue and cancel all resend events. - * - * When there is only one packet in the call there is a - * chance that we can race with Ping ACKs sent as part of - * connection establishment if the udp packets are delivered - * out of order. When the race occurs, a two second delay - * will occur while waiting for a new Ping ACK to be sent. - */ - if (!isFirst && (call->flags & RX_CALL_RECEIVE_DONE)) { - rxevent_Cancel(call->delayedAckEvent, call, RX_CALL_REFCOUNT_DELAY); - rxi_AckAll(NULL, call, 0); - } else if (ackNeeded) { + * the server's reply. */ + if (ackNeeded) { rxevent_Cancel(call->delayedAckEvent, call, RX_CALL_REFCOUNT_DELAY); np = rxi_SendAck(call, np, serial, ackNeeded, istack); } else if (call->nSoftAcks > (u_short) rxi_SoftAckRate) { @@ -4160,6 +4145,8 @@ rxi_ReceiveDataPacket(struct rx_call *call, call->delayedAckEvent = rxevent_PostNow(&when, &now, rxi_SendDelayedAck, call, 0); } + } else if (call->flags & RX_CALL_RECEIVE_DONE) { + rxevent_Cancel(call->delayedAckEvent, call, RX_CALL_REFCOUNT_DELAY); } return np; -- 2.39.5