From 658d2f47281306dfd46c5eddcecaeadc3e3e7fa9 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 10 Jun 2010 11:34:39 -0400 Subject: [PATCH 1/1] 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 --- src/rx/rx.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index 407b03c..1f31048 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; } -- 1.9.4