Linux kernel API wrapper: using OFED's one in other drivers
Hans Petter Selasky
hps at selasky.org
Tue Sep 9 05:43:28 UTC 2014
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
More information about the freebsd-arch
mailing list