From owner-freebsd-arch Tue Feb 27 22:34:47 2001 Delivered-To: freebsd-arch@freebsd.org Received: from wally.eecs.harvard.edu (wally.eecs.harvard.edu [140.247.60.30]) by hub.freebsd.org (Postfix) with ESMTP id EB67E37B719 for ; Tue, 27 Feb 2001 22:34:44 -0800 (PST) (envelope-from magoutis@eecs.harvard.edu) Received: (from magoutis@localhost) by wally.eecs.harvard.edu (8.10.0/8.10.0) id f1S6Ygq03513; Wed, 28 Feb 2001 01:34:42 -0500 (EST) Date: Wed, 28 Feb 2001 01:34:42 -0500 (EST) Message-Id: <200102280634.f1S6Ygq03513@wally.eecs.harvard.edu> From: Kostas Magoutis To: imp@harmony.village.org Cc: freebsd-arch@FreeBSD.ORG In-reply-to: <200102280555.f1S5twd14711@harmony.village.org> (message from Warner Losh on Tue, 27 Feb 2001 22:55:58 -0700) Subject: Re: Logical device instances References: <200102280048.f1S0m9n09106@wally.eecs.harvard.edu> <200102280555.f1S5twd14711@harmony.village.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The minor number is still pretty static, isn't it? I can multiplex a single physical device but I can't create dynamic instances of it, e.g., the files corresponding to the vnode/devnode of the device. Date: Tue, 27 Feb 2001 22:55:58 -0700 From: Warner Losh In message <200102280048.f1S0m9n09106@wally.eecs.harvard.edu> Kostas Magoutis writes: : I am writing a device driver for a user-level networking card. User : level code interacts with it via open, close, mmap, and ioctl. A Think minor numbers. Each instance is a different minor number. There's no way to know what "instance" was opened except by minor numbers. There's not a 1-1 correspondence between opens and closes even (think dup and/or not close on exec after a fork). If you have all of the "instances" share the same minor number, they are all the same device and are treated as such by the kernel. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message