From: Simon Wilkinson Date: Fri, 26 Oct 2012 13:55:02 +0000 (+0100) Subject: rx: Remove duplicate out of order ACK check X-Git-Tag: openafs-stable-1_8_0pre1~1861 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=8d359e6dff5317698597e77f0a1dd5ba2bfb569a rx: Remove duplicate out of order ACK check Once we've moved the congestion window, there's no going back. So any ACK packets that attempt to move the window backwards by including a 'firstPacket' value earlier than the current window position must be ignored. However, we check (and ignore) these packets twice. Once in rxi_ReceivePacket, which only checks in the client side case, and again in rxi_ReceiveAckPacket, which has a more complete check that runs for both client and server connections. Remove the identical check from rxi_ReceivePacket in a continuing effort to clean up this bit of code. Change-Id: I090bc289848d0797860f46aec5877ad07fcc9b82 Reviewed-on: http://gerrit.openafs.org/8299 Reviewed-by: Jeffrey Altman Tested-by: BuildBot --- diff --git a/src/rx/rx.c b/src/rx/rx.c index bfb73fa..0ec9cc8 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -3569,30 +3569,7 @@ rxi_ReceivePacket(struct rx_packet *np, osi_socket socket, #else /* RX_ENABLE_LOCKS */ rxi_ClearTransmitQueue(call, 0); #endif /* RX_ENABLE_LOCKS */ - } else { - if (np->header.type == RX_PACKET_TYPE_ACK) { - /* now check to see if this is an ack packet acknowledging that the - * server actually *lost* some hard-acked data. If this happens we - * ignore this packet, as it may indicate that the server restarted in - * the middle of a call. It is also possible that this is an old ack - * packet. We don't abort the connection in this case, because this - * *might* just be an old ack packet. The right way to detect a server - * restart in the midst of a call is to notice that the server epoch - * changed, btw. */ - /* XXX I'm not sure this is exactly right, since tfirst **IS** - * XXX unacknowledged. I think that this is off-by-one, but - * XXX I don't dare change it just yet, since it will - * XXX interact badly with the server-restart detection - * XXX code in receiveackpacket. */ - if (ntohl(rx_GetInt32(np, FIRSTACKOFFSET)) < call->tfirst) { - if (rx_stats_active) - rx_atomic_inc(&rx_stats.spuriousPacketsRead); - MUTEX_EXIT(&call->lock); - putConnection(conn); - return np; - } - } - } /* else not a data packet */ + } } osirx_AssertMine(&call->lock, "rxi_ReceivePacket middle");