From owner-freebsd-arch@FreeBSD.ORG Tue May 27 22:30:29 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1B1F1065684 for ; Tue, 27 May 2008 22:30:29 +0000 (UTC) (envelope-from peter@wemm.org) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 59DC18FC19 for ; Tue, 27 May 2008 22:30:28 +0000 (UTC) (envelope-from peter@wemm.org) Received: by an-out-0708.google.com with SMTP id b33so642374ana.13 for ; Tue, 27 May 2008 15:30:28 -0700 (PDT) Received: by 10.100.166.9 with SMTP id o9mr2199323ane.120.1211927428233; Tue, 27 May 2008 15:30:28 -0700 (PDT) Received: by 10.100.8.6 with HTTP; Tue, 27 May 2008 15:30:28 -0700 (PDT) Message-ID: Date: Tue, 27 May 2008 15:30:28 -0700 From: "Peter Wemm" To: "Bruce M. Simpson" In-Reply-To: <483C2666.7010608@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080527062736.GF64397@hoeg.nl> <45633.1211870269@critter.freebsd.dk> <20080527064253.GG64397@hoeg.nl> <483C2666.7010608@FreeBSD.org> Cc: Ed Schouten , current@freebsd.org, arch@freebsd.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 22:30:30 -0000 On Tue, May 27, 2008 at 8:19 AM, Bruce M. Simpson wrote: > Ed Schouten wrote: >>>> >>>> With the word `should' I meant that it would still be possible to >>>> implement multiple line disciplines with the mpsafetty code. But I >>>> really think line disciplines should go. >>>> >>> >>> No, don't bother. Remove the entire "abstraction" of linedisciplines. >>> >> >> Your wish is my command. >> > > Like Julian and Robert said, please don't break Netgraph. > > It still needs to hook into tty at a very low level; and the components such > as Bluetooth which can use ttys for low level stream processing, are built > on Netgraph. > > Both SLIP and PPP can be built using Netgraph. > > Other than that, line disciplines can go away. I think line disciplines should go away as such. It would be nice to have a place to hook into (even linux has this), but the line discipline concept is 30 years stale. IMHO, priority #1 is give ttys the first class treatment they need, then priority #2 is to put in some low level hooks for ng_tty or whatever. It would be hard to come up with a more inconvenient interface than we have now. As an example.. look at the CAN_BYPASS_L_RINT stuff. If we had a way to pass a block of characters upstream instead of a single character at a time, then we could build this magic into the input routines instead of the device drivers. The bypass is still useful because it saves considerable cycles for raw tty modes, eg: userland ppp, zmodem upload/downloads etc etc. But the logic for it shouldn't have to be scattered all over the tree due to poor line discipline APIs. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell