Paul wrote:

> On Thu, 23 Dec 1999, Paul wrote:
>
> @>under NT? Have you tried a lower baud rate? Sometimes people have trouble
> @>with things like hard drives starving serial irq's. Try hdparm maybe...
>                                                           ^^^^^^
>
> I meant irqtune, although thats probably more relavant to old hardware??
>
> Paul

Paul,

THANKS!!!!

I owe you many virtual beers.
I had tried a lower baud rate without success, but I thought I would give
irqtune a shot anyway.
It turns out I didn't need irqtune but the REAME file solved my problem
straight away.
The problem was my service provider's implementation of PPP is apparently
broken.  These lines are taken from the irqtune readme.

Q: Why does PPP consistently drop every second packet sent from Linux,
resulting in a 50% packet loss?

Some braindamaged PPP implementations do not handle PPP flag optimization!

The PPP protocol uses a flag byte to separate packets. Each packet begins with
a flag and ends with a second flag.

       Loosely, each packet looks something this:
       <FLAG> <PACKET (e.g. header, data, CRC)> <FLAG>
       Thus, a sequence of packets might look like this:
       <FLAG><PACKET1><FLAG> <FLAG><PACKET2><FLAG> <FLAG><PACKET3><FLAG> ...
       However, as an optimization, the PPP protocol permits trailing and
leading flag bytes to be combined within a sequence of packets:
       <FLAG> <PACKET1> <FLAG> <PACKET2> <FLAG> <PACKET3> <FLAG> ...

Although the PPP protocol requires implementations receiving packets to handle
flag optimization, some broken PPP implementations do not
understand it!

These implementations see the trailing flag, process the packet, then look for
a fresh flag. They don't realize that the trailing flag of PACKET1 may
perform double duty as the leading flag of PACKET2. They will ignore all data
until they see a new flag (which, in this example, is the flag between
PACKET2 and PACKET3). Thus, PACKET2 will be seen as noise data and be ignored.
These implementations will only see only the odd number
packets (e.g. PACKET1, PACKET3, PACKET5, etc.), resulting in a 50% packet
loss!

Linux PPP implements flag optimization correctly and enables it by default. As
charity to others, Linux does allow flag optimization to be turned off,
but currently, this this requires the kernel to be rebuilt.

In Linux, to turn off flag optimization on transmit, do the following:

       Edit the file drivers/net/ppp.c
       Change the line:
       static int  flag_time = OPTIMIZE_FLAG_TIME;
       Replace this with:
       static int  flag_time = 0;
       Rebuild the kernel.

Note: A better solution is to return the defective PPP implementation to the
vendor and demand a refund or replacement!


I don't know why my searches for dropping packets didn't find this, but they
didn't.
I would suggest that the HOWTO for PPP contains a mention of irqtune
http://www.best.com/~cae/irqtune/
as the PPP driver has to be changed in this case.


Once again, thanks Paul, you've restored my sanity. I was starting to believe
I would never get it working.

Paul
===================================
Paul Parsons
[EMAIL PROTECTED]


-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]

Reply via email to