From owner-freebsd-arch@FreeBSD.ORG Tue Sep 9 03:21:05 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 263A6264; Tue, 9 Sep 2014 03:21:05 +0000 (UTC) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E774C19F; Tue, 9 Sep 2014 03:21:04 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id fp1so2542326pdb.14 for ; Mon, 08 Sep 2014 20:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Q4LRA/mbPb5wq38G9yqEJdQXVzRCHxYQCjiF3GpnU/o=; b=L1gAFO/XIt6UsofwFe/Wn61uetYOBDgEZvvX70vb9hr5jG8pXtXffFWdvAQZ8eHptf KtB0zqWUmxvnPjQ2keIqB+ECBcakrh2Fk+HEmemWAqjvSxeg03dUlP8AWtkxpZffkKab WyRjQ/RdAxwTSfY5pcP4SpzA9yeJ+UkyN97DLeHJdPM7aMhlQzlBPXXEXetXxQ1HHw8H APfEar0n70NTDwUCQXHoEM4MdpVCPdzhcaiWU3BfyM4poXSb/NJacfEbnqgpxVmcnk6Y X7Ue3pL3CLSQfKYFXbr/K2FsVqtDy6LhJ6n6XsafZPlwS/d0sUgKowf1awivHPqGKs3D DC/A== X-Received: by 10.70.132.73 with SMTP id os9mr53607290pdb.63.1410232864364; Mon, 08 Sep 2014 20:21:04 -0700 (PDT) Received: from ox ([24.6.44.228]) by mx.google.com with ESMTPSA id yr3sm10815527pac.1.2014.09.08.20.21.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Sep 2014 20:21:03 -0700 (PDT) Sender: Navdeep Parhar Date: Mon, 8 Sep 2014 20:20:56 -0700 From: Navdeep Parhar To: =?iso-8859-1?Q?Jean-S=E9bastien_P=E9dron?= Subject: Re: Linux kernel API wrapper: using OFED's one in other drivers Message-ID: <20140909032056.GA3835@ox> Mail-Followup-To: =?iso-8859-1?Q?Jean-S=E9bastien_P=E9dron?= , Konstantin Belousov , freebsd-arch@FreeBSD.org References: <540D7D91.9000104@FreeBSD.org> <20140908103908.GZ2737@kib.kiev.ua> <540DBC64.7050302@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <540DBC64.7050302@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , freebsd-arch@FreeBSD.org 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 03:21:05 -0000 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. Regards, Navdeep