From patchwork Thu Jun 29 11:47:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 9816507 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CD3AA6020A for ; Thu, 29 Jun 2017 11:48:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 428B827031 for ; Thu, 29 Jun 2017 11:47:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36F8D27F54; Thu, 29 Jun 2017 11:47:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD45927031 for ; Thu, 29 Jun 2017 11:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752347AbdF2Lrz (ORCPT ); Thu, 29 Jun 2017 07:47:55 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:60604 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752677AbdF2Lru (ORCPT ); Thu, 29 Jun 2017 07:47:50 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 29 Jun 2017 14:47:19 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v5TBlJq6017959; Thu, 29 Jun 2017 14:47:19 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id v5TBlJt5017961; Thu, 29 Jun 2017 14:47:19 +0300 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id v5TBlJel017960; Thu, 29 Jun 2017 14:47:19 +0300 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, yishaih@mellanox.com, maorg@mellanox.com, majd@mellanox.com Subject: [PATCH rdma-core 7/7] mlx4: Export mlx4 direct verbs interface Date: Thu, 29 Jun 2017 14:47:08 +0300 Message-Id: <1498736828-17875-8-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1498736828-17875-1-git-send-email-yishaih@mellanox.com> References: <1498736828-17875-1-git-send-email-yishaih@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Maor Gottlieb Install direct verbs header file into /usr/include/infiniband/ folder and allow possible users to explicitly include it into their applications. In addition, make the required packaging changes needed for both RedHat and Debian users to link with libmlx4 directly. Signed-off-by: Maor Gottlieb Reviewed-by: Yishai Hadas --- debian/ibverbs-providers.install | 1 + debian/ibverbs-providers.symbols | 4 ++++ debian/libibverbs-dev.install | 4 ++++ providers/mlx4/CMakeLists.txt | 7 ++++++- providers/mlx4/libmlx4.map | 7 +++++++ redhat/rdma-core.spec | 3 +++ 6 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 providers/mlx4/libmlx4.map diff --git a/debian/ibverbs-providers.install b/debian/ibverbs-providers.install index 1d234ba..1d693fe 100644 --- a/debian/ibverbs-providers.install +++ b/debian/ibverbs-providers.install @@ -3,6 +3,7 @@ etc/modprobe.d/truescale.conf usr/bin/rxe_cfg usr/lib/*/libibverbs/lib*-rdmav2.so usr/lib/*/libmlx5.so.* +usr/lib/*/libmlx4.so.* usr/lib/truescale-serdes.cmds usr/share/doc/rdma-core/rxe.md usr/share/doc/ibverbs-providers/ usr/share/man/man7/rxe.7 diff --git a/debian/ibverbs-providers.symbols b/debian/ibverbs-providers.symbols index ea63da8..d64e3ef 100644 --- a/debian/ibverbs-providers.symbols +++ b/debian/ibverbs-providers.symbols @@ -4,3 +4,7 @@ libmlx5.so.1 ibverbs-providers #MINVER# mlx5dv_init_obj@MLX5_1.0 13 mlx5dv_query_device@MLX5_1.0 13 mlx5dv_create_cq@MLX5_1.1 14 + +libmlx4.so.1 ibverbs-providers #MINVER# + MLX4_1.0@MLX4_1.0 15 + mlx4dv_init_obj@MLX4_1.0 15 diff --git a/debian/libibverbs-dev.install b/debian/libibverbs-dev.install index ed7a276..3773d00 100644 --- a/debian/libibverbs-dev.install +++ b/debian/libibverbs-dev.install @@ -1,14 +1,18 @@ usr/include/infiniband/arch.h usr/include/infiniband/kern-abi.h usr/include/infiniband/mlx5dv.h +usr/include/infiniband/mlx4dv.h usr/include/infiniband/opcode.h usr/include/infiniband/sa-kern-abi.h usr/include/infiniband/sa.h usr/include/infiniband/verbs.h usr/lib/*/libibverbs*.so usr/lib/*/libmlx5.so +usr/lib/*/libmlx4.so usr/share/man/man3/ibv_* usr/share/man/man3/mbps_to_ibv_rate.3 usr/share/man/man3/mlx5dv_*.3 +usr/share/man/man3/mlx4dv_*.3 usr/share/man/man3/mult_to_ibv_rate.3 usr/share/man/man7/mlx5dv.7 +usr/share/man/man7/mlx4dv.7 diff --git a/providers/mlx4/CMakeLists.txt b/providers/mlx4/CMakeLists.txt index d64d817..f6739d2 100644 --- a/providers/mlx4/CMakeLists.txt +++ b/providers/mlx4/CMakeLists.txt @@ -1,4 +1,5 @@ -rdma_provider(mlx4 +rdma_shared_provider(mlx4 libmlx4.map + 1 1.0.${PACKAGE_VERSION} buf.c cq.c dbrec.c @@ -7,3 +8,7 @@ rdma_provider(mlx4 srq.c verbs.c ) + +publish_headers(infiniband + mlx4dv.h +) diff --git a/providers/mlx4/libmlx4.map b/providers/mlx4/libmlx4.map new file mode 100644 index 0000000..0e53f83 --- /dev/null +++ b/providers/mlx4/libmlx4.map @@ -0,0 +1,7 @@ +/* Export symbols should be added below according to + Documentation/versioning.md document. */ +MLX4_1.0 { + global: + mlx4dv_init_obj; + local: *; +}; diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec index 1f5cd14..5cebc25 100644 --- a/redhat/rdma-core.spec +++ b/redhat/rdma-core.spec @@ -355,7 +355,9 @@ rm -rf %{buildroot}/%{_initrddir}/ %{_mandir}/man3/*_to_ibv_rate.* %{_mandir}/man7/rdma_cm.* %{_mandir}/man3/mlx5dv* +%{_mandir}/man3/mlx4dv* %{_mandir}/man7/mlx5dv* +%{_mandir}/man7/mlx4dv* %files -n libibverbs %dir %{_sysconfdir}/libibverbs.d @@ -363,6 +365,7 @@ rm -rf %{buildroot}/%{_initrddir}/ %{_libdir}/libibverbs*.so.* %{_libdir}/libibverbs/*.so %{_libdir}/libmlx5.so* +%{_libdir}/libmlx4.so* %config(noreplace) %{_sysconfdir}/libibverbs.d/*.driver %doc %{_docdir}/%{name}-%{version}/libibverbs.md %doc %{_docdir}/%{name}-%{version}/rxe.md