From patchwork Tue Oct 24 08: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: 116914 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5524109qgn; Tue, 24 Oct 2017 01:02:49 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TCcH7CTyJpIH+S96QAVMNqzVdcwOWpXrI2vGzZqVP3Y9PjXvRzeiWCtV9iGGD7TzkdWOcg X-Received: by 10.200.17.133 with SMTP id d5mr23648587qtj.295.1508832169748; Tue, 24 Oct 2017 01:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508832169; cv=none; d=google.com; s=arc-20160816; b=QkjUS1/XasuKrrPwUrSpjbIi5ZaaU8k/33bfUuTUF2uLchNvkDVNI0o/XpNs4KUYqB 1oM9tLxhxeRrDxIyMMPzflnsdh6xeAVlM8XIt6B7Th+dxFyN23lcC/T+T/M36wqKClvX Gpsx15T50zMpRpEd1mXVTgPnBrARk3yw/u3ORS0vr6yReVPrr5jId0weOGq1jQmPmuPN u2xxQEtDM1W2t2R3cq6hFF/SFm8GIxzo8oU4+C0ac6UUdUf/XWO2S3ZcgQSCdfB4CFOa 2e2sHW4pVGOg+PICN+3LINIDX2xCF05nU8AYJh0FWmXXdBYuWPNAS4JQiRzEIgq6l+LO PxDA== 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=epPSctRdxG+DLkyrhHV2xe3DsDypbVUSmUrV0g6AULE=; b=UJ2VtE6RsagojxOEMcLx0aG1IZzaPLBVRfyugKxAUNSKNPYCz6YJDp8yeqVHGJAIU2 0Ykl73cAQXTZmMdbEPl/xbCLGNF8LuoRuP/0k8FiAoGCg96pZeQ2xwFh/EqwMQ22R13C 6mEXGYT7Rx6aoneBLsQ82aXISx2UYjqnGbVmBV9Ky+QFJD9zmx7Arsq27bcOOOJtwab4 AeOudeo/Jh9o7MpEK2Uihc+8Mm/5j6xnlOEeoKFDgSCpbK4FKbB4HxNvZO8tIc5QRV0U zQsBt/VV9mVQLG28kYMdhRTHUW6ACzfzb+3D30B6ND5gJZNmEO26G6aCh/pu4o3A6kC7 NzNA== 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 k198si7467407qke.395.2017.10.24.01.02.49; Tue, 24 Oct 2017 01:02:49 -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 73221628EC; Tue, 24 Oct 2017 08:02:49 +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 6E2BD6290A; Tue, 24 Oct 2017 08:01:07 +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 E610C61050; Tue, 24 Oct 2017 08:00:55 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id B178762906 for ; Tue, 24 Oct 2017 08:00:33 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 8D6BB2A21AB7 for ; Tue, 24 Oct 2017 11:00:30 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XQtBNp4tKx-0UteQlIS; Tue, 24 Oct 2017 11:00:30 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id E1sIWHVkFs-0TEemcPu; Tue, 24 Oct 2017 11:00:29 +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:03 +0300 Message-Id: <1508832006-16435-4-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 3/6] linux-gen: pktio: tap: build TAP 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 TAP 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-generic/m4/configure.m4 | 3 +++ platform/linux-generic/pktio/subsystem.c | 4 ++++ platform/linux-generic/pktio/tap.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 9c35a9962..2cc16a045 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -94,3 +94,6 @@ AC_CONFIG_FILES([platform/linux-generic/Makefile ########################################################################## AC_DEFINE([ODP_PKTIO_IPC], [1], [Define to 1 to enable IPC packet I/O support]) + +AC_DEFINE([ODP_PKTIO_TAP], [1], + [Define to 1 to enable TAP packet I/O support]) diff --git a/platform/linux-generic/pktio/subsystem.c b/platform/linux-generic/pktio/subsystem.c index 2ad856247..76b8a9283 100644 --- a/platform/linux-generic/pktio/subsystem.c +++ b/platform/linux-generic/pktio/subsystem.c @@ -35,7 +35,9 @@ extern int enable_link_pcap_pktio_ops; #endif extern int enable_link_socket_pktio_ops; extern int enable_link_socket_mmap_pktio_ops; +#ifdef ODP_PKTIO_TAP extern int enable_link_tap_pktio_ops; +#endif ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops) { @@ -58,5 +60,7 @@ ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops) #endif enable_link_socket_pktio_ops = 1; enable_link_socket_mmap_pktio_ops = 1; +#ifdef ODP_PKTIO_TAP enable_link_tap_pktio_ops = 1; +#endif } diff --git a/platform/linux-generic/pktio/tap.c b/platform/linux-generic/pktio/tap.c index e256eec3e..fffc4c82f 100644 --- a/platform/linux-generic/pktio/tap.c +++ b/platform/linux-generic/pktio/tap.c @@ -6,6 +6,8 @@ #include "config.h" +#ifdef ODP_PKTIO_TAP + /** * @file * @@ -423,3 +425,5 @@ ODP_MODULE_CONSTRUCTOR(tap_pktio_ops) * will remove in Makefile scheme changes. */ int enable_link_tap_pktio_ops = 0; + +#endif /* ODP_PKTIO_TAP */