From: Derrick Brashear Date: Thu, 10 Jun 2010 15:34:39 +0000 (-0400) Subject: idle dead time track less X-Git-Tag: openafs-devel-1_5_75~137 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=658d2f47281306dfd46c5eddcecaeadc3e3e7fa9;p=packages%2Fo%2Fopenafs.git idle dead time track less retransmits don't count as sends for idle "send time" purposes. neither do ping acks. disallow both in computations. Change-Id: I599bb1111189efd21580d357c31c043f2315f910 Reviewed-on: http://gerrit.openafs.org/2112 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 407b03c40..1f3104896 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -5299,7 +5299,10 @@ rxi_SendList(struct rx_call *call, struct rx_packet **list, int len, /* Update last send time for this call (for keep-alive * processing), and for the connection (so that we can discover * idle connections) */ - call->lastSendData = conn->lastSendTime = call->lastSendTime = clock_Sec(); + conn->lastSendTime = call->lastSendTime = clock_Sec(); + /* Let a set of retransmits trigger an idle timeout */ + if (!resending) + call->lastSendData = call->lastSendTime; } /* When sending packets we need to follow these rules: @@ -5791,8 +5794,11 @@ rxi_Send(struct rx_call *call, struct rx_packet *p, * processing), and for the connection (so that we can discover * idle connections) */ conn->lastSendTime = call->lastSendTime = clock_Sec(); - /* Don't count keepalives here, so idleness can be tracked. */ - if ((p->header.type != RX_PACKET_TYPE_ACK) || (((struct rx_ackPacket *)rx_DataOf(p))->reason != RX_ACK_PING)) + /* Don't count keepalive ping/acks here, so idleness can be tracked. */ + if ((p->header.type != RX_PACKET_TYPE_ACK) || + ((((struct rx_ackPacket *)rx_DataOf(p))->reason != RX_ACK_PING) && + (((struct rx_ackPacket *)rx_DataOf(p))->reason != + RX_ACK_PING_RESPONSE))) call->lastSendData = call->lastSendTime; }