From patchwork Tue Oct 24 15: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: 116950 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5909694qgn; Tue, 24 Oct 2017 08:03:23 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TRulBntEUEQY49Und2tPgOHpZ/Qk/5W/hvP1eWG/XLWWMBgG4t72spUdi8DQoy6rwz8F+r X-Received: by 10.13.251.71 with SMTP id l68mr11264663ywf.254.1508857403345; Tue, 24 Oct 2017 08:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508857403; cv=none; d=google.com; s=arc-20160816; b=hEReUdYNUoar6HmIYjxN7c+81mLpldhNLZvCMnPhOWlgsrMpecY/QIjvIi31CKU4R4 2+xyZa+L3ujZuk+gp6d9o4fQFOvoAiUw9fYpw31I8KLE0F2wt5fjY0tFom2m6UIfi3o7 O/J/PLnt/0pbH605pNAZ3HoejSsczE7cs+H1+dwl1CIBZOBXfeGLFyoy8nKcrEIBBwPL SErKshJkiAnhAQUwIRYuBXf9WI559d/ANUp7FIiG9eZzQ2kiyhLdqaBhImaK1Ha/1GFt iscshmXZZI9sG4izNZALcVXO1f59b5eJ3OOsgBLgKEhQWji9pT6RZH5W9rAJHPj2JmS8 Z/8g== 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=hYm1/z8xUMqbcJgs9JEqbk79E2fC//2a+6G6YVBzlsE=; b=nPb1L99AlViSkp/9hgSPQS6xYLpLy3kF/pxrIn0MKQmfSkvyyRX6kUdKvc+4EQl1Sl +qiM1JeRk3th11kdNsfq4g0Tqu4JhwR9l8x+FygIRQ6kszmL4VVfQdhykjUTqmyuHuSi JJRnPC3F4sC9wDPekGopWEI0gXsboMyONqhoZ78OZtvaSNQ+4FLGj3cJ+zs0cXbS2lzp dAuE4Zq09grt/I0lTYqIw6YRSSFaE1nebFrt1uJ2PO0YeKu/ak5BDdthe6WG5OLRYiM5 M0dIJ72khgwL7OF6R1rXtLhJSpZcOM49wFVFuITEqNVJDajIkfvw1V/HoxtsG3I3sfEb Tmdw== 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 g72si78084ywe.35.2017.10.24.08.03.23; Tue, 24 Oct 2017 08:03:23 -0700 (PDT) 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 0CC0F6294E; Tue, 24 Oct 2017 15:03:23 +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=-5.4 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 2038362934; Tue, 24 Oct 2017 15:00:57 +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 03C4F62926; Tue, 24 Oct 2017 15:00:46 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 0A449610DF for ; Tue, 24 Oct 2017 15:00:36 +0000 (UTC) Received: from mxback4o.mail.yandex.net (mxback4o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1e]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 5A2A96A85655 for ; Tue, 24 Oct 2017 18:00:34 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback4o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id YS2JAACd2N-0RimL8CX; Tue, 24 Oct 2017 18:00:27 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 5zlZKw6b9U-0RPGGoEN; Tue, 24 Oct 2017 18:00:27 +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: Tue, 24 Oct 2017 18:00:02 +0300 Message-Id: <1508857207-23099-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508857207-23099-1-git-send-email-odpbot@yandex.ru> References: <1508857207-23099-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 255 Subject: [lng-odp] [PATCH 2.0 v2 1/6] linux-dpdk: pktio: dpdk: build dpdk pktio based on configuration option 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: Bogdan Pricope Build dpdk pktio based on configuration option Signed-off-by: Bogdan Pricope --- /** Email created from pull request 255 (bogdanPricope:2_0_pktio_sub_unif_pr) ** https://github.com/Linaro/odp/pull/255 ** Patch: https://github.com/Linaro/odp/pull/255.patch ** Base sha: d37aa7f1c0480273fb0ccfded44a13e3e5a8e42f ** Merge commit sha: 7ba6d7f0e026041bb48d6d90f02d9b556020c337 **/ platform/linux-dpdk/m4/configure.m4 | 6 ++++++ platform/linux-dpdk/pktio/dpdk.c | 3 +++ platform/linux-dpdk/pktio/subsystem.c | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/platform/linux-dpdk/m4/configure.m4 b/platform/linux-dpdk/m4/configure.m4 index b08136bc3..16fdeadee 100644 --- a/platform/linux-dpdk/m4/configure.m4 +++ b/platform/linux-dpdk/m4/configure.m4 @@ -158,3 +158,9 @@ AC_SUBST([DPDK_LIBS]) AC_CONFIG_FILES([platform/linux-dpdk/Makefile platform/linux-dpdk/include/odp/api/plat/static_inline.h]) + +########################################################################## +# Enable dpdk pktio build +########################################################################## +AC_DEFINE([ODP_PKTIO_DPDK], [1], + [Define to 1 to enable DPDK packet I/O support]) diff --git a/platform/linux-dpdk/pktio/dpdk.c b/platform/linux-dpdk/pktio/dpdk.c index 1248c130e..a6e2573e5 100644 --- a/platform/linux-dpdk/pktio/dpdk.c +++ b/platform/linux-dpdk/pktio/dpdk.c @@ -6,6 +6,8 @@ #include +#ifdef ODP_PKTIO_DPDK + #include #include #include @@ -760,3 +762,4 @@ ODP_MODULE_CONSTRUCTOR(dpdk_pktio_ops) */ int enable_link_dpdk_pktio_ops = 0; +#endif /* ODP_PKTIO_DPDK */ diff --git a/platform/linux-dpdk/pktio/subsystem.c b/platform/linux-dpdk/pktio/subsystem.c index 985ae7822..ab99db0d5 100644 --- a/platform/linux-dpdk/pktio/subsystem.c +++ b/platform/linux-dpdk/pktio/subsystem.c @@ -22,7 +22,9 @@ ODP_SUBSYSTEM_FOREACH_TEMPLATE(pktio_ops, term_global, ODP_ABORT) /* Temporary variable to enable link modules, * will remove in Makefile scheme changes. */ +#ifdef ODP_PKTIO_DPDK extern int enable_link_dpdk_pktio_ops; +#endif extern int enable_link_loopback_pktio_ops; ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops) @@ -30,6 +32,8 @@ ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops) odp_subsystem_constructor(pktio_ops); /* Further initialization per subsystem */ +#ifdef ODP_PKTIO_DPDK enable_link_dpdk_pktio_ops = 1; +#endif enable_link_loopback_pktio_ops = 1; }