Date: Thu, 7 Sep 1995 22:59:05 -0700 From: Stephen Melvin <melvin@zytek.com> To: freebsd-hackers@freebsd.org Subject: Patch to User Mode PPP Code (or... Six Echos or Separation) Message-ID: <199509080559.WAA02519@syzygy.zytek.com>
next in thread | raw e-mail | index | archive | help
Hello, I applied the patch shown below to /usr/src/usr.sbin/ppp/lqr.c. It turns out that ppp was hanging up on my customers a couple of minutes into a long file download and I tracked it to the logic which disconnects when it thinks that echo requests are not being returned. For some reason during these long file transfers the replies were exactly 6 echos behind (i.e. 3 minutes) and the logic in lqr.c cuts off at 5. I don't know why the echos were delayed 3 minutes, but all the while I'm getting maximum throughput; at the other end I'm running Trumpet Winsock under Windows 3.1. In any case, I changed the numbers to 10 and I've had no trouble since. I have verified that even during longer downloads (2.1Mb) the 6 echos of separation remains. Note that a limit of 10 will mean a 5 minute delay (instead of 2.5 minutes) if the other end dies completly. Below I have also attached a sample of the LQR output from the log file. Regards, Stephen Melvin melvin@zytek.com -------- Appendix A -- LQR log, 587K byte transfer over 14.4K modem 09-07 21:22:44 [1919] LQM method = 3 09-07 21:22:44 [1919] LqrOutput: 09-07 21:22:44 [1919] Magic: 3393bf54 LastOutLQRs: 00000000 09-07 21:22:44 [1919] LastOutPackets: 00000000 LastOutOctets: 00000000 09-07 21:22:44 [1919] PeerInLQRs: 00000000 PeerInPackets: 00000012 09-07 21:22:44 [1919] PeerInDiscards: 00000000 PeerInErrors: 00000000 09-07 21:22:44 [1919] PeerInOctets: 00000247 PeerOutLQRs: 00000003 09-07 21:22:44 [1919] PeerOutPackets: 0000000f PeerOutOctets: 000001e4 09-07 21:22:44 [1919] Will send LQR every 30.0 secs 09-07 21:22:44 [1919] StopLqr method = 1 09-07 21:22:44 [1919] Stop sending LQR, Use LCP ECHO instead. 09-07 21:22:44 [1919] Send echo LQR [1] 09-07 21:22:44 [1919] Got echo LQR [1] 09-07 21:23:14 [1919] Send echo LQR [2] 09-07 21:23:14 [1919] Got echo LQR [2] 09-07 21:23:44 [1919] Send echo LQR [3] 09-07 21:23:44 [1919] Got echo LQR [3] Note: data transfer started here 09-07 21:24:14 [1919] Send echo LQR [4] 09-07 21:24:44 [1919] Send echo LQR [5] 09-07 21:25:14 [1919] Send echo LQR [6] 09-07 21:25:44 [1919] Send echo LQR [7] 09-07 21:26:14 [1919] Send echo LQR [8] 09-07 21:26:29 [1919] Got echo LQR [4] 09-07 21:26:29 [1919] Got echo LQR [5] 09-07 21:26:44 [1919] Send echo LQR [9] 09-07 21:27:14 [1919] Send echo LQR [10] 09-07 21:27:44 [1919] ** Too many ECHO packets are lost. ** 09-07 21:27:44 [1919] Send echo LQR [11] 09-07 21:27:46 [1919] Got echo LQR [6] 09-07 21:28:14 [1919] ** Too many ECHO packets are lost. ** 09-07 21:28:14 [1919] Send echo LQR [12] 09-07 21:28:16 [1919] Got echo LQR [7] 09-07 21:28:44 [1919] ** Too many ECHO packets are lost. ** 09-07 21:28:44 [1919] Send echo LQR [13] 09-07 21:28:46 [1919] Got echo LQR [8] 09-07 21:29:14 [1919] ** Too many ECHO packets are lost. ** 09-07 21:29:14 [1919] Send echo LQR [14] 09-07 21:29:16 [1919] Got echo LQR [9] 09-07 21:29:44 [1919] ** Too many ECHO packets are lost. ** 09-07 21:29:44 [1919] Send echo LQR [15] 09-07 21:29:46 [1919] Got echo LQR [10] 09-07 21:30:14 [1919] ** Too many ECHO packets are lost. ** 09-07 21:30:14 [1919] Send echo LQR [16] 09-07 21:30:16 [1919] Got echo LQR [11] 09-07 21:30:44 [1919] ** Too many ECHO packets are lost. ** 09-07 21:30:44 [1919] Send echo LQR [17] 09-07 21:30:46 [1919] Got echo LQR [12] Note: data transfer ended here 09-07 21:30:51 [1919] Got echo LQR [13] 09-07 21:30:52 [1919] Got echo LQR [14] 09-07 21:30:52 [1919] Got echo LQR [15] 09-07 21:30:52 [1919] Got echo LQR [16] 09-07 21:30:52 [1919] Got echo LQR [17] 09-07 21:31:14 [1919] Send echo LQR [18] 09-07 21:31:14 [1919] Got echo LQR [18] -------- Appendix B -- lqr.c patch *** lqr.c Thu Sep 7 21:49:54 1995 --- lqr.c.orig Thu Sep 7 21:48:49 1995 *************** *** 116,122 **** lqrsendcnt++; } } else if (lqmmethod & LQM_ECHO) { ! if (echoseq - gotseq > 10) { LogPrintf(LOG_PHASE, "** Too many ECHO packets are lost. **\n"); LcpClose(); Cleanup(EX_ERRDEAD); --- 116,122 ---- lqrsendcnt++; } } else if (lqmmethod & LQM_ECHO) { ! if (echoseq - gotseq > 5) { LogPrintf(LOG_PHASE, "** Too many ECHO packets are lost. **\n"); LcpClose(); Cleanup(EX_ERRDEAD);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509080559.WAA02519>