From owner-freebsd-arch@FreeBSD.ORG Tue Sep 9 05:43:28 2014 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFEE6EED; Tue, 9 Sep 2014 05:43:28 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 813EA129; Tue, 9 Sep 2014 05:43:28 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id CCE9A1FE027; Tue, 9 Sep 2014 07:43:25 +0200 (CEST) Message-ID: <540E9376.9000905@selasky.org> Date: Tue, 09 Sep 2014 07:43:18 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Jean-S=E9bastien_P=E9dron?= , Konstantin Belousov , freebsd-arch@FreeBSD.org Subject: Re: Linux kernel API wrapper: using OFED's one in other drivers References: <540D7D91.9000104@FreeBSD.org> <20140908103908.GZ2737@kib.kiev.ua> <540DBC64.7050302@FreeBSD.org> <20140909032056.GA3835@ox> In-Reply-To: <20140909032056.GA3835@ox> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 05:43:28 -0000 On 09/09/14 05:20, Navdeep Parhar wrote: > On Mon, Sep 08, 2014 at 04:25:40PM +0200, Jean-Sébastien Pédron wrote: >> On 08.09.2014 12:39, Konstantin Belousov wrote: >>> My main objections to use OFED wrappers for drm2 are: >>> >>> 1. It tightly binds different drivers with non-coordinating maintainers >>> to the version of the Linux KPI. The Linux drivers interface is not >>> known for its stability, and constant drift there in both formal >>> spelling of interfaces and in semantic requires to have all drivers >>> using the wrapper to be at the same upstream version. >>> >>> This objection is not specific to drm code, but so far we only speek >>> about infiniband and drm. >> >> A small note before going on: cxgb(4) and cxgbe(4) use OFED's wrapper too. > > Not so. You were correct in your original email where you said the > wrappers are used within sys/dev/cxgb and sys/dev/cxgbe. There is a > subtle difference. > > cxgbe(4) is the if_cxgbe module. It is a native FreeBSD driver and > there is no possibility that it will ever use anything from any Linux > shim layer that may be available on FreeBSD. > > iw_cxgbe, that lives within sys/dev/cxgbe too, is an iWARP driver that > relies on OFED and is forced to use the Linux shims because the FreeBSD > OFED port works that way (include any ofed header and it pulls in a lot > of Linux shim headers). A native FreeBSD OFED would have been much > nicer imho but that's water under the bridge. > Hi, I think if the linux layer had its own namespace in the kernel, like a function name prefix, it would be more acceptable, and that we could have a script to do the automatic renaming of functions. Still it would serve the function to make maintaining cross platform code in a more easy way. --HPS