From patchwork Thu Feb 7 06:52:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1037851 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43w8Dc0jXpz9s4V for ; Thu, 7 Feb 2019 17:54:07 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id DF90AB1FF; Thu, 7 Feb 2019 06:52:56 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 39B9CB11F for ; Thu, 7 Feb 2019 06:52:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 0A84C13A for ; Thu, 7 Feb 2019 06:52:51 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@mellanox.com) with ESMTPS (AES256-SHA encrypted); 7 Feb 2019 08:52:46 +0200 Received: from l-dev-uefi14.mtl.labs.mlnx. (l-dev-uefi14.mtl.labs.mlnx [10.134.80.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x176qgka027119; Thu, 7 Feb 2019 08:52:46 +0200 From: Eli Britstein To: Simon Horman Date: Thu, 7 Feb 2019 08:52:29 +0200 Message-Id: <20190207065230.31962-3-elibr@mellanox.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20190207065230.31962-1-elibr@mellanox.com> References: <20190207065230.31962-1-elibr@mellanox.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: dev@openvswitch.org, Shahaf Shuler , Eli Britstein Subject: [ovs-dev] [PATCH V3 2/3] acinclude: Include libverbs and libmlx4 when needed X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org DPDK 18.11 uses libverbs and libmlx4 when MLX4 PMD is enabled. This commit makes OVS to link to libverbs and libmlx4 when MLX4 PMD is enabled on DPDK. Signed-off-by: Eli Britstein Reviewed-by: Asaf Penso --- acinclude.m4 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index e47ae8b91..ec0c235cc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -312,12 +312,27 @@ AC_DEFUN([OVS_CHECK_DPDK], [ [AC_SEARCH_LIBS([mlx5dv_create_wq],[mlx5],[],[AC_MSG_ERROR([unable to find libmlx5, install the dependency package])]) DPDK_EXTRA_LIB="-lmlx5"]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [ + #include +#if defined(RTE_LIBRTE_MLX4_PMD) && !defined(RTE_LIBRTE_MLX4_DLOPEN_DEPS) +#error +#endif + ], []) + ], [], + [AC_SEARCH_LIBS([mlx4dv_init_obj],[mlx4],[],[AC_MSG_ERROR([unable to find libmlx4, install the dependency package])]) + DPDK_EXTRA_LIB="-lmlx4"]) + AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [ #include #if defined(RTE_LIBRTE_MLX5_PMD) && !defined(RTE_LIBRTE_MLX5_DLOPEN_DEPS) #error +#endif +#if defined(RTE_LIBRTE_MLX4_PMD) && !defined(RTE_LIBRTE_MLX4_DLOPEN_DEPS) +#error #endif ], []) ], [],