From patchwork Tue Oct 24 08: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: 116915 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5524863qgn; Tue, 24 Oct 2017 01:03:42 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Rv8MOIMPQidDErzLHCOkPzLB/Otzy7AKkPGno+6TSOKHvnVjqsk/8SFtpMbUu98AQAETYY X-Received: by 10.55.159.146 with SMTP id i140mr20646337qke.255.1508832222449; Tue, 24 Oct 2017 01:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508832222; cv=none; d=google.com; s=arc-20160816; b=MvZXM9iHLB3GbMRqwGa4OhMu5ztlla/W46NJvY0H+U3WFMVCN9sT50tJQaPcYd2BaJ vqYxDDUNgQqiDTVO+wCcA3YyydcJCnH3pe304DI+CtE1gO7/n/+ttqzZbHy/QnKuz52d dHhSQ/kkgv3L7EfmwHUV1OU8TjpTBmwVU5egl48kpuZyxp58OWrng1n98/fB25VGC1De B/BbJcNdtuKU70VA0Kq77ooHsGg/v4o857oI4TGwmFq4y1BmR+iM4xK1l6W7a0tRdKbk nJy6S9R7Wm0KX7JmhrYwHOjH0Buhrw7+M+K5v2mYSt4uE7VbI3GBqYTdTU2vggt4c8fW 8/jg== 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=V/hdHpCUDp+ZLKI2cLy+Gl4/WbivYfiGBudyGVP0Kmc=; b=cbPR55U9Jh4osh+G0mz/F7KTST/5kwl9ryS6lQxfhXbe3+RsdtaRnC2juPZdxfMpmc UwiN4R+ApjbaTCUoBO5Ms2Tbh7QWpH51lPJGhKU072tK0Ry2wy7P8AeSYtyGsi5jRfjX rrYdi9FfWxku+OV28sHs8SV0W6qX+61izB7bhQAilEY4DfCgIOty0gcfqlFG2ryGuKL6 1RKSuIvZacg3Su0E7RQ2O348lWEMNYxNVUFpNEaUGQZ5nCX3O14mMrzp+cZx3JM5W+Dq 3CDljROTwuuluMX+jAtrEf1yHRQZXnUnj+fieU9yeuHFgmO6kRxhFQhXb9VkO5ymUs0l Nvbw== 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 e127si5651527qkc.205.2017.10.24.01.03.42; Tue, 24 Oct 2017 01:03:42 -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 0DB016293D; Tue, 24 Oct 2017 08:03:42 +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 B5E316291A; Tue, 24 Oct 2017 08: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 86A8E61050; Tue, 24 Oct 2017 08:00:56 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 0565C62914 for ; Tue, 24 Oct 2017 08:00:36 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 194521340CB7 for ; Tue, 24 Oct 2017 11:00:29 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Izsta4mvjy-0S90MBJH; Tue, 24 Oct 2017 11:00:28 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id E1sIWHVkFs-0SEuNWPQ; Tue, 24 Oct 2017 11:00:28 +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 11:00:01 +0300 Message-Id: <1508832006-16435-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508832006-16435-1-git-send-email-odpbot@yandex.ru> References: <1508832006-16435-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 255 Subject: [lng-odp] [PATCH 2.0 v1 1/6] linux-dpdk: pktio: dpkd: 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: e88dcc92184de56a453032c5b2ea7e664864fb04 **/ 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; }