From owner-freebsd-hackers Tue Mar 27 8:24:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from et-gw.etinc.com (et-gw.etinc.com [207.252.1.2]) by hub.freebsd.org (Postfix) with ESMTP id 16D0837B71A; Tue, 27 Mar 2001 08:24:15 -0800 (PST) (envelope-from dennis@etinc.com) Received: from dbsys.etinc.com (dbsys.etinc.com [207.252.1.18]) by et-gw.etinc.com (8.9.3/8.9.3) with ESMTP id LAA17260; Tue, 27 Mar 2001 11:25:51 GMT (envelope-from dennis@etinc.com) Message-Id: <5.0.0.25.0.20010327113859.023faa00@mail.etinc.com> X-Sender: dennis@mail.etinc.com X-Mailer: QUALCOMM Windows Eudora Version 5.0 Date: Tue, 27 Mar 2001 11:41:36 -0500 To: Devin Butterfield , Alfred Perlstein , Coleman Kane From: Dennis Subject: Re: Porting a Linux driver to FreeBSD with ioctl return values Cc: Roger Hardiman , hackers@FreeBSD.ORG In-Reply-To: <01032701051000.83707@dbm.wireless.net> References: <20010326232431.Q9431@fw.wintelcom.net> <3ABF45B6.DF5A0B7F@cs.strath.ac.uk> <20010327015524.A863@cokane.yi.org> <20010326232431.Q9431@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 04:05 AM 03/27/2001, Devin Butterfield wrote: >On Monday 26 March 2001 11:24, Alfred Perlstein wrote: > > * Coleman Kane [010326 22:40] wrote: > > > Yeah, that's basically what I had to do in tdfx. You can take a look int > > > src/sys/dev/tdfx/tdfx_pci.c under tdfx_ioctl(...) to get an idea of what > > > needs to be done, if you need more info. Tdfx basically implements the > > > API from device_3dfx in Linux. > > > > Is there anyone we can PLEAD with to explain that to the linnux people > > that that's a broken way to implement ioctl()? Everything in LINUX is implemented in a broken way. Whats interesting is that they like it that way, and even try to justify it. skbufs are really neat. no chaining, so if you are doing encapsulations you get to reallocate the entire buffer and copy overs tons of "attached info". Very high performance. the biggest caveat with linux ioctls() is that there are only 10 commands available. So you are best off only using 1 and using sub-functions within your application, or you may run out. Dennis To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message