From patchwork Sun Dec 31 02:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 123008 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6376419qgn; Sat, 30 Dec 2017 18:04:40 -0800 (PST) X-Google-Smtp-Source: ACJfBouMsl/rOCtCjveRdI+9f9iRc5jp1MsfVZwHAFm9SWW/zBqTcctu922mgz0Svde/o/ULeB4H X-Received: by 10.55.204.24 with SMTP id r24mr47067652qki.232.1514685880368; Sat, 30 Dec 2017 18:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514685880; cv=none; d=google.com; s=arc-20160816; b=myBL88toBvAmr72Q49ZxF5nxuXr0L88vbezuxxqCcjS1w1RiTZoVv5VSIkm7BQG7x9 V0atuioi17UxpkcOxZ36zvyjiVYXMWxYqTt7NSknFBZqd7cZwQIvHfMeWi/fGjan4MEO QSpdVY/jpFQJ1sn9jG14WsrxuaNoJpsBXkhhPskVgLGbaXNRUVFHTQ0aVbay2aOPPk3f B/uQp9ICj+xp0qeruxBZ8Fpn4uHcUFNRJq5MD8F6kgbjpjhLu/IAvswtpn1yLuqttrSV 5/284uxU609iS6OlyPYQW73AuFj5vxdfxyGP0XNV57u3D/YCzamVTQA+073zAvPvFVmr fZQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=gKSCKu7YutaKjK2V6Wj8HeEc2akMXc48psA7Kf+wNm4=; b=jynO+liCK8ZQjSXSdQy2bvhJsXZZJUQFBE5IqeTbtbkgjaEzQVnQPfvLoxhkpxNfHY UToZOw6Fu47Jg6D8fQcPopIWPdotf5lJdSEVv1jJVecj0nIeLU3jHfRzQnkiX6+H1DfA gsLmdJs9pCstp5rvRltG7vxJvD4msf6Chq087PW8UorJIn65reYbErhhN0gcxPasS1rk OLQpTuJ8Ov+hwSyN7YEuSWheJXC/P7JCL+gogAuc4Vtwyrd/VUrLI5lJ99z+2Q+iwpbR gDqKBhn4nwaBn3o0NLXel6csGJpoDcj8/pUOtVbfdX8qpOvwhQytQKY6u/nzQtkXdqJ+ OFlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id y201si2713903qkb.49.2017.12.30.18.04.40; Sat, 30 Dec 2017 18:04:40 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 122E1616E8; Sun, 31 Dec 2017 02:04:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B3A9261528; Sun, 31 Dec 2017 02:00:43 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id BFD3A61507; Sun, 31 Dec 2017 02:00:29 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 3CF6461507 for ; Sun, 31 Dec 2017 02:00:13 +0000 (UTC) Received: from mxback7o.mail.yandex.net (mxback7o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::21]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 027926A846D0 for ; Sun, 31 Dec 2017 05:00:12 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback7o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Jp3bwTKwu4-0B4ugPC6; Sun, 31 Dec 2017 05:00:11 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3mkgwT21aC-0BPev2I1; Sun, 31 Dec 2017 05:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 31 Dec 2017 05:00:05 +0300 Message-Id: <1514685607-28718-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514685607-28718-1-git-send-email-odpbot@yandex.ru> References: <1514685607-28718-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 377 Subject: [lng-odp] [PATCH v1 6/8] linux-gen: dpdk: simplify linking with shared libdpdk X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov There is no need to pass PMDs when linking with shared DPDK library. Just pass -ldpdk which will pick up all PMDS dynamically. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 377 (lumag:misc-fixes) ** https://github.com/Linaro/odp/pull/377 ** Patch: https://github.com/Linaro/odp/pull/377.patch ** Base sha: 49ebafae0edebbc750742d8874ad0a7588286dea ** Merge commit sha: 0de89276a60782272cef8b93fc3dcb647cfc52fb **/ platform/linux-generic/m4/odp_dpdk.m4 | 37 ++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4 index 471bbcd51..2b31c58ab 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -13,16 +13,29 @@ AC_ARG_WITH([dpdk-path], [DPDK_PATH="$withval" pktio_dpdk_support=yes],[]) -AS_IF([test "x$DPDK_PATH" = "xsystem"], - [DPDK_CPPFLAGS="-isystem/usr/include/dpdk" - DPDK_LDFLAGS="" - DPDK_PMD_PATH="`$CC --print-file-name=librte_pmd_null.a`" - DPDK_PMD_PATH="`dirname "$DPDK_PMD_PATH"`" - AS_IF([test "x$DPDK_PMD_PATH" = "x"], - [AC_MSG_FAILURE([Could not locate system DPDK PMD directory])])], - [DPDK_CPPFLAGS="-isystem $DPDK_PATH/include" - DPDK_LDFLAGS="-L$DPDK_PATH/lib" - DPDK_PMD_PATH="$DPDK_PATH/lib"]) +if test "x$DPDK_PATH" = "xsystem"; then + DPDK_CPPFLAGS="-isystem/usr/include/dpdk" + DPDK_LDFLAGS="" + DPDK_RPATH="" + DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.so`" + if test "x$DPDK_LIB_PATH" = "x" ; then + DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.a`" + else + DPDK_SHARED=yes + fi + AS_IF([test "x$DPDK_LIB_PATH" = "x"], + [AC_MSG_FAILURE([Could not locate system DPDK library directory])]) + DPDK_PMD_PATH=`AS_DIRNAME(["$DPDK_PMD_PATH"])` +else + DPDK_CPPFLAGS="-isystem $DPDK_PATH/include" + DPDK_LIB_PATH="$DPDK_PATH/lib" + DPDK_LDFLAGS="-L$DPDK_LIB_PATH" + DPDK_RPATH="-R$DPDK_LIB_PATH" + DPDK_PMD_PATH="$DPDK_LIB_PATH" + if test -r "$DPDK_LIB_PATH"/libdpdk.so ; then + DPDK_SHARED=yes + fi +fi ########################################################################## # Enable zero-copy DPDK pktio @@ -45,7 +58,9 @@ then ODP_DPDK_CHECK([$DPDK_CPPFLAGS], [$DPDK_LDFLAGS], [], [AC_MSG_FAILURE([can't find DPDK])]) - ODP_DPDK_PMDS([$DPDK_PMD_PATH]) + if test x$DPDK_SHARED != xyes ; then + ODP_DPDK_PMDS([$DPDK_PMD_PATH]) + fi AC_DEFINE([ODP_PKTIO_DPDK], [1], [Define to 1 to enable DPDK packet I/O support])