NetBSD Problem Report #20800

Received: (qmail 27037 invoked by uid 605); 19 Mar 2003 06:47:01 -0000
Message-Id: <20030319064700.E626211152@narn.netbsd.org>
Date: Tue, 18 Mar 2003 22:47:00 -0800 (PST)
From: jesseoff@yahoo.com
Sender: gnats-bugs-owner@netbsd.org
Reply-To: jesseoff@yahoo.com
To: gnats-bugs@gnats.netbsd.org
Subject: reading ppp over pseudo terminal maxes out at ~90 kb/sec
X-Send-Pr-Version: www-1.0

>Number:         20800
>Category:       kern
>Synopsis:       reading ppp over pseudo terminal maxes out at ~90 kb/sec
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    christos
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 19 06:48:00 +0000 2003
>Closed-Date:    Thu Apr 20 11:20:48 +0000 2017
>Last-Modified:  Thu Apr 20 11:20:48 +0000 2017
>Originator:     Jesse Off
>Release:        1.6.1
>Organization:
>Environment:
NetBSD angel 1.6.1_RC2 NetBSD 1.6.1_RC2 (GENERIC) #0: Fri Mar  7 10:16:20 MST 20
03     root@angelus:/usr/obj/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
reading from pseudo terminal master w/ ppp line discipline slave can not read more than 1024 (size of tty outq) bytes every clock tick. The relevant code from pppasyncstart() [ppp_tty.c]:

    /*
     * This timeout is needed for operation on a pseudo-tty,
     * because the pty code doesn't call pppstart after it has
     * drained the t_outq.
     */
    if (!idle && (sc->sc_flags & SC_TIMEOUT) == 0) {
        callout_reset(&sc->sc_timo_ch, 1, ppp_timeout, sc);
        sc->sc_flags |= SC_TIMEOUT;
    }

As a result, the tty outq is only filled once per clock tick, which is insufficient for fast ppp lines.

>How-To-Repeat:
I was trying to get l2tpd/IPSEC vpn networking over a local 100mbit network.  There are issues with l2tpd for netbsd I've had to fix to even get this far.  (improper term attrs for pty (loopbacked line error), improper assumption that each read(2) returns one frame in entirety (dropping/corrupting of large packets))
>Fix:
I can think of one, but its probably not the cleanest way. (have check in termios line discipline read for pseudo tty read of ppp discipline slave and call tty->sc_start() (pppasyncstart) on empty outq
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->christos 
Responsible-Changed-By: perry 
Responsible-Changed-When: Tue Apr 1 10:53:06 PST 2003 
Responsible-Changed-Why:  
Christos is the PPP maintainer. He also likely understands 
the issues pretty well. 
State-Changed-From-To: open->feedback 
State-Changed-By: christos 
State-Changed-When: Thu May 13 13:02:47 EDT 2004 
State-Changed-Why:  
Can you send me patches for this please? And how do I test it? 
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 08 Mar 2008 07:55:23 +0000
State-Changed-Why:
Looks like patches from the submitter are not forthcoming. Anyone want to
figure out how to test this on current?


State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Thu, 20 Apr 2017 07:20:48 -0400
State-Changed-Why:
pppd now does TIOCSQSIZE 32K


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.