From patchwork Tue Oct 24 08: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: 116917 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5526888qgn; Tue, 24 Oct 2017 01:05:53 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RbuifwC7HuTrQF1ebVF341M0NRSF4mNbyEDkTgpH27NgNf6A4jf8qsqe9OJLMAs8JCnxF5 X-Received: by 10.55.153.69 with SMTP id b66mr2568767qke.107.1508832353695; Tue, 24 Oct 2017 01:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508832353; cv=none; d=google.com; s=arc-20160816; b=O6az8qoD+svZWMQQ9b5XpK52Hspf3qUEhNAZK7XaGX61lKZnjENat3utnifMSHdZeN 4MVH8Fdu+b5AF82JX7vf86jR3LsORi1OAUlwT+ZMW8IwLhoprV/q8pBrctsYR/OUAibV PvCWE9ShRdXWSN+V3KTUxmfMSQ0QLlW579RE8H5cJNza2Q/Uz6gY0YvXkG9joFXMmViG 4GvEn5reTHcil42uqlouyCH/tsXqMNCiYyUQW0U82/9+O+aXuJoYyJ+bdEiCAJlV3oud Ow+TkCIqkauruUP/IYDuiyHiTcL9MPHKAUaZVMOnljsItMlakJZG7CeZorQWOFAa5iLN WCZw== 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=3oopVc/hTHEc0Z2P+nhlAGDzoDgUmaS/xl/yOifMTT8=; b=ErXvaoH63ohCwTTXtJDe6H0JPYslhwVxKyrpkXzaYC7mvPnDc6qeMxz67I+KiueEhP pugGTA3MJCPu+DAnz6ck32PYu6w1mu/WDfZiGpBgfPHyspjtrhue4XhVDxkHqiZkTmsF G7CJMbGEXG753NJoAyFqhXzyskEM2DObX2pSvOinZCGz9hSIJKs4SuAryAEDvik+4dWQ H5kNBezFUUm08CDVCJ2SF/9BtSsh6/qbNdcCbvjRin/X7Momh0X1Ahi/o+BdIKKaQpSU 6cHLvaTdgj2pM4pRI0l0G8EFiQk4HcoGZTnPdovAYmEEubE7ytntV9hpTbjNSvTuveSf T69g== 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 n18si1849944qtk.101.2017.10.24.01.05.53; Tue, 24 Oct 2017 01:05:53 -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 5673B62928; Tue, 24 Oct 2017 08:05:53 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, 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 6C1C762937; Tue, 24 Oct 2017 08:01:26 +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 57AD461E03; Tue, 24 Oct 2017 08:00:59 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 24FDC62916 for ; Tue, 24 Oct 2017 08:00:36 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward106j.mail.yandex.net (Yandex) with ESMTP id AA04A1803AD1 for ; Tue, 24 Oct 2017 11:00:34 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id gfBIYeAfqT-0Y7K8jna; Tue, 24 Oct 2017 11:00:34 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id E1sIWHVkFs-0YEidCOj; Tue, 24 Oct 2017 11:00:34 +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:05 +0300 Message-Id: <1508832006-16435-6-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 5/6] linux-gen: pktio: socket: build SOCKET_MMAP 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 SOCKET_MMAP 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/socket_mmap.c | 4 ++++ platform/linux-generic/pktio/subsystem.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 7a2a11e2c..c1d3509dc 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -100,3 +100,6 @@ AC_DEFINE([ODP_PKTIO_TAP], [1], AC_DEFINE([ODP_PKTIO_SOCKET], [1], [Define to 1 to enable SOCKET packet I/O support]) + +AC_DEFINE([ODP_PKTIO_SOCKET_MMAP], [1], + [Define to 1 to enable SOCKET_MMAP packet I/O support]) diff --git a/platform/linux-generic/pktio/socket_mmap.c b/platform/linux-generic/pktio/socket_mmap.c index 3b62979d8..67d2b9206 100644 --- a/platform/linux-generic/pktio/socket_mmap.c +++ b/platform/linux-generic/pktio/socket_mmap.c @@ -7,6 +7,8 @@ #include "config.h" +#ifdef ODP_PKTIO_SOCKET_MMAP + #include #include @@ -777,3 +779,5 @@ ODP_MODULE_CONSTRUCTOR(socket_mmap_pktio_ops) * will remove in Makefile scheme changes. */ int enable_link_socket_mmap_pktio_ops = 0; + +#endif /* ODP_PKTIO_SOCKET_MMAP */ diff --git a/platform/linux-generic/pktio/subsystem.c b/platform/linux-generic/pktio/subsystem.c index b65ea1dbe..d26c152c3 100644 --- a/platform/linux-generic/pktio/subsystem.c +++ b/platform/linux-generic/pktio/subsystem.c @@ -36,7 +36,9 @@ extern int enable_link_pcap_pktio_ops; #ifdef ODP_PKTIO_SOCKET extern int enable_link_socket_pktio_ops; #endif +#ifdef ODP_PKTIO_SOCKET_MMAP extern int enable_link_socket_mmap_pktio_ops; +#endif #ifdef ODP_PKTIO_TAP extern int enable_link_tap_pktio_ops; #endif @@ -63,7 +65,9 @@ ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops) #ifdef ODP_PKTIO_SOCKET enable_link_socket_pktio_ops = 1; #endif +#ifdef ODP_PKTIO_SOCKET_MMAP enable_link_socket_mmap_pktio_ops = 1; +#endif #ifdef ODP_PKTIO_TAP enable_link_tap_pktio_ops = 1; #endif