From owner-freebsd-arch@FreeBSD.ORG Mon Jan 3 23:45:19 2011 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 A232C106564A for ; Mon, 3 Jan 2011 23:45:19 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 61A288FC12 for ; Mon, 3 Jan 2011 23:45:19 +0000 (UTC) Received: by vws9 with SMTP id 9so5835696vws.13 for ; Mon, 03 Jan 2011 15:45:18 -0800 (PST) Received: by 10.220.184.66 with SMTP id cj2mr6093108vcb.140.1294098317962; Mon, 03 Jan 2011 15:45:17 -0800 (PST) Received: from [10.0.1.198] ([72.253.42.56]) by mx.google.com with ESMTPS id p8sm4371070vcr.42.2011.01.03.15.45.15 (version=SSLv3 cipher=RC4-MD5); Mon, 03 Jan 2011 15:45:16 -0800 (PST) Date: Mon, 3 Jan 2011 13:47:57 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Poul-Henning Kamp In-Reply-To: <82826.1294088199@critter.freebsd.dk> Message-ID: References: <82826.1294088199@critter.freebsd.dk> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org Subject: Re: Linux kernel compatability 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: Mon, 03 Jan 2011 23:45:19 -0000 On Mon, 3 Jan 2011, Poul-Henning Kamp wrote: > In message , Jeff Roberson writes: > >> I have seen that some attempt at similar wrappers has been made elsewhere. >> I wonder if instead of making each one tailored to individual components, >> which mostly seem to be filesystems so far, should we put this in a >> central place under compat somewhere? > > My inflation devalued $0.02: > > We should face our NIH syndrome and for those differences between > Linux and FreeBSD KPI which are purely a naming or trivial argument > difference, try to reduce the differences. Unfortunately it would create quite a lot of code churn as there are relatively few that are minorly different. You can page through the wrapper code if you're interested. http://svn.freebsd.org/viewvc/base/projects/ofed/head/sys/ofed/include/linux/ > > Those where there are substantial differences, we should only have > one compat layer, not one for each driver. I would like this to be the case. So we can converge on something complete. There are of course big differences between minor linux kernel revisions and that poses problems. However those should be easier than the bsd/linux differences. I think my proposal is to move these files to a more generic location so they are more visible and available to other projects. Maintainers of individual kernel ports would have to decide if they want to use what is there. The other important question is are there really many other places that this would be useful? One example I can think of is network device drivers. If you look at the ipoib port, for example, it's basically linux code + mbufs. It does allow rapid porting if you don't mind having a weird hybrid result. The reason I did it for ipoib was to permit taking in bug fixes and changes from linux. Luigi also did something for usb which I did not bring in. I felt some of his wrapper code was GPL polluted. Thanks, Jeff > > > -- > 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. >