[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: low throughput on PPP link



Hamish Moffatt wrote:

> On Mon, Jun 01, 1998 at 11:28:02PM -0500, Gregory Guthrie wrote:
> > At 05:59 PM 5/29/98 -0500, Jens B. Jorgensen wrote:
> > >Well, you need to pass the speed to pppd as 115200, not 57600. You see, the
> > >set_serial spd_vhi flag sets what speed will be used if 38400 is selected.
> > >However, pppd can set the speed to 115200 just fine if you specify it. You're
> > >specifying 57600 and that's what you're getting.
> > -- Thanks.
> >
> > I guess that the conventions for pppd and setserial are different then.
> > So, pppd accepts 115K, and manipulates the combination of baud rate and vhi
> > appropriately?
>
> I doubt pppd uses spd_vhi at all. My understanding is that this is a hack
> used to allow 57600 and 115200 with programs that supported only 38400
> and below. The idea was that you told your software 38400, regardless
> of the actual speed, then used spd_hi for 57600, or spd_vhi for 115200.

>From TFM (setserial):

       spd_vhi
              Use 115kb when  the  application  requests  38.4kb.
              This parameter may be specified by a non-privileged
              user.

> If your software actually supports > 38400 (eg pppd) there is no need to do
> this.
>
> I might be wrong, of course -- but I'm using 57600 here and I haven't
> touched spd_vhi in years.

You're on the right track. The old unix ioctl for changing characteristics of serial
ports was the struct termio. This struct had a member (well, members actually--you
could set input and output speed independently) which could be set to control speed
using defined constants which ranged all the way up to 38400. Nowadays we use the
more modern termios struct (and a special set of functions rather than ioctl
directly) and have constants to set the speed all the way up to 230400. The spd_vhi
flag was basically supported in the kernel driver so that old software which used
the old ioctl and didn't know a serial line could go higher than 38400 could still
use the hardware's capability. I'm sure you can find old code on the net which uses
this old ioctl but I imagine most software which is developed exclusively or
primarily for Linux is written to take advantage of termios and higher speeds.

--
Jens B. Jorgensen
jjorgens@bdsinc.com



--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: