From patchwork Thu Jan 18 09:00:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 124923 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp41592lja; Thu, 18 Jan 2018 01:02:48 -0800 (PST) X-Google-Smtp-Source: ACJfBou66WZH/KwMgTxfl3Y4kN6MzpVldSwzHB35l8N5B5Ybxb6KDJL3eEcKP5rldwYHEPoRy2My X-Received: by 10.233.244.75 with SMTP id z11mr44255376qkl.68.1516266168058; Thu, 18 Jan 2018 01:02:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516266168; cv=none; d=google.com; s=arc-20160816; b=pDN+jItxmtiOfzY4fU2oa5k+7Gg+d6LH9MTMV4ZTDtTMXs4lQwO6Jp0LFbf54qYOEm hgDctEUOVy01IQidZVFfG2+rFeQHkMprrSb7rJWx/Dxjp2BYXDEANSgysSSopLafIKnn PiKsg9sD/jRr14pfpFIAdHuVZhnBXlL2oO59WRAT8GVS6vP54S3bqZ5ELfvpTdeAyYQh zv8yl0NS48nS6xhWG+SXoR8IxraBH8m4D+4dSL50yyhmS3qDAD+Bd7rPaH1zE8DbSDVA Jay4nR4ClUP9WWLrpjpX3lCV9wvYFhFKnqsHo+M/L2pAP6ceYObfT4In4GwklYJKIN8F rFdA== 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=xLVRPUFeumiAs5KMvi+w08hce19CFE6CNcnLjo1xiVc=; b=ErNj8xI5/B1YQ1Zd+C8XU1U1q95A/gFLzwYApWW3Ba3zE3IaJVYuDB80N1V3KnaAWx pJzQghJcnp43FbwYGxby4uEcSypjRm/uKO+90aDKrI6b8YImwUA+nvKJeP52bPCACHae yvCU+hLDeiExRXxRdfgDqk2rFW3bsuWRU4XJefAeMH+2mSShh6GqrIBBI1FL+E3HOQFT LvSdpp4g3xBXjifryJGrZiAu2IPtDHyu2S/RXhoaTkr3fi9UsjmPWACBlv455TRQWNly Nyyxd0mzkldLWfMyfA4i1B158Fsq1K+EMEaMI4qwoGVZPPf/gjzMkdSbTZWscWw4tC/H mPlA== 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 k9si205255qte.73.2018.01.18.01.02.47; Thu, 18 Jan 2018 01:02:48 -0800 (PST) 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 B963E617CA; Thu, 18 Jan 2018 09:02:47 +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_H2 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 BCDDF627C0; Thu, 18 Jan 2018 09:00:40 +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 C6F036173D; Thu, 18 Jan 2018 09:00:29 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id ECF596173D for ; Thu, 18 Jan 2018 09:00:21 +0000 (UTC) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 71D0B13453DF for ; Thu, 18 Jan 2018 12:00:20 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback15g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UlJcevdm2M-0KSqpZlV; Thu, 18 Jan 2018 12:00:20 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 8jkcLyi998-0JVatQdC; Thu, 18 Jan 2018 12:00:19 +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: Thu, 18 Jan 2018 12:00:16 +0300 Message-Id: <1516266016-28667-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516266016-28667-1-git-send-email-odpbot@yandex.ru> References: <1516266016-28667-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 394 Subject: [lng-odp] [PATCH CATERPILLAR v2 1/1] pktio: honor config.h settings 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: Josep Puigdemont It's not enough to chech if a macro is defined to enable or disable a pktio, we also need to check if it is set to 1 as per its description. Signed-off-by: Josep Puigdemont --- /** Email created from pull request 394 (joseppc:check-macro-value) ** https://github.com/Linaro/odp/pull/394 ** Patch: https://github.com/Linaro/odp/pull/394.patch ** Base sha: 944c6bf6c2eaea883ba943fa1513d1f3e5c7c334 ** Merge commit sha: d77f3f95b8a95dec313a7b753566a7fd375e48fc **/ .../linux-generic/include/odp_packet_internal.h | 2 +- platform/linux-generic/pktio/dpdk.c | 2 +- platform/linux-generic/pktio/dpdk.h | 2 +- platform/linux-generic/pktio/ipc.c | 2 +- platform/linux-generic/pktio/mdev.c | 2 +- platform/linux-generic/pktio/mdev/i40e.c | 2 +- platform/linux-generic/pktio/netmap.c | 2 +- platform/linux-generic/pktio/socket.c | 2 +- platform/linux-generic/pktio/socket_mmap.c | 2 +- platform/linux-generic/pktio/subsystem.c | 32 +++++++++++----------- platform/linux-generic/pktio/tap.c | 2 +- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index fed562aa3..72ba6ac18 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -145,7 +145,7 @@ typedef struct { /* Result for crypto packet op */ odp_crypto_packet_result_t crypto_op_result; -#ifdef ODP_PKTIO_DPDK +#if defined(ODP_PKTIO_DPDK) && ODP_PKTIO_DPDK == 1 /* Type of extra data */ uint8_t extra_type; /* Extra space for packet descriptors. E.g. DPDK mbuf */ diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 7d39bb1bc..3f716ab10 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -6,7 +6,7 @@ #include "config.h" -#ifdef ODP_PKTIO_DPDK +#if defined(ODP_PKTIO_DPDK) && ODP_PKTIO_DPDK == 1 #include diff --git a/platform/linux-generic/pktio/dpdk.h b/platform/linux-generic/pktio/dpdk.h index 7495b5965..d4e8cf064 100644 --- a/platform/linux-generic/pktio/dpdk.h +++ b/platform/linux-generic/pktio/dpdk.h @@ -13,7 +13,7 @@ #include -#ifdef ODP_PKTIO_DPDK +#if defined(ODP_PKTIO_DPDK) && ODP_PKTIO_DPDK == 1 #include #include diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c index 9d928c72a..4ca7d64ec 100644 --- a/platform/linux-generic/pktio/ipc.c +++ b/platform/linux-generic/pktio/ipc.c @@ -6,7 +6,7 @@ #include "config.h" -#ifdef ODP_PKTIO_IPC +#if defined(ODP_PKTIO_IPC) && ODP_PKTIO_IPC == 1 #include #include diff --git a/platform/linux-generic/pktio/mdev.c b/platform/linux-generic/pktio/mdev.c index 45ea2d113..e3917146f 100644 --- a/platform/linux-generic/pktio/mdev.c +++ b/platform/linux-generic/pktio/mdev.c @@ -6,7 +6,7 @@ #include "config.h" -#ifdef ODP_MDEV +#if defined(ODP_MDEV) && ODP_MDEV == 1 #include #include diff --git a/platform/linux-generic/pktio/mdev/i40e.c b/platform/linux-generic/pktio/mdev/i40e.c index c69da09cc..6f3b71712 100644 --- a/platform/linux-generic/pktio/mdev/i40e.c +++ b/platform/linux-generic/pktio/mdev/i40e.c @@ -6,7 +6,7 @@ #include "config.h" -#ifdef ODP_MDEV +#if defined(ODP_MDEV) && ODP_MDEV == 1 #include #include diff --git a/platform/linux-generic/pktio/netmap.c b/platform/linux-generic/pktio/netmap.c index 2631c816d..fc17da076 100644 --- a/platform/linux-generic/pktio/netmap.c +++ b/platform/linux-generic/pktio/netmap.c @@ -6,7 +6,7 @@ #include "config.h" -#ifdef ODP_NETMAP +#if defined(ODP_NETMAP) && ODP_NETMAP == 1 #include diff --git a/platform/linux-generic/pktio/socket.c b/platform/linux-generic/pktio/socket.c index 320de973c..6c98bc60c 100644 --- a/platform/linux-generic/pktio/socket.c +++ b/platform/linux-generic/pktio/socket.c @@ -7,7 +7,7 @@ #include "config.h" -#ifdef ODP_PKTIO_SOCKET +#if defined(ODP_PKTIO_SOCKET) && ODP_PKTIO_SOCKET == 1 #include diff --git a/platform/linux-generic/pktio/socket_mmap.c b/platform/linux-generic/pktio/socket_mmap.c index 26d0a2957..1e49d5b28 100644 --- a/platform/linux-generic/pktio/socket_mmap.c +++ b/platform/linux-generic/pktio/socket_mmap.c @@ -7,7 +7,7 @@ #include "config.h" -#ifdef ODP_PKTIO_SOCKET_MMAP +#if defined(ODP_PKTIO_SOCKET_MMAP) && ODP_PKTIO_SOCKET_MMAP == 1 #include diff --git a/platform/linux-generic/pktio/subsystem.c b/platform/linux-generic/pktio/subsystem.c index d6d6c39d0..5b62f4ccf 100644 --- a/platform/linux-generic/pktio/subsystem.c +++ b/platform/linux-generic/pktio/subsystem.c @@ -22,29 +22,29 @@ 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 +#if defined(ODP_PKTIO_DPDK) && ODP_PKTIO_DPDK == 1 extern int enable_link_dpdk_pktio_ops; #endif -#ifdef ODP_PKTIO_IPC +#if defined(ODP_PKTIO_IPC) && ODP_PKTIO_IPC == 1 extern int enable_link_ipc_pktio_ops; #endif extern int enable_link_loopback_pktio_ops; -#ifdef ODP_NETMAP +#if defined(ODP_NETMAP) && ODP_NETMAP == 1 extern int enable_link_netmap_pktio_ops; #endif -#ifdef HAVE_PCAP +#if defined(HAVE_PCAP) && HAVE_PCAP == 1 extern int enable_link_pcap_pktio_ops; #endif -#ifdef ODP_PKTIO_SOCKET +#if defined(ODP_PKTIO_SOCKET) && ODP_PKTIO_SOCKET == 1 extern int enable_link_socket_pktio_ops; #endif -#ifdef ODP_PKTIO_SOCKET_MMAP +#if defined(ODP_PKTIO_SOCKET_MMAP) && ODP_PKTIO_SOCKET_MMAP == 1 extern int enable_link_socket_mmap_pktio_ops; #endif -#ifdef ODP_PKTIO_TAP +#if defined(ODP_PKTIO_TAP) && ODP_PKTIO_TAP == 1 extern int enable_link_tap_pktio_ops; #endif -#ifdef ODP_MDEV +#if defined(ODP_MDEV) && ODP_MDEV == 1 extern int enable_link_i40e_pktio_ops; #endif @@ -54,29 +54,29 @@ ODP_SUBSYSTEM_CONSTRUCTOR(pktio_ops) /* Further initialization per subsystem */ -#ifdef ODP_PKTIO_DPDK +#if defined(ODP_PKTIO_DPDK) && ODP_PKTIO_DPDK == 1 enable_link_dpdk_pktio_ops = 1; #endif -#ifdef ODP_PKTIO_IPC +#if defined(ODP_PKTIO_IPC) && ODP_PKTIO_IPC == 1 enable_link_ipc_pktio_ops = 1; #endif enable_link_loopback_pktio_ops = 1; -#ifdef ODP_NETMAP +#if defined(ODP_NETMAP) && ODP_NETMAP == 1 enable_link_netmap_pktio_ops = 1; #endif -#ifdef HAVE_PCAP +#if defined(HAVE_PCAP) && HAVE_PCAP == 1 enable_link_pcap_pktio_ops = 1; #endif -#ifdef ODP_PKTIO_SOCKET +#if defined(ODP_PKTIO_SOCKET) && ODP_PKTIO_SOCKET == 1 enable_link_socket_pktio_ops = 1; #endif -#ifdef ODP_PKTIO_SOCKET_MMAP +#if defined(ODP_PKTIO_SOCKET_MMAP) && ODP_PKTIO_SOCKET_MMAP == 1 enable_link_socket_mmap_pktio_ops = 1; #endif -#ifdef ODP_PKTIO_TAP +#if defined(ODP_PKTIO_TAP) && ODP_PKTIO_TAP == 1 enable_link_tap_pktio_ops = 1; #endif -#ifdef ODP_MDEV +#if defined(ODP_MDEV) && ODP_MDEV == 1 enable_link_i40e_pktio_ops = 1; #endif } diff --git a/platform/linux-generic/pktio/tap.c b/platform/linux-generic/pktio/tap.c index bb404d914..81eaffef4 100644 --- a/platform/linux-generic/pktio/tap.c +++ b/platform/linux-generic/pktio/tap.c @@ -6,7 +6,7 @@ #include "config.h" -#ifdef ODP_PKTIO_TAP +#if defined(ODP_PKTIO_TAP) && ODP_PKTIO_TAP == 1 /** * @file