head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.54 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.52 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.50 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.48 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.46 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.44 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.42 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.40 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.38 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.36 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.34 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.32 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.30 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.28 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.26 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.24 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.22 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.20 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.18 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.16 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.14 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.12 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.10 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.8 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.6 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.4 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.2 pkgsrc-2003Q4-base:1.2 buildlink2-base:1.2 netbsd-1-4-RELEASE:1.1; locks; strict; comment @# @; 1.2 date 99.06.04.23.46.57; author rvb; state dead; branches; next 1.1; 1.1 date 99.04.28.23.57.04; author rvb; state Exp; branches; next ; desc @@ 1.2 log @Sync with 5.2.4 @ text @$NetBSD: patch-de,v 1.1 1999/04/28 23:57:04 rvb Exp $ diff -u /usr/pkgsrc/net/coda-5.2.2/coda-src/rpc2/sftp3.c ./coda-src/rpc2/sftp3.c --- /usr/pkgsrc/net/coda-5.2.2/coda-src/rpc2/sftp3.c Mon Apr 5 18:00:41 1999 +++ ./coda-src/rpc2/sftp3.c Mon Apr 26 14:05:08 1999 @@@@ -320,21 +320,22 @@@@ return(0); } +#if 0 /* Harvest the RTT observation if this is the first packet. (And try to * get an estimate of the amount of bytes transferred on this roundtrip) */ if (pBuff->Header.SEFlags & SFTP_FIRST) sftp_UpdateRTT(pBuff, sEntry, pBuff->Prefix.LengthOfPacket + /*data*/ sizeof(struct RPC2_PacketHeader));/*ack?*/ +#endif -#if 0 /* this test is bogus and makes us return bad timestamps when - packets are dropped. --JH */ - /* We are seeing this packet for the first time */ +#if 1 if (pBuff->Header.SeqNumber == sEntry->RecvLastContig+1) - /* This packet advances the left edge of the window. - Save the timestamp to echo in the next ack */ + /* This packet advances the left edge of the window. Save the + * timestamp to echo in the next ack */ sEntry->TimeEcho = pBuff->Header.TimeStamp; #else - /* We are seeing this packet for the first time */ + /* Keep track of the highest seen timestamp value, we use this when + * replying to the other side */ if (sEntry->TimeEcho < pBuff->Header.TimeStamp) sEntry->TimeEcho = pBuff->Header.TimeStamp; #endif @@@@ -358,13 +359,15 @@@@ sEntry->RecvLastContig + i <= sEntry->RecvMostRecent; i++) if (TESTBIT(sEntry->RecvTheseBits, i)) { pb = sEntry->ThesePackets[PBUFF((sEntry->RecvLastContig + i))]; - if (pb->Header.TimeEcho >= pBuff->Header.TimeEcho && - !(pb->Header.SEFlags & SFTP_COUNTED)) { + if (pb->Header.TimeEcho >= pBuff->Header.TimeEcho) { + //&& !(pb->Header.SEFlags & SFTP_COUNTED)) { dataThisRound += pb->Prefix.LengthOfPacket; pb->Header.SEFlags |= SFTP_COUNTED; } } if (dataThisRound) + /* XXX The dataThisRound value is NOT equal to the data that + * was actually sent if we sent duplicate packets! -JH */ sftp_UpdateBW(pBuff, dataThisRound, sEntry); /* recalculate the retry timeout */ @@@@ -582,8 +585,11 @@@@ for (i = sEntry->SendLastContig+1; i <= pBuff->Header.GotEmAll; i++) { pb = sEntry->ThesePackets[PBUFF(i)]; - if (!(ntohl(pb->Header.SEFlags) & SFTP_COUNTED)) - dataThisRound += ntohl(pb->Header.BodyLength); + /* I had added the following test, but it makes us underestimate + * by a large amount the actual transferred data size (as reported + * to sftp_UpdateBW) -JH */ + /* if (!(ntohl(pb->Header.SEFlags) & SFTP_COUNTED)) */ + dataThisRound += ntohl(pb->Header.BodyLength); } for (i = 1; i <= sizeof(int)*BITMASKWIDTH; i++) @@@@ -599,6 +605,8 @@@@ } if (dataThisRound) + /* XXX This is bogus, the succesfully acked data is NOT equal to + * the data we actually transferred over the wire! -JH */ sftp_UpdateBW(pBuff, dataThisRound, sEntry); } @ 1.1 log @stabilize bandwidth calculation @ text @d1 1 a1 1 $NetBSD$ @