From patchwork Tue Oct 24 15: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: 116948 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5907235qgn; Tue, 24 Oct 2017 08:01:36 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SeWE08XucvuQsbqFa1ZD9krsVCllghSltWHT2jEn3SwCapa6qzIaliNWg6lpJmaY5BLxeP X-Received: by 10.237.36.5 with SMTP id r5mr78217qtc.339.1508857296733; Tue, 24 Oct 2017 08:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508857296; cv=none; d=google.com; s=arc-20160816; b=MQQI24sjZC1YvycwOvvoRO28aDKultwEzyTlxDhz+dbDmGNH30Drhonymp673G7m9D gfNOTQFk/tG9dQY+iezQd4SLlZyrENZJgnrqGBIjnOvE7r+fujXPE71GG8P8qzBqdVHT FrBQiiJ+eb9JWVCQt4eFLqJZFpH8q9d3M1XCdN46jvYjyV6GXdrx6GameCniBVhEEWLC SqgHhNJTDV+0rEcpsqYeqcBHe/RNQQ9FhtJiEcv3KMg0I6xokIQypeiNONZTvSAmr0qR DnkNoq2VOS3LdSDWCrawZ6v/LlriqZsfYBN45CxYAt11bLJCS99c5sXjCfT3/PwjbZ5w 1a8w== 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=lXWsteq7Dfiltoxukr8Q3CriWFJMnyIc8Zqm0V1RCrk=; b=gEtdb3DlWGU6e9DyW/4HBxlv00JdSAsvNTFgKUjaq9P+qmB5BCYooN5pEK7OJQFMRw ZU83AiukYuSRjbaXB4GvjQae/M5pmYA7hmnR+4Npt4mG7x2mqiAO/1BgEzNeXnfCgu2f azl5lgDSRlRlbrYPEDhD6CUF/boH9l7D/P4VB5bXhBbTaTnNhfkYIoWyMvP+S/FD1Qsr C4wWii2KS4rZg7j/ZMDiPS0tcPDj5rLIZC7OnjT0ltdYvK/KcRKPNyxhe+z1QIa5PPtH EfWeTsNCCKYnXap/UJNDrMye/znnL0l7B59IJritFfXz6/km/201Cx7wKVBeJt0ysAeu pS/g== 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 i48si417677qta.66.2017.10.24.08.01.36; Tue, 24 Oct 2017 08:01:36 -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 6AFAF6293E; Tue, 24 Oct 2017 15:01:36 +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 83BBF615AC; Tue, 24 Oct 2017 15:00:49 +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 7583562927; Tue, 24 Oct 2017 15:00:44 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 089B462914 for ; Tue, 24 Oct 2017 15:00:40 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 92E7F786397 for ; Tue, 24 Oct 2017 18:00:38 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Pdt5uQsWVw-0cMOuFie; Tue, 24 Oct 2017 18:00:38 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 5zlZKw6b9U-0aPaUMxF; Tue, 24 Oct 2017 18:00:36 +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:06 +0300 Message-Id: <1508857207-23099-6-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 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: 7ba6d7f0e026041bb48d6d90f02d9b556020c337 **/ 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