[258] in linux-net channel archive
Re: PPP and VJ compression problem
daemon@ATHENA.MIT.EDU (Carsten Paeth)
Sun Apr 30 06:39:04 1995
To: linux-net@vger.rutgers.edu
Date: 26 Apr 1995 11:47:04 +0200
From: calle@calle.in-berlin.de (Carsten Paeth)
Stephen Davies (scldad@sdc.com.au) wrote:
: Thanks Al.
: I tried vj-max-slots at 8, 4 and 2 without any success. (It will not
: accept 1)
: Is it worth trying any other values?
: Stephen.
: >Stephen Davies wrote:
: >
: >> The only way I can get non-trivial transfers to work is to turn off VJ
: >> compression. That is:
: >>
: >> pppd /dev/cua1 38400 -vj asyncmap 00000000 crtscts lock defaultroute
: connect
: >> 'chat -v -f /etc/pppscript'
: >>
: >> works perfectly but if I remove the -vj, I get disconected after
: >> transferring
: >> a couple of K bytes.
[...]
I had the same problems with my own driver, 2 years ago,
while testing it with a bad serial line.
Unfortunaly someone else was faster, to send his driver out.
But never the less I found this problem in the actual driver also.
If a packet get lost, the compression cache gets out of order, in
this case driver has to call slhc_toss(), to flush the cache and
restart with a not compressed packet. I think one year ago I
sent a patch, but nobody seems to be interested.
'cause of your problem, I was going through the driver again.
I hope I found all places. Would be nice to hear, if it was working
or not.
--- ppp.c.org.org Wed Apr 26 11:29:37 1995
+++ ppp.c.org Wed Apr 26 11:38:51 1995
@@ -695,6 +695,7 @@
else
if (answer < 0) {
ppp->stats.serrors++;
+ slhc_toss( ppp->slcomp );
ppp_output_done (ppp); /* unlock the transmitter */
}
}
@@ -778,8 +779,10 @@
*ppp->rhead = c;
ppp->rhead++;
ppp->rcount++;
- } else
+ } else {
ppp->stats.roverrun++;
+ slhc_toss( ppp->slcomp );
+ }
restore_flags(flags);
}
@@ -1006,6 +1009,7 @@
PRINTKN (1, (KERN_WARNING "ppp_toss: tossing frame, reason = %d\n",
ppp->toss));
ppp->stats.rerrors++;
+ slhc_toss( ppp->slcomp );
return;
}
@@ -1019,6 +1023,7 @@
if (count < 4) {
PRINTKN (1,(KERN_WARNING "ppp: got runt ppp frame, %d chars\n", count));
ppp->stats.runts++;
+ slhc_toss( ppp->slcomp );
return;
}
@@ -1026,6 +1031,7 @@
if (!ppp_check_fcs(ppp)) {
PRINTKN (1,(KERN_WARNING "ppp: frame with bad fcs\n"));
ppp->stats.rerrors++;
+ slhc_toss( ppp->slcomp );
return;
}
@@ -1068,6 +1074,7 @@
PRINTKN (1,(KERN_WARNING
"ppp: dropping packet on the floor: nobody could take it.\n"));
ppp->stats.tossed++;
+ slhc_toss( ppp->slcomp );
}
/* Examine packet at C, attempt to pass up to net layer.
Bye.
calle
--
calle@calle.in-berlin.de