From patchwork Fri Jun 2 13:59:59 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: 101265 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp411151qge; Fri, 2 Jun 2017 07:01:49 -0700 (PDT) X-Received: by 10.237.53.102 with SMTP id b35mr3965626qte.83.1496412108930; Fri, 02 Jun 2017 07:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412108; cv=none; d=google.com; s=arc-20160816; b=WlEJPOJ/s8BvxGoATBMhLzk1yWXotrTr0TADOmtrh1fWSVbt+WCqVcAsXR3MbwrxXx H7di28W5sckTPk9CfGTVkoSbqMXzW5UN9jKng4LkTfxReByeOUaI+mlyP1aDx7SGAX3M CECCFxYa34jcDmOztV/osBOrhPRFKNnL64CYJNEqclZAhupup+0b8Uz60c/Y3LIYAGAu T5CG4UmBIFe5rI+19ACgMbgcw27dwcZg7RzZ+/SEa+9+sC5w86lQdeGXxEjHSiLtkmwU q6316EVuq6k3MIkclrsFrz/UkdJj1Wtb0yRAzBcOuHoG7h1DoULfrszs5oaaZmayGL+R MPGA== 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=P/0dNEcH09xZDrESafCdBmO5uhKU31f8wrFUmnG1PZY=; b=Q3TGnBSPk9SBnzdXepzX+lSlxJbgVm9EKWUMfcs4Skt55qZeLnXJ5p1TeueznEi00t kV7xLIer7d1Fu0wGG7BdKe4Ry5BrXikh+0QeV3ga1ap5ct+xE+P4YgGc2pc1gezH6WQA vE7TdGgRk/B+VcWtC2bLLuCvN/Y5l7HEwPQIskwHb6pkrq2DbauA71gHJ+jRWpz5CtYY ZYXkxV7/9sjDnRx9gOthCw4jLE50nsJc28LeOA7lIv23FfQe9F9KRJoR0R/TbL+kQZqh RuevUS0jf/bN1SWzDHKDYaYRdgtuMJp10NUcJmZdCx3UMdk+WhLvOaMJ9vHLBjZSGYth 7Hxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m3si22979545qkd.257.2017.06.02.07.01.48; Fri, 02 Jun 2017 07:01:48 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 9892D60EF5; Fri, 2 Jun 2017 14:01:48 +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,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 6D451606A6; Fri, 2 Jun 2017 14:01:10 +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 29D16608E9; Fri, 2 Jun 2017 14:00:59 +0000 (UTC) Received: from forward4p.cmail.yandex.net (forward4p.cmail.yandex.net [77.88.31.19]) by lists.linaro.org (Postfix) with ESMTPS id 1964060E2A for ; Fri, 2 Jun 2017 14:00:14 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::26]) by forward4p.cmail.yandex.net (Yandex) with ESMTP id D215D20684 for ; Fri, 2 Jun 2017 17:00:11 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id A6E7B5080D8C for ; Fri, 2 Jun 2017 17:00:10 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0Aoe5BJ5; Fri, 02 Jun 2017 17:00:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 16:59:59 +0300 Message-Id: <1496412007-23455-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 1/9] pkgconfig: provide minimal proper static linking flags 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 Provide Libs.private for static linking with ODP in minimal case (no DPDK, no netmap). Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ pkgconfig/libodp-linux.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgconfig/libodp-linux.pc.in b/pkgconfig/libodp-linux.pc.in index 0769b214..bf339fe8 100644 --- a/pkgconfig/libodp-linux.pc.in +++ b/pkgconfig/libodp-linux.pc.in @@ -7,5 +7,5 @@ Name: libodp-linux Description: The ODP packet processing engine Version: @PKGCONFIG_VERSION@ Libs: -L${libdir} -lodp-linux -Libs.private: +Libs.private: -lcrypto -ldl -lpcap @PTHREAD_LIBS@ -lrt -lpthread Cflags: -I${includedir} From patchwork Fri Jun 2 14:00:00 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: 101266 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp411593qge; Fri, 2 Jun 2017 07:02:22 -0700 (PDT) X-Received: by 10.237.34.58 with SMTP id n55mr8456047qtc.117.1496412142317; Fri, 02 Jun 2017 07:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412142; cv=none; d=google.com; s=arc-20160816; b=C24fe77iEI2uGm4VGTo0t/2+fJPuvpYv5601LXJfAcin9ty5c/c7mxWguMZ1kPzcrV rDuHKI297RRERHXkmaLuI8phjOyVa8gd3RLic8Im6fy3O1QaDhCmvWmCllEpyPGmImIj BVlq8bP/1RJJHIGISlj0hdnVefMu77QcJud0QXYa+ZrVG3ZtOFyO2o0fKtFm0pTXc09C a3G3v3mKTyrn28UYlrsBcB9flgBN3aBd9vzM4X2TQzhUU7W91KGD2tQHFLP60W9kZCxH zu7VjQc+kvvw3Rpfv9MifKnWq6A6rb94iBiz/b5v1LhxQCC3kgaMyrJKAOgpRIcjKgnq QfOw== 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=+Nv6EZAw8Xms+f1Ab0I8cb5054AAv/crOH2wao5yIl4=; b=jpTbvxBA0BqPcl9rxJFVRalIzRPqCR/d5Jf5YJDeTP/TU1Q9TYBk1M+ZHqYWXO9j34 jk8ml0LxbY1xDAaDm8xAWM9AvvLgWIfDFTyxG0tfMADn7kEUUJFYwa8OPiW5tmGhQRqh aYEeWViGIP+GT9I9wci/Ini3c+uWuRFCmnNTpotGteE0g9w3K384MWNOU5oTS5tuLOo2 IopMKHQCTFmucoHdqfkSyP14L3EZevdJpUprOZ6euuCJ0ayq6CK0Q+27J14H3hseds+m Jf65fc+7f39kUrukzIbwkYG6U+2+EByJO34rrMQATwwGnyb3UwBnqBVOuWllmXQ0Pyda 4wdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g20si1780342qta.45.2017.06.02.07.02.22; Fri, 02 Jun 2017 07:02:22 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 078D860F0A; Fri, 2 Jun 2017 14:02:22 +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=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 BA2D360889; Fri, 2 Jun 2017 14:01:13 +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 C4C2F60682; Fri, 2 Jun 2017 14:01:01 +0000 (UTC) Received: from forward3h.cmail.yandex.net (forward3h.cmail.yandex.net [87.250.230.18]) by lists.linaro.org (Postfix) with ESMTPS id 71E0B60E2C for ; Fri, 2 Jun 2017 14:00:15 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::26]) by forward3h.cmail.yandex.net (Yandex) with ESMTP id DB53220F93 for ; Fri, 2 Jun 2017 17:00:13 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id 250615080F5D for ; Fri, 2 Jun 2017 17:00:12 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0Boe2BSH; Fri, 02 Jun 2017 17:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 17:00:00 +0300 Message-Id: <1496412007-23455-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 2/9] linux-gen: stop poisoning CPPFLAGS/LDFLAGS with OpenSSL flags 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 Instead of poisoning global AM_CPPFLAGS/AM_LDFLAGS with OpenSSL flags, use fine-grained controls for compiling/linking with OpenSSL. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ pkgconfig/libodp-linux.pc.in | 2 +- platform/linux-generic/Makefile.am | 4 ++++ platform/linux-generic/m4/odp_openssl.m4 | 17 +++++++++++------ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgconfig/libodp-linux.pc.in b/pkgconfig/libodp-linux.pc.in index bf339fe8..ba36bafa 100644 --- a/pkgconfig/libodp-linux.pc.in +++ b/pkgconfig/libodp-linux.pc.in @@ -7,5 +7,5 @@ Name: libodp-linux Description: The ODP packet processing engine Version: @PKGCONFIG_VERSION@ Libs: -L${libdir} -lodp-linux -Libs.private: -lcrypto -ldl -lpcap @PTHREAD_LIBS@ -lrt -lpthread +Libs.private: @OPENSSL_STATIC_LIBS@ -lpcap @PTHREAD_LIBS@ -lrt -lpthread Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 69fdf8b9..0eb31c04 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -11,6 +11,8 @@ AM_CFLAGS += -I$(top_builddir)/include AM_CFLAGS += -Iinclude AM_CFLAGS += -D_ODP_PKTIO_IPC +AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) + include_HEADERS = \ $(top_srcdir)/include/odp.h \ $(top_srcdir)/include/odp_api.h @@ -219,6 +221,8 @@ __LIB__libodp_linux_la_SOURCES = \ arch/@ARCH_DIR@/odp_cpu_arch.c \ arch/@ARCH_DIR@/odp_sysinfo_parse.c +__LIB__libodp_linux_la_LIBADD = $(OPENSSL_LIBS) + if HAVE_PCAP __LIB__libodp_linux_la_SOURCES += pktio/pcap.c endif diff --git a/platform/linux-generic/m4/odp_openssl.m4 b/platform/linux-generic/m4/odp_openssl.m4 index 2344914b..1d520077 100644 --- a/platform/linux-generic/m4/odp_openssl.m4 +++ b/platform/linux-generic/m4/odp_openssl.m4 @@ -5,8 +5,8 @@ AC_ARG_WITH([openssl-path], AC_HELP_STRING([--with-openssl-path=DIR path to openssl libs and headers], [(or in the default path if not specified).]), [OPENSSL_PATH=$withval - AM_CPPFLAGS="$AM_CPPFLAGS -I$OPENSSL_PATH/include" - AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib" + OPENSSL_CPPFLAGS="-I$OPENSSL_PATH/include" + OPENSSL_LIBS="-L$OPENSSL_PATH/lib" ],[]) ########################################################################## @@ -14,19 +14,24 @@ AC_HELP_STRING([--with-openssl-path=DIR path to openssl libs and headers], ########################################################################## OLD_LDFLAGS=$LDFLAGS OLD_CPPFLAGS=$CPPFLAGS -LDFLAGS="$AM_LDFLAGS $LDFLAGS" -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" +LIBS="$OPENSSL_LIBS $LIBS" +CPPFLAGS="$OPENSSL_CPPFLAGS $CPPFLAGS" ########################################################################## # Check for OpenSSL availability ########################################################################## -AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], +AC_CHECK_LIB([crypto], [EVP_EncryptInit], [OPENSSL_LIBS="$OPENSSL_LIBS -lcrypto" + OPENSSL_STATIC_LIBS="$OPENSSL_LIBS -ldl"], [AC_MSG_FAILURE([OpenSSL libraries required])]) AC_CHECK_HEADERS([openssl/des.h openssl/rand.h openssl/hmac.h openssl/evp.h], [], [AC_MSG_ERROR([OpenSSL headers required])]) +AC_SUBST([OPENSSL_CPPFLAGS]) +AC_SUBST([OPENSSL_LIBS]) +AC_SUBST([OPENSSL_STATIC_LIBS]) + ########################################################################## # Restore old saved variables ########################################################################## -LDFLAGS=$OLD_LDFLAGS +LIBS=$OLD_LIBS CPPFLAGS=$OLD_CPPFLAGS From patchwork Fri Jun 2 14:00:01 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: 101271 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp414167qge; Fri, 2 Jun 2017 07:06:36 -0700 (PDT) X-Received: by 10.200.35.230 with SMTP id r35mr8818884qtr.167.1496412396153; Fri, 02 Jun 2017 07:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412396; cv=none; d=google.com; s=arc-20160816; b=h24QBAGbm+c3lDAc1KsGgIMeN9lHFDYPqJDP2owILS5dca3hGbH4dxX7bZQeoih3LO zURn3PR+VXZu+N/ZTmws8vVvicNK8BY+osRJZhISHvxhJzvXGw22/zOy16ekwKImpySM z8NF2uWT+uZnqfURxUcols9NvgBPzNMD6aJoMo16J4wdH4L5jCCunNHI8/x32vkMGvyn s4QfvUUEpxw7Zw18S0Lo4igicRbsE54bbt0mVKjFinrmzIu4v5UC5z22TSDiy0TGAgJG SXx/uJh7uBNj9gFyI1bV6LWAot9Io1BZYaHX4ci9icSSqRckJ46BERslHcZPJaplXSKv W31Q== 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=4Npa1R/KcGuAMgA7NbUd+/Npci520s/HcVZGJb/N+7w=; b=KTVkUm3yKogaSLjYyJT0Tp8CRWlQyUoLyX1l0u1G9DF0EL/MfJ1yIvoUnWzho5kU3D 2qOR07yneHh4Ozh5Sejet/COmoO+4wMQ53gIs2uAD0XRokKO+F9sEMJau5laTTwI3rTH yqvBw6sl9OEg4/QXAHIsSCM1v7SKILEp1CyyM5JdvXVqpdP0pbd0yeMlE3czBgIfxJVV ziQhASkb4NCZ1NOygyjzztJIDlYSO9WsaiEvQOjr1811UaFMJzY9mZg61G8/dRWDcY6y JRDc1/GE4jN8wxFpqSi0gLbDb/PVPkaPgi65U1AyYubuXX79MZtdrGFvpI5FDyHBNFMn V5Xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b18si1898809qte.118.2017.06.02.07.06.35; Fri, 02 Jun 2017 07:06:36 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 CCD0F6068E; Fri, 2 Jun 2017 14:06:35 +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=-0.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 5C1C260EE7; Fri, 2 Jun 2017 14:01:40 +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 793D66067C; Fri, 2 Jun 2017 14:01:07 +0000 (UTC) Received: from forward4p.cmail.yandex.net (forward4p.cmail.yandex.net [77.88.31.19]) by lists.linaro.org (Postfix) with ESMTPS id 65D7F60E39 for ; Fri, 2 Jun 2017 14:00:18 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::26]) by forward4p.cmail.yandex.net (Yandex) with ESMTP id 5441220684 for ; Fri, 2 Jun 2017 17:00:17 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id 77D0B5081194 for ; Fri, 2 Jun 2017 17:00:13 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0DoiKMOJ; Fri, 02 Jun 2017 17:00:13 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 17:00:01 +0300 Message-Id: <1496412007-23455-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 3/9] linux-gen: stop poisoning CPPFLAGS/LDFLAGS with DPDK flags 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 Instead of poisoning global AM_CPPFLAGS/AM_LDFLAGS with DPDK flags, use fine-grained controls for compiling/linking with DPDK. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ configure.ac | 1 - pkgconfig/libodp-linux.pc.in | 4 ++-- platform/linux-generic/Makefile.am | 2 ++ platform/linux-generic/m4/odp_dpdk.m4 | 29 +++++++++++++++------------- test/common_plat/validation/api/Makefile.inc | 1 + test/linux-generic/Makefile.inc | 2 +- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 7569ebe0..437a978e 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,6 @@ AC_SUBST([testdir]) # Set conditionals as computed within platform specific files ########################################################################## AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) -AM_CONDITIONAL([PKTIO_DPDK], [test x$pktio_dpdk_support = xyes ]) AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes]) AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) diff --git a/pkgconfig/libodp-linux.pc.in b/pkgconfig/libodp-linux.pc.in index ba36bafa..5b6e9c28 100644 --- a/pkgconfig/libodp-linux.pc.in +++ b/pkgconfig/libodp-linux.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: libodp-linux Description: The ODP packet processing engine Version: @PKGCONFIG_VERSION@ -Libs: -L${libdir} -lodp-linux -Libs.private: @OPENSSL_STATIC_LIBS@ -lpcap @PTHREAD_LIBS@ -lrt -lpthread +Libs: -L${libdir} -lodp-linux @DPDK_LIBS@ +Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ -lpcap @PTHREAD_LIBS@ -lrt -lpthread Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 0eb31c04..7f2e341d 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -12,6 +12,7 @@ AM_CFLAGS += -Iinclude AM_CFLAGS += -D_ODP_PKTIO_IPC AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) +AM_CPPFLAGS += $(DPDK_CPPFLAGS) include_HEADERS = \ $(top_srcdir)/include/odp.h \ @@ -222,6 +223,7 @@ __LIB__libodp_linux_la_SOURCES = \ arch/@ARCH_DIR@/odp_sysinfo_parse.c __LIB__libodp_linux_la_LIBADD = $(OPENSSL_LIBS) +__LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS) if HAVE_PCAP __LIB__libodp_linux_la_SOURCES += pktio/pcap.c diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4 index 58d14727..1995e0fe 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -4,15 +4,15 @@ pktio_dpdk_support=no AC_ARG_WITH([dpdk-path], AC_HELP_STRING([--with-dpdk-path=DIR path to dpdk build directory]), - [DPDK_PATH=$withval - AM_CPPFLAGS="$AM_CPPFLAGS -msse4.2 -isystem $DPDK_PATH/include" + [DPDK_PATH="$withval" + DPDK_CPPFLAGS="-msse4.2 -isystem $DPDK_PATH/include" pktio_dpdk_support=yes],[]) ########################################################################## # Save and set temporary compilation flags ########################################################################## -OLD_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" +OLD_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$DPDK_CPPFLAGS $CPPFLAGS" ########################################################################## # Check for DPDK availability @@ -25,22 +25,23 @@ then AC_CHECK_HEADERS([rte_config.h], [], [AC_MSG_FAILURE(["can't find DPDK header"])]) - DPDK_PMD=--whole-archive, - for filename in $with_dpdk_path/lib/*.a; do - cur_driver=`echo $(basename "$filename" .a) | \ - sed -n 's/^\(librte_pmd_\)/-lrte_pmd_/p' | sed -n 's/$/,/p'` + AS_VAR_SET([DPDK_PMDS], [-Wl,--whole-archive,]) + for filename in "$DPDK_PATH"/lib/librte_pmd_*.a; do + cur_driver=`basename "$filename" .a | sed -e 's/^lib//'` # rte_pmd_nfp has external dependencies which break linking - if test "$cur_driver" = "-lrte_pmd_nfp,"; then + if test "$cur_driver" = "rte_pmd_nfp"; then echo "skip linking rte_pmd_nfp" else - DPDK_PMD+=$cur_driver + AS_VAR_APPEND([DPDK_PMDS], [-l$cur_driver,]) fi done - DPDK_PMD+=--no-whole-archive + AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) ODP_CFLAGS="$ODP_CFLAGS -DODP_PKTIO_DPDK" - AM_LDFLAGS="$AM_LDFLAGS -L$DPDK_PATH/lib -Wl,$DPDK_PMD" - LIBS="$LIBS -ldpdk -ldl -lpcap" + DPDK_LIBS="-L$DPDK_PATH/lib -ldpdk -lpthread -ldl -lpcap" + AC_SUBST([DPDK_CPPFLAGS]) + AC_SUBST([DPDK_LIBS]) + AC_SUBST([DPDK_PMDS]) else pktio_dpdk_support=no fi @@ -49,3 +50,5 @@ fi # Restore old saved variables ########################################################################## CPPFLAGS=$OLD_CPPFLAGS + +AM_CONDITIONAL([PKTIO_DPDK], [test x$pktio_dpdk_support = xyes ]) diff --git a/test/common_plat/validation/api/Makefile.inc b/test/common_plat/validation/api/Makefile.inc index dda18adc..6069ee6b 100644 --- a/test/common_plat/validation/api/Makefile.inc +++ b/test/common_plat/validation/api/Makefile.inc @@ -9,6 +9,7 @@ AUTOMAKE_OPTIONS = nostdinc AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common AM_LDFLAGS += -static +AM_LDFLAGS += $(DPDK_PMDS) LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la diff --git a/test/linux-generic/Makefile.inc b/test/linux-generic/Makefile.inc index 198087f3..6e165d8d 100644 --- a/test/linux-generic/Makefile.inc +++ b/test/linux-generic/Makefile.inc @@ -6,7 +6,7 @@ AM_LDFLAGS += -static LIBCUNIT_COMMON = $(top_builddir)/test/common_plat/common/libcunit_common.la LIB = $(top_builddir)/lib -LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la +LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS) INCCUNIT_COMMON = -I$(top_srcdir)/test/common_plat/common INCODP = \ From patchwork Fri Jun 2 14:00:02 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: 101270 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp413669qge; Fri, 2 Jun 2017 07:05:45 -0700 (PDT) X-Received: by 10.55.192.157 with SMTP id v29mr8650541qkv.240.1496412344863; Fri, 02 Jun 2017 07:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412344; cv=none; d=google.com; s=arc-20160816; b=gQ3kEQw+ZiiOU28ycRV3WkcIohcPofJFunV+KocCW3LNzcQPBjhWdec25voyjkJR8G ms+j/DJbZJEqwZGQEDSAU5Trkz6owmHg7SnZrYbkvSRpa3U37ChzJDPM7Pibyi460rmY l8gpe3qcmmZa8fy6MCADcxYcyIwTB87qYe6VO6C25Nh3wM8oRSGaRyD7IitY/BQ6Pg5O fCPvlPT/ehhXgECRRfniBNTW2ZTyOIy4cGXPZZzCltvbzfNwEU5Ng2Fm931uGa5h5ara edAVsJGcx8xAPv8SJWhkR0yVr4gphYygSels60Gt1/kI36H3YhJN+fnDq/nmH/3my9eE KcqA== 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=I6LCYW6N8jESz8sDyOfxRp0/dKoCHK4xJV/IA41XIYo=; b=D5pPfJXSUu45bnpr44SOGI9oKD9yURFuVf6DhLc7eGLTZ7VwwRTwHswAmZHaSRCmX5 ptk8KU2ysKUNz1DJ/KY54ym2NIIY8KjJ2BsfvRQSMNYEC5aXpGb+unWp36BCpJfV6M8C /9lX+lBDSmwd0BoPgq+uVdqelzy6RXSlvC8jbj1h5LPUoRbYJq10Gs4JjwxbWlM38XnB 7NeBwbszkaEAsfzpT1ElLTe7qt/fJy7cFagFF/y0vZNJ6d70POn5x8gGOqHwNGTbLIfT ayc3Aqz6jP8x8IzoCCd7/eHt9HjXNx75dmCbIhcJcalNEaGD/Yu22jK9cmU0v7e2QVEZ 1nww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q54si22795845qte.159.2017.06.02.07.05.44; Fri, 02 Jun 2017 07:05:44 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 70BD160EC0; Fri, 2 Jun 2017 14:05:44 +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=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 F15FF60E2C; Fri, 2 Jun 2017 14:01:31 +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 1C8D96067C; Fri, 2 Jun 2017 14:01:07 +0000 (UTC) Received: from forward5j.cmail.yandex.net (forward5j.cmail.yandex.net [5.255.227.23]) by lists.linaro.org (Postfix) with ESMTPS id ECC8260E6A for ; Fri, 2 Jun 2017 14:00:19 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::26]) by forward5j.cmail.yandex.net (Yandex) with ESMTP id 9B4CD20F6F for ; Fri, 2 Jun 2017 17:00:18 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id 0E82C5080F66 for ; Fri, 2 Jun 2017 17:00:15 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0Foic2V0; Fri, 02 Jun 2017 17:00:15 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 17:00:02 +0300 Message-Id: <1496412007-23455-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 4/9] linux-gen: stop poisoning CFLAGS/LIBS with libpcap flags 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 Instead of poisoning global AM_CFLAGS/LIBS with libpcap flags, use fine-grained controls for compiling/linking with libpcap. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ configure.ac | 1 - pkgconfig/libodp-linux.pc.in | 2 +- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/m4/odp_pcap.m4 | 8 ++++++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 437a978e..d0766f6c 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,6 @@ AC_SUBST([testdir]) # Set conditionals as computed within platform specific files ########################################################################## AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) -AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes]) AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) diff --git a/pkgconfig/libodp-linux.pc.in b/pkgconfig/libodp-linux.pc.in index 5b6e9c28..172e8d09 100644 --- a/pkgconfig/libodp-linux.pc.in +++ b/pkgconfig/libodp-linux.pc.in @@ -7,5 +7,5 @@ Name: libodp-linux Description: The ODP packet processing engine Version: @PKGCONFIG_VERSION@ Libs: -L${libdir} -lodp-linux @DPDK_LIBS@ -Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ -lpcap @PTHREAD_LIBS@ -lrt -lpthread +Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ -lrt -lpthread Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 7f2e341d..14fdf35e 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -227,6 +227,7 @@ __LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS) if HAVE_PCAP __LIB__libodp_linux_la_SOURCES += pktio/pcap.c +__LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS) endif # Create symlink for ABI header files. Application does not need to use the arch diff --git a/platform/linux-generic/m4/odp_pcap.m4 b/platform/linux-generic/m4/odp_pcap.m4 index 0439c60b..ffdff17c 100644 --- a/platform/linux-generic/m4/odp_pcap.m4 +++ b/platform/linux-generic/m4/odp_pcap.m4 @@ -9,6 +9,10 @@ AC_CHECK_HEADER(pcap/pcap.h, []) if test $have_pcap == yes; then - AM_CFLAGS="$AM_CFLAGS -DHAVE_PCAP" - LIBS="$LIBS -lpcap" + ODP_CFLAGS="$AM_CFLAGS -DHAVE_PCAP" + PCAP_LIBS="-lpcap" fi + +AC_SUBST([PCAP_LIBS]) + +AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes]) From patchwork Fri Jun 2 14:00:03 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: 101268 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp412568qge; Fri, 2 Jun 2017 07:03:52 -0700 (PDT) X-Received: by 10.55.203.26 with SMTP id d26mr7668871qkj.167.1496412232836; Fri, 02 Jun 2017 07:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412232; cv=none; d=google.com; s=arc-20160816; b=KfifA7OsbEWFEfK6i/wqO2VKgWQwhpplLTOTMKW9oCAEG6x3hNd6vRk1XXHujCIvQ6 EnEI/mDelPy25Fq3ggTQHAeyXV3XuEpFWZcV14im8D4RfskdGUCQ9fQlxcv45prMd9IQ h4sJlphNeLcMeD9tbPWioK5hvRjCyf6xuM6jDs1zLr/bdjThhQjE6/qVOyhYhESENWwn A2cQvMPPJ6C34PPsLIgkcAk8CcdYAbTc3Fbd257GRQ4YvlhuKz96iBoQs3WfoN7iCgtV YonbL+GIbHCqoZ2o0u459BkB68gm0p85ckG4NTQloDq5RzEOTFJEfL9Vik1TyeL4f4hz v0UA== 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=Iy8RWdL5KW7qNNBdJI2cXlHhkhYkd51Zn4Drx3W8aZM=; b=u44nJxzQO5CsN3NfoE7hRpWeUzhm9f3uPSdsr/U8z6HPYxNBCXdgmW/Lmyjuxsqb7q Jd3Q7uMI45Wx+Yuhr5or0LEZosmyiBHf5RSF4YKY0GTTR0nR7+Db41a8CE3GDK8Os0or 4nksTJ0qqaNQGyxFXFUtHpXsThGC2aYiEu3iwQshbXtEGAUzMLUbLAGo6cRsUfBat5xW S8ZG4VC+rN/p8g7C209rYWKi1HwCuAUgXbpbOHJ+gTmtuObOkczBvri5PvcZVVPpzFXT HMINN3b58LdT7uIZ6vTUxftYhf/vzW/ruNX9+0OxnLqJdtqbU+jf3P4z9x5o7GOeQd1h zIjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w124si22861907qkc.185.2017.06.02.07.03.52; Fri, 02 Jun 2017 07:03:52 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 80A8A60EC7; Fri, 2 Jun 2017 14:03:52 +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=-0.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 6129B60E39; Fri, 2 Jun 2017 14:01:25 +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 5474060682; Fri, 2 Jun 2017 14:01:06 +0000 (UTC) Received: from forward1j.cmail.yandex.net (forward1j.cmail.yandex.net [5.255.227.19]) by lists.linaro.org (Postfix) with ESMTPS id 30F6860E4B for ; Fri, 2 Jun 2017 14:00:21 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::26]) by forward1j.cmail.yandex.net (Yandex) with ESMTP id B3A7D20EFB for ; Fri, 2 Jun 2017 17:00:19 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id 623AA508119F for ; Fri, 2 Jun 2017 17:00:16 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0GoKlgZ1; Fri, 02 Jun 2017 17:00:16 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 17:00:03 +0300 Message-Id: <1496412007-23455-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 5/9] linux-gen: stop poisoning CPPFLAGS/LDFLAGS with CUnit flags 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 Instead of poisoning global AM_CPPFLAGS/AM_LDFLAGS with CUnit flags, use fine-grained controls for compiling/linking with CUnit. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ test/common_plat/common/Makefile.am | 1 + test/common_plat/m4/validation.m4 | 19 +++++++++++-------- test/common_plat/validation/api/Makefile.inc | 2 ++ test/linux-generic/Makefile.inc | 2 ++ 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/test/common_plat/common/Makefile.am b/test/common_plat/common/Makefile.am index fd41fb42..7d88d2ea 100644 --- a/test/common_plat/common/Makefile.am +++ b/test/common_plat/common/Makefile.am @@ -4,6 +4,7 @@ include $(top_srcdir)/test/Makefile.inc noinst_LTLIBRARIES = libcunit_common.la libcpumask_common.la libthrmask_common.la libcunit_common_la_SOURCES = odp_cunit_common.c +libcunit_common_la_LIBADD = $(CUNIT_LIBS) libcpumask_common_la_SOURCES = mask_common.c diff --git a/test/common_plat/m4/validation.m4 b/test/common_plat/m4/validation.m4 index d32f675a..67edac7a 100644 --- a/test/common_plat/m4/validation.m4 +++ b/test/common_plat/m4/validation.m4 @@ -26,24 +26,24 @@ AC_ARG_WITH([cunit-path], AC_HELP_STRING([--with-cunit-path=DIR path to CUnit libs and headers], [(or in the default path if not specified).]), [CUNIT_PATH=$withval - AM_CPPFLAGS="$AM_CPPFLAGS -I$CUNIT_PATH/include" - AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" - cunit_support=yes],[]) + CUNIT_CPPFLAGS="-I$CUNIT_PATH/include" + CUNIT_LIBS="-L$CUNIT_PATH/lib" + cunit_support=yes],[]) ########################################################################## # Save and set temporary compilation flags ########################################################################## -OLD_LDFLAGS=$LDFLAGS +OLD_LIBS=$LIBS OLD_CPPFLAGS=$CPPFLAGS -LDFLAGS="$AM_LDFLAGS $LDFLAGS" -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" +LIBS="$CUNIT_LIBS $LIBS" +CPPFLAGS="$CUNIT_CPPFLAGS $CPPFLAGS" ########################################################################## # Check for CUnit availability ########################################################################## if test x$cunit_support = xyes then - AC_CHECK_LIB([cunit],[CU_get_error], [], + AC_CHECK_LIB([cunit],[CU_get_error], [CUNIT_LIBS="$CUNIT_LIBS -lcunit"], [AC_MSG_ERROR([CUnit libraries required])]) AC_CHECK_HEADERS([CUnit/Basic.h], [], [AC_MSG_FAILURE(["can't find cunit headers"])]) @@ -51,8 +51,11 @@ else cunit_support=no fi +AC_SUBST([CUNIT_CPPFLAGS]) +AC_SUBST([CUNIT_LIBS]) + ########################################################################## # Restore old saved variables ########################################################################## -LDFLAGS=$OLD_LDFLAGS +LIBS=$OLD_LIBS CPPFLAGS=$OLD_CPPFLAGS diff --git a/test/common_plat/validation/api/Makefile.inc b/test/common_plat/validation/api/Makefile.inc index 6069ee6b..177d2ac3 100644 --- a/test/common_plat/validation/api/Makefile.inc +++ b/test/common_plat/validation/api/Makefile.inc @@ -11,6 +11,8 @@ AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common AM_LDFLAGS += -static AM_LDFLAGS += $(DPDK_PMDS) +AM_CPPFLAGS += $(CUNIT_CPPFLAGS) + LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la diff --git a/test/linux-generic/Makefile.inc b/test/linux-generic/Makefile.inc index 6e165d8d..30b56e26 100644 --- a/test/linux-generic/Makefile.inc +++ b/test/linux-generic/Makefile.inc @@ -4,6 +4,8 @@ AM_LDFLAGS += -static +AM_CPPFLAGS += $(CUNIT_CPPFLAGS) + LIBCUNIT_COMMON = $(top_builddir)/test/common_plat/common/libcunit_common.la LIB = $(top_builddir)/lib LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS) From patchwork Fri Jun 2 14:00:04 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: 101269 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp413217qge; Fri, 2 Jun 2017 07:04:59 -0700 (PDT) X-Received: by 10.200.36.10 with SMTP id c10mr9133029qtc.160.1496412299801; Fri, 02 Jun 2017 07:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412299; cv=none; d=google.com; s=arc-20160816; b=K2+v72AH0YraWf4jmpXE8C1j0Oqa1p+sDHDVd/txkec0BWIzti58XFGKHBm/Zc96fo Mo3h5mq8eTRnDHhSxxWy/prFB4HWPLjTwZHiboMZs5y0yLpPHs7R7/fJEuiPk72LrGzL OaQ1nNNMso3nOV2+qgg82ktlQYGSqCTdXl6LT/KWBMrbu2WDVTy7QmryunLlKq0aEgfG WiI7D3VcRS9N0Qlr6nkTohzzSJ+GIWNblR5uxnreYY0cN89bwPJmnlp1j+mUqfeSPngU EdrTP+gSeAbdnbM3P9p9/tiqegwn7xtwN2+2YVE+rDVBFqfohoZ4gDKftIL0/HWR2umR zfDA== 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=qCDabL4liNB0ccQ+oSgg1vlupd8oSBbtLC8jimM8pkI=; b=givgM81i+eT3BpgdsUll3ShdKFre7CXAGrIVdAOVDOrGK7g4zXyx5dwsRobLPHdwuG tZJdd6MSMCl1GPoPK/QUz4pdimV+SuW71mRnJjMRv24umrSvZ4kWtINhSWkmcRuwzg0c 9dEbQF/s7Gmh547nFTwcbED3MZgcwFj879LicKmy84GR6ww5yFs22S9GSh9ZDFSGbiXd U9TmIqxRbGyCOD0jLwIKwuOqXNaZG4FxL88csMpoSZzFGoVGWnXzrCnMmxJBNmVjjyoU lIRTVP7rVYTp2K9y8S5018GpCyJyaCI9xEuq/ibxi/BzAlXRnrTS2S5zOk3pgxscgAdt CJVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j10si3661819qke.173.2017.06.02.07.04.59; Fri, 02 Jun 2017 07:04:59 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 6211560EEC; Fri, 2 Jun 2017 14:04:59 +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=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 9F91D60E8A; Fri, 2 Jun 2017 14:01:27 +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 D058C60637; Fri, 2 Jun 2017 14:01:06 +0000 (UTC) Received: from forward2m.cmail.yandex.net (forward2m.cmail.yandex.net [5.255.216.20]) by lists.linaro.org (Postfix) with ESMTPS id 9B04B60D95 for ; Fri, 2 Jun 2017 14:00:24 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [37.140.190.27]) by forward2m.cmail.yandex.net (Yandex) with ESMTP id 1515621425 for ; Fri, 2 Jun 2017 17:00:23 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id A8028508118B for ; Fri, 2 Jun 2017 17:00:17 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0HoSq866; Fri, 02 Jun 2017 17:00:17 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 17:00:04 +0300 Message-Id: <1496412007-23455-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 6/9] linux-gen: stop poisoning CFLAGS/LDFLAGS with threading flags 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 Instead of poisoning global AM_CFLAGS/AM_LDFLAGS with threading flags, use fine-grained controls for compiling/linking with threading. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ platform/Makefile.inc | 2 ++ platform/linux-generic/Makefile.am | 1 + platform/linux-generic/m4/odp_pthread.m4 | 5 ----- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 7059d910..82bd750f 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -16,6 +16,8 @@ AM_CFLAGS += $(VISIBILITY_CFLAGS) #The implementation will need to retain the deprecated implementation AM_CFLAGS += -Wno-deprecated-declarations +AM_CFLAGS += @PTHREAD_CFLAGS@ + odpapispecincludedir= $(includedir)/odp/api/spec odpapispecinclude_HEADERS = \ $(top_srcdir)/include/odp/api/spec/align.h \ diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 14fdf35e..616045bc 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -224,6 +224,7 @@ __LIB__libodp_linux_la_SOURCES = \ __LIB__libodp_linux_la_LIBADD = $(OPENSSL_LIBS) __LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS) +__LIB__libodp_linux_la_LIBADD += $(PTHREAD_LIBS) if HAVE_PCAP __LIB__libodp_linux_la_SOURCES += pktio/pcap.c diff --git a/platform/linux-generic/m4/odp_pthread.m4 b/platform/linux-generic/m4/odp_pthread.m4 index 7f391039..48615894 100644 --- a/platform/linux-generic/m4/odp_pthread.m4 +++ b/platform/linux-generic/m4/odp_pthread.m4 @@ -6,8 +6,3 @@ AX_PTHREAD([CC="$PTHREAD_CC"], [ echo "Error! We require pthreads to be available" exit -1 ]) -LIBS="$PTHREAD_LIBS $LIBS" -AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" -AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS" - -AM_LDFLAGS="$AM_LDFLAGS -pthread -lrt" From patchwork Fri Jun 2 14: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: 101267 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp412054qge; Fri, 2 Jun 2017 07:03:03 -0700 (PDT) X-Received: by 10.200.55.98 with SMTP id p31mr8166000qtb.64.1496412183869; Fri, 02 Jun 2017 07:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412183; cv=none; d=google.com; s=arc-20160816; b=XY+K9oLEjbTp0ggTiluZD0DlRHsPETQfnyUCFIlRELs4YnAIinHs7Bw5sTmrR/OCQ8 t1kS/eAh7uW9voQHQt2JapvMAE1Gb6GwMXDu55TxyCOymDNYH7Y7rZ5jF+rXyqpkki46 dLwN8BBU8uLvBhlSSRa8ISRCaAO2ybn6x72UsvAg8DMXzy8bNlK2ipXLVGCXlKBbtp7z uzGj32t2zGCn2zjwNRc5cpLlWcTWTOciHnw0WalLI9+Ts8bnT6w5KTzBaBI2JtxQT1l8 JaQDJOQba/Lut4Nyrtx9kUAhSq1ETZRk3W9hEh5QxMJT72smjE+k7QjOIeqYqTmafzAO 48nw== 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=kS+l4558TSW2IRpfLtcys4giVEKCIpfMbgv1l6/bp68=; b=yZU0y3knx1Ib+GqaLakfyTKPDAgZ9CRBGvimgu6zQDJdq7LP46gi6x3E3qaxKpSaYM yp3IDSgpreLwb4ymGwtpAlzeHhRCy45Lr6pwi0/UkO+hgZ1A1V3Wh2kNfyLly4+DMfaN YjfsSjNzZtVxOLNCfAzY8yWQv4ExUgo2vWbGtLUaQTEeirpd0q6OvxCDoL/x/H85c/xi JvMfh0Tgyv8kE4IJIu2qwnE/FPnM4LwEXiNVHMg6071VFIeMT3n4bU4odESPeX79JANq mHiQGlosZ2Eq4HAawiUmM7IpJEjKmNWd/grfQNeu26ufZiZKCAI5NninZsqNBiRlthIT iUxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u84si2340885qki.114.2017.06.02.07.03.03; Fri, 02 Jun 2017 07:03:03 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 5DF6D60DFC; Fri, 2 Jun 2017 14:03:03 +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=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 148E8607DD; Fri, 2 Jun 2017 14:01:20 +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 80BC060682; Fri, 2 Jun 2017 14:01:05 +0000 (UTC) Received: from forward3h.cmail.yandex.net (forward3h.cmail.yandex.net [87.250.230.18]) by lists.linaro.org (Postfix) with ESMTPS id C385460E6D for ; Fri, 2 Jun 2017 14:00:23 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [37.140.190.27]) by forward3h.cmail.yandex.net (Yandex) with ESMTP id BB46C21686 for ; Fri, 2 Jun 2017 17:00:22 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id ED2545081174 for ; Fri, 2 Jun 2017 17:00:19 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0IoS9qmv; Fri, 02 Jun 2017 17:00:18 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 17:00:05 +0300 Message-Id: <1496412007-23455-8-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 7/9] linux-gen: move timer_create check to platform directory 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ configure.ac | 2 -- pkgconfig/libodp-linux.pc.in | 2 +- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/m4/configure.m4 | 1 + platform/linux-generic/m4/odp_timer.m4 | 8 ++++++++ 5 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 platform/linux-generic/m4/odp_timer.m4 diff --git a/configure.ac b/configure.ac index d0766f6c..5bf33270 100644 --- a/configure.ac +++ b/configure.ac @@ -332,8 +332,6 @@ AC_CONFIG_FILES([Makefile pkgconfig/libodphelper.pc ]) -AC_SEARCH_LIBS([timer_create],[rt posix4]) - ########################################################################## # distribute the changed variables among the Makefiles diff --git a/pkgconfig/libodp-linux.pc.in b/pkgconfig/libodp-linux.pc.in index 172e8d09..fb749dad 100644 --- a/pkgconfig/libodp-linux.pc.in +++ b/pkgconfig/libodp-linux.pc.in @@ -7,5 +7,5 @@ Name: libodp-linux Description: The ODP packet processing engine Version: @PKGCONFIG_VERSION@ Libs: -L${libdir} -lodp-linux @DPDK_LIBS@ -Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ -lrt -lpthread +Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ @TIMER_LIBS@ -lpthread Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 616045bc..067b5e07 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -225,6 +225,7 @@ __LIB__libodp_linux_la_SOURCES = \ __LIB__libodp_linux_la_LIBADD = $(OPENSSL_LIBS) __LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS) __LIB__libodp_linux_la_LIBADD += $(PTHREAD_LIBS) +__LIB__libodp_linux_la_LIBADD += $(TIMER_LIBS) if HAVE_PCAP __LIB__libodp_linux_la_SOURCES += pktio/pcap.c diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index a2a25408..c6d79b8c 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -29,6 +29,7 @@ AC_LINK_IFELSE( exit -1) m4_include([platform/linux-generic/m4/odp_pthread.m4]) +m4_include([platform/linux-generic/m4/odp_timer.m4]) m4_include([platform/linux-generic/m4/odp_openssl.m4]) m4_include([platform/linux-generic/m4/odp_pcap.m4]) m4_include([platform/linux-generic/m4/odp_netmap.m4]) diff --git a/platform/linux-generic/m4/odp_timer.m4 b/platform/linux-generic/m4/odp_timer.m4 new file mode 100644 index 00000000..3122c92b --- /dev/null +++ b/platform/linux-generic/m4/odp_timer.m4 @@ -0,0 +1,8 @@ +########################################################################## +# Check for POSIX timer functions +########################################################################## + +AC_CHECK_LIB([rt], [timer_create], [TIMER_LIBS="-lrt"], + [AC_CHECK_LIB([posix4], [timer_create], [TIMER_LIBS="-lposix4"], + [AC_MSG_FAILURE([timer_create not found])])]) +AC_SUBST([TIMER_LIBS]) From patchwork Fri Jun 2 14:00:06 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: 101273 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp415237qge; Fri, 2 Jun 2017 07:08:35 -0700 (PDT) X-Received: by 10.55.33.163 with SMTP id f35mr7631666qki.51.1496412515564; Fri, 02 Jun 2017 07:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412515; cv=none; d=google.com; s=arc-20160816; b=us8eJisGmc2gf4tX//rsbWFLSRnw6aPJlInB/eRdMWARwBDsFXapHXIQho3mcTT3hL bmDlbJD92S9fAp/ucKQF8fLoZ8YlZ6/n/q6dP65b5cdtZboUiJ/RXcJdwsTjVpEhKqE+ /aO1hVKMr+nZDYCQhwgYn++y4r20q5QS3nEoCJfOqknCkzrSgK0vhfnzHJVa9C+3m6DY N13S06qh2lVsP64/wp8KRW1tG+gLWlj6uJr/VFfHt/7f05Xb7T479zVzBhg+NItLmh3q vgkhHQEno3n2sUtpCKwDSOhZdF/pBCAoMLfzJmp+78q1Z15OtSd8M5utvzpFCZN0SCXH LKZQ== 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=YFf+GAmcLGmuzg6phze86eOyDu1yZ5ExwEyu0yRvVcU=; b=uSI+1wpTrlPpaCs6TiRrsUfiSZqKMTMG0Izhemy8ffPf3rTeOBggf5VhtdxdXQ6VYu CNTcXflmS5mOzcFoGmPsnXfj2mb473uCZ28j9oM208Vh16gweYDyPgsNwjaBao71piVo snRR3Jrj4fi4rUnlPssTtwdOUfAs4VJoVxJXMz5JXlbodIEHT4tsb/thmbNyarnwEOgu ondluWzvQ53xvP6e7Wb98v0ta4HTsCF2oslu3RxsmTDvqXMNtDCI+rwRh2ibM3DuKu3H qNYLotXYzx+W7FdGMYqy3QA8+nVDoyha78W/PMpvzVQ7jegVguFffBwS7KG+zVokYwlK 348Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j8si5815829qtf.90.2017.06.02.07.08.35; Fri, 02 Jun 2017 07:08:35 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 37C7060889; Fri, 2 Jun 2017 14:08:35 +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=-3.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 0AEE260682; Fri, 2 Jun 2017 14:01:48 +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 B385F60879; Fri, 2 Jun 2017 14:01:10 +0000 (UTC) Received: from forward3o.cmail.yandex.net (forward3o.cmail.yandex.net [37.9.109.247]) by lists.linaro.org (Postfix) with ESMTPS id 1C36060E3E for ; Fri, 2 Jun 2017 14:00:27 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [37.140.190.27]) by forward3o.cmail.yandex.net (Yandex) with ESMTP id B242D20E8B for ; Fri, 2 Jun 2017 17:00:25 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id 40BF15080B94 for ; Fri, 2 Jun 2017 17:00:20 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0Koep0Qk; Fri, 02 Jun 2017 17:00:20 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 17:00:06 +0300 Message-Id: <1496412007-23455-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 8/9] linux-gen: stop poisoning CPPFLAGS with Netmap flags 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 Instead of poisoning global AM_CPPFLAGS with Netmap flags, use fine-grained controls for compiling with Netmap. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ configure.ac | 1 - platform/linux-generic/Makefile.am | 1 + platform/linux-generic/m4/odp_netmap.m4 | 7 +++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 5bf33270..3509a6df 100644 --- a/configure.ac +++ b/configure.ac @@ -208,7 +208,6 @@ AC_SUBST([testdir]) ########################################################################## # Set conditionals as computed within platform specific files ########################################################################## -AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 067b5e07..893bce71 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -13,6 +13,7 @@ AM_CFLAGS += -D_ODP_PKTIO_IPC AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) AM_CPPFLAGS += $(DPDK_CPPFLAGS) +AM_CPPFLAGS += $(NETMAP_CPPFLAGS) include_HEADERS = \ $(top_srcdir)/include/odp.h \ diff --git a/platform/linux-generic/m4/odp_netmap.m4 b/platform/linux-generic/m4/odp_netmap.m4 index 880e9d58..dea80626 100644 --- a/platform/linux-generic/m4/odp_netmap.m4 +++ b/platform/linux-generic/m4/odp_netmap.m4 @@ -15,14 +15,14 @@ AC_ARG_WITH([netmap-path], AC_HELP_STRING([--with-netmap-path=DIR path to netmap root directory], [(or in the default path if not specified).]), [NETMAP_PATH=$withval - AM_CPPFLAGS="$AM_CPPFLAGS -isystem $NETMAP_PATH/sys" + NETMAP_CPPFLAGS="-isystem $NETMAP_PATH/sys" netmap_support=yes],[]) ########################################################################## # Save and set temporary compilation flags ########################################################################## OLD_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" +CPPFLAGS="$NETMAP_CPPFLAGS $CPPFLAGS" ########################################################################## # Check for netmap availability @@ -32,6 +32,7 @@ then AC_CHECK_HEADERS([net/netmap_user.h], [], [AC_MSG_FAILURE(["can't find netmap header"])]) ODP_CFLAGS="$ODP_CFLAGS -DODP_NETMAP" + AC_SUBST([NETMAP_CPPFLAGS]) else netmap_support=no fi @@ -40,3 +41,5 @@ fi # Restore old saved variables ########################################################################## CPPFLAGS=$OLD_CPPFLAGS + +AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) From patchwork Fri Jun 2 14:00:07 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: 101272 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp414884qge; Fri, 2 Jun 2017 07:07:56 -0700 (PDT) X-Received: by 10.200.48.80 with SMTP id g16mr8831675qte.78.1496412476014; Fri, 02 Jun 2017 07:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412476; cv=none; d=google.com; s=arc-20160816; b=R51BEpIHmlX0ote7dK+d7w7gow5ofdu+S8Jx2CHDKq2cia4fVN7vV71pz4AI1QqhNj urvu+Nk3sBajOnkuD0RVyzuOCNdnKzjRv17j/DXLRaAqSnHShLKWZ6p2Rd1RHlEw1gpD gV3q5wp9PGBIWN6lFjaYE55iVj5QxP1953h/+cnsvgiRs7Q/Sqm3xq+4Re21Cd9apVg7 g//q7kDNbvmUCW4cMP+fvF7MW2glyj0gYTxUBi5wEV9IUcaNJC/htsjktGz3CU9Ly4Td m0deTlfF7oNwscBlDHToShx5+8jTHFc/22BpZTo5x2vkh1Vp35dyt7TzG/zolgEByGd8 f7/w== 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=v1WhytxCILSEvhoVlZ7/Q68wjtgzCt/i1cWsPngiaE0=; b=YRtpQUIjnJSNSsbSoEC0DIa3JGSgUevGrIditsIbvrdNF4GgmymjQS3oR9bu+iT4Sq rbYiJMU38UufeGM3N4taoRCPGHvDZkBguWUGYPNR0jXa0mMbW/K2YCTrToVOgBLSGqk/ n8b87OmpVupaIjPGoxvqqYoednjyXxj3tAL975vt6PmykvwaOE99ONTZwYuBWMz9njdh 4JaWA/I/8eFUITfOhor/jh4D0YYYOi8WVcLEDpaDZ0iW3N/AkhVn9JqNaietkLVy1gtI /TkT7oZwJdm7n9fS+rSkx+dxo6qvlYVC7y+lkArePCNg2sKFKq+3EQWRbroBotBEVLi9 yw4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y52si23561820qty.173.2017.06.02.07.07.55; Fri, 02 Jun 2017 07:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 A5C0460EEC; Fri, 2 Jun 2017 14:07:55 +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_H3,RCVD_IN_MSPIKE_WL,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 AED5260ED1; Fri, 2 Jun 2017 14:01: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 CB808606A6; Fri, 2 Jun 2017 14:01:09 +0000 (UTC) Received: from forward4m.cmail.yandex.net (forward4m.cmail.yandex.net [5.255.216.22]) by lists.linaro.org (Postfix) with ESMTPS id 33D3260E8A for ; Fri, 2 Jun 2017 14:00:25 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [37.140.190.27]) by forward4m.cmail.yandex.net (Yandex) with ESMTP id A6DCB2187D for ; Fri, 2 Jun 2017 17:00:23 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id 6D41E5081176 for ; Fri, 2 Jun 2017 17:00:21 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0LoqoFeT; Fri, 02 Jun 2017 17:00:21 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 2 Jun 2017 17:00:07 +0300 Message-Id: <1496412007-23455-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 9/9] travis: use pkg-config to discover ODP flags 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a7ad2a74..f63e421b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,10 +115,10 @@ script: - echo "Checking linking and run from install..." - pushd $HOME - echo "Dynamic link.." - - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst -I${HOME}/odp-install/include -L${HOME}/odp-install/lib -lodp-linux -L${OLDPWD}/dpdk/x86_64-native-linuxapp-gcc/lib -lrt -ldpdk -lpthread -lcrypto -lpcap -ldl + - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig pkg-config --cflags --libs libodp-linux` - LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst - echo "Static link.." - - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst -I${HOME}/odp-install/include -L${HOME}/odp-install/lib -lodp-linux -L${OLDPWD}/dpdk/x86_64-native-linuxapp-gcc/lib -lrt -ldpdk -lpthread -lcrypto -lpcap -ldl -static + - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig pkg-config --cflags --libs libodp-linux --static` -static - ./odp_hello_inst jobs: