From: Jeffrey Altman Date: Sat, 16 Oct 2010 17:14:03 +0000 (-0400) Subject: Rx: Do not compute RTT on non-last packets of a jumbogram X-Git-Tag: upstream/1.8.0_pre1^2~4653 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=525ea8b60cc198f7e12da7a1aaffdcad2bb3ef21;p=packages%2Fo%2Fopenafs.git Rx: Do not compute RTT on non-last packets of a jumbogram A jumbogram is constructed as a series of rx packets that are all sent at once and acknowledged at the same time. Computing the RTT for all of the packets that makes up the jumbogram provides the jumbogram RTT more weight than for a non-jumbogram packet. To restore fairness, only compute the RTT for the last packet of a jumbogram. The non-last packets with have the RX_JUMBO_PACKET flag set in the packet header. Change-Id: Ia5237d9ca0707b39fe623639233b748b6798063e Reviewed-on: http://gerrit.openafs.org/2997 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 794834a7c..775fd6235 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -3916,10 +3916,12 @@ rxi_ComputePeerNetStats(struct rx_call *call, struct rx_packet *p, struct rx_peer *peer = call->conn->peer; /* Use RTT if not delayed by client and - * ignore packets that were retransmitted. */ + * ignore packets that were retransmitted and + * ignore all but the last packet of a jumbogram. */ if (!(p->flags & RX_PKTFLAG_ACKED) && ap->reason != RX_ACK_DELAY && - clock_Eq(&p->timeSent, &p->firstSent)) + clock_Eq(&p->timeSent, &p->firstSent) && + !(p->header.flags & RX_JUMBO_PACKET)) rxi_ComputeRoundTripTime(p, &p->timeSent, peer, now); #ifdef ADAPT_WINDOW rxi_ComputeRate(peer, call, p, np, ap->reason);