From owner-freebsd-current@FreeBSD.ORG Sat Feb 7 23:58:51 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2891916A4CE for ; Sat, 7 Feb 2004 23:58:51 -0800 (PST) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EF1A43D2F for ; Sat, 7 Feb 2004 23:58:51 -0800 (PST) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc12) with ESMTP id <2004020807585001400hk5ube>; Sun, 8 Feb 2004 07:58:50 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA50422; Sat, 7 Feb 2004 23:58:49 -0800 (PST) Date: Sat, 7 Feb 2004 23:58:47 -0800 (PST) From: Julian Elischer To: Poul-Henning Kamp In-Reply-To: <4310.1076103524@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: Review/Test: Pseudo-device unit number management patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2004 07:58:51 -0000 On Fri, 6 Feb 2004, Poul-Henning Kamp wrote: > > http://phk.freebsd.dk/patch/pseudo.patch > > This patch adds a couple of functions for pseudodrivers to use for > implementing cloning in a manner we will be able to lock down > (shortly). > > Basically what happens is that pseudo drivers get a way to ask for > "give me the dev_t with this unit number" or alternatively "give > me a dev_t with the lowest guaranteed free unit number" (there are > a lot of non-POLA in the value of this number, just live with it > for now!) > > Managing the unit number space this way removes the need to use > rman(9) and greatly simplifies the code in the drivers because > even using rman(9) they still needed to manage their dev_t's too. > > I have taken the if_tun, if_tap and nmdm drivers through the mill, > partly because they (ab)used makedev(), but mostly because together > they represent three different problems for device-cloning: > > if_tun is the plain case: just give me a device. > if_tap has two kinds of devices, with a flag for device type. > nmdm has paired devices (a'la pty). > > I would appreciate if people would test these devices work _as > previously_ with this patch in place. well that depends on your definition of "as previously" Previously, nmdm started off with 4 devices visible in /dev now I don't see that.. The old behaviour was intuitive... You saw a device. You openned it and used it, and as you used them extra ones would appear so that there were always a few free. You could select the port to use in a pulldown browser. Now you have to open an invisible device you can't see.. doesn't seem so intuitive right now.. > > If nothing crops up, I plan to commit this patch in two weeks time. > > Poul-Henning > > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >