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 ])