Date: Tue, 09 Sep 2014 07:43:18 +0200 From: Hans Petter Selasky <hps@selasky.org> To: =?ISO-8859-1?Q?Jean-S=E9bastien_P=E9dron?= <dumbbell@FreeBSD.org>, Konstantin Belousov <kostikbel@gmail.com>, freebsd-arch@FreeBSD.org Subject: Re: Linux kernel API wrapper: using OFED's one in other drivers Message-ID: <540E9376.9000905@selasky.org> In-Reply-To: <20140909032056.GA3835@ox> References: <540D7D91.9000104@FreeBSD.org> <20140908103908.GZ2737@kib.kiev.ua> <540DBC64.7050302@FreeBSD.org> <20140909032056.GA3835@ox>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?540E9376.9000905>