Date: Sat, 21 Feb 2004 12:29:53 -0800 (PST) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/conf majors src/sys/dev/nmdm nmdm.c src/sys/dev/snp snp.c src/sys/kern kern_conf.c src/sys/net if_tap.c if_tapvar.h if_tun.c if_tunvar.h src/sys/sys conf.h Message-ID: <200402212029.i1LKTr8i090923@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
phk 2004/02/21 12:29:53 PST FreeBSD src repository Modified files: sys/conf majors sys/dev/nmdm nmdm.c sys/dev/snp snp.c sys/kern kern_conf.c sys/net if_tap.c if_tapvar.h if_tun.c sys/sys conf.h Removed files: sys/net if_tunvar.h Log: Device megapatch 2/6: This commit 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 is unfortunately a lot of non-POLA in the exact numeric value of this number, just live with it for now) Managing the unit number space this way removes the need to use rman(9) to do so in the drivers this greatly simplifies the code in the drivers because even using rman(9) they still needed to manage their dev_t's anyway. I have taken the if_tun, if_tap, snp 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 and snp 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 (ala pty) can you can clone either of them. Revision Changes Path 1.195 +0 -3 src/sys/conf/majors 1.18 +85 -84 src/sys/dev/nmdm/nmdm.c 1.83 +12 -18 src/sys/dev/snp/snp.c 1.142 +129 -8 src/sys/kern/kern_conf.c 1.34 +35 -129 src/sys/net/if_tap.c 1.5 +2 -1 src/sys/net/if_tapvar.h 1.132 +61 -100 src/sys/net/if_tun.c 1.11 +0 -55 src/sys/net/if_tunvar.h (dead) 1.180 +9 -0 src/sys/sys/conf.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402212029.i1LKTr8i090923>