From patchwork Fri Oct 27 12:50:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 117358 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp785978qgn; Fri, 27 Oct 2017 06:40:57 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Q6E012aRyol5DqBhq8/5mDJY69fv+ugPfoQWsCWcNi5T7/TQCgMmtOvd3gKLX706EsBXsl X-Received: by 10.107.133.85 with SMTP id h82mr674257iod.208.1509111657029; Fri, 27 Oct 2017 06:40:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509111657; cv=none; d=google.com; s=arc-20160816; b=M5zB7cZO9aLjsq6Vs0Mc8eltYFvP5R7DiFcROwbgbS1MwdkNGajsNVKiGExji3wEYx kEF/C+2IEVD3WNDHqZShPxE0X84XQbVd9ll/zSrTwYmCpzzyWGRr6wJVta5tTP4q70zI CoZ6Z6baz/7MngQ1UrcVz/WusK02trYiHuLCoe6mJ4QqQjdgRcUwRVlfwfI/ltV6B7tJ A6bg/a8TOB7+9SkhU+a1j1XMWbud2x/TSMaq8AMKsIGJ8UIr4vW4DYvBSnDThmlLtFYq YL18WJynqwPJuGxCr65VV6k0WgFVbJRuReURChuizJWdPr8Bm+PwvA6wH8fwlR3Atz8i loXQ== 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:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=ahXInwELJ7a/Lp58m3Xfmmb5mdXimec3O+AfBXhhQa4=; b=dlMun4/tB9kQ8G02F2vufrCRy84rQqW2iAXCzu3BIy336vQBBvI2lQGXhOy5k9s+dt vJf2VcqQepfWXJGNNtUurccrgwBI9595BIxmS6pB95OobKWmLTBoXZ4hjRRXvNkH1X2T gAH5KsbydGjSc8B/oBaTOUt02eauamQGPoPBH7bsLOXhLUrMFEj+4ReHhnpvE57y6+Oa 2q39/fBS8fyawQPefMfLMNJEq0LG+uVFWc8wNHQ4WmIWZETFSnnzV4BK7GOrMie0IYZF zV2zyzRiAykdDdhTAzeDgwsrr2lJm0bafIrpsbdEejU7bruHFSqoeRewpLTNA1y4cl8e UmWA== 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 16si1289961ita.152.2017.10.27.06.40.56; Fri, 27 Oct 2017 06:40:57 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 85E53629C4; Fri, 27 Oct 2017 13:40:56 +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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, 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 868DF629E3; Fri, 27 Oct 2017 12:55:57 +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 63B64629E3; Fri, 27 Oct 2017 12:55:51 +0000 (UTC) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by lists.linaro.org (Postfix) with ESMTPS id 105CB6296F for ; Fri, 27 Oct 2017 12:50:54 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id a132so7299875lfa.7 for ; Fri, 27 Oct 2017 05:50:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=ahXInwELJ7a/Lp58m3Xfmmb5mdXimec3O+AfBXhhQa4=; b=geqAt24o+TIqKRoRQUin3qpgWyi7YEoV8gCjedFvhYTrpEwLU7hYk73nqfo6CyLjTj 5Gb4WRb8ON6Fk0mDa7y3utKs5Zc5noOnlCwWRCLxCoiXFI82KnXmN8iVe5bNBO7KKFwO 4MnhVnVlNzZDP71nCY55R7C/ntl15fkrh9+vngSbZQAgPLkM7t3hQIJlbHItiBpNteWG rBqlHMXDGRTcjlgKyTSZIcAnzF0P/lhRjJy9Pq4HreJsuktGFLuO6TNST/xUuMJ4wDBG b2gdqyGetVKBYExI4V5nOZH1AD3+vo2V4P71Qnwwh9VLl/ysbCEbvvq/Zi6WcpuixY30 mi5g== X-Gm-Message-State: AMCzsaVvJZzrAVHnKhDYtrHI31VpJGTfrpWskHZ7/xU8oNebKWlA6yGe a/alG9Sr8PxwGJ/WksuSgFJfxlbDHMLMdg== X-Received: by 10.25.202.80 with SMTP id h16mr139935lfj.63.1509108652549; Fri, 27 Oct 2017 05:50:52 -0700 (PDT) Received: from rhovanion.lumag.spb.ru ([94.25.228.222]) by smtp.gmail.com with ESMTPSA id l194sm1584690lfl.11.2017.10.27.05.50.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Oct 2017 05:50:51 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Fri, 27 Oct 2017 15:50:11 +0300 Message-Id: <20171027125014.27313-28-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171027125014.27313-1-dmitry.ereminsolenikov@linaro.org> References: <20171027125014.27313-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH v10 27/30] linux-gen: remove static_inline.h header 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" Replace static_inline.h header with unconditional defines of _ODP_INLINE macro (either to 'static inline' or to empty value) depending on the compilation place. Signed-off-by: Dmitry Eremin-Solenikov --- Makefile.inc | 1 - platform/linux-generic/.gitignore | 1 - platform/linux-generic/Makefile.am | 3 -- .../linux-generic/include-abi/odp/api/abi/atomic.h | 2 +- .../include-abi/odp/api/abi/byteorder.h | 2 +- .../linux-generic/include-abi/odp/api/abi/packet.h | 5 ++- .../include-abi/odp/api/abi/std_clib.h | 2 +- .../linux-generic/include-abi/odp/api/abi/sync.h | 2 +- .../include-abi/odp/api/abi/ticketlock.h | 2 +- .../include/odp/api/plat/packet_inlines.h | 3 +- .../include/odp/api/plat/static_inline.h.in | 43 ---------------------- platform/linux-generic/m4/configure.m4 | 1 - 12 files changed, 10 insertions(+), 57 deletions(-) delete mode 100644 platform/linux-generic/include/odp/api/plat/static_inline.h.in -- 2.14.2 diff --git a/Makefile.inc b/Makefile.inc index 91be46bcb017..9d31dff1da9b 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,5 +1,4 @@ ODP_INCLUDES = \ - -I$(top_builddir)/platform/@with_platform@/include \ -I$(top_srcdir)/platform/@with_platform@/include \ -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \ -I$(top_builddir)/include \ diff --git a/platform/linux-generic/.gitignore b/platform/linux-generic/.gitignore index 442e82a938bb..fd5ade7e304d 100644 --- a/platform/linux-generic/.gitignore +++ b/platform/linux-generic/.gitignore @@ -1,2 +1 @@ -include/odp/api/plat/static_inline.h libodp-linux.pc diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 3c1551aab7a6..0a49fe67e03b 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -38,9 +38,6 @@ odpapiplatinclude_HEADERS = \ include/odp/api/plat/ticketlock_inlines.h \ include/odp/api/plat/ticketlock_inlines_api.h -nodist_odpapiplatinclude_HEADERS = \ - include/odp/api/plat/static_inline.h - if !ODP_ABI_COMPAT odpapiabiarchincludedir= $(includedir)/odp/api/abi odpapiabiarchinclude_HEADERS = \ diff --git a/platform/linux-generic/include-abi/odp/api/abi/atomic.h b/platform/linux-generic/include-abi/odp/api/abi/atomic.h index 0b7b254ced23..67127aa4d64e 100644 --- a/platform/linux-generic/include-abi/odp/api/abi/atomic.h +++ b/platform/linux-generic/include-abi/odp/api/abi/atomic.h @@ -63,7 +63,7 @@ typedef struct odp_atomic_u32_s odp_atomic_u32_t; * @{ */ -#include +#define _ODP_INLINE static inline #include /** diff --git a/platform/linux-generic/include-abi/odp/api/abi/byteorder.h b/platform/linux-generic/include-abi/odp/api/abi/byteorder.h index 0f8fac0b16c8..da07c0eb0b87 100644 --- a/platform/linux-generic/include-abi/odp/api/abi/byteorder.h +++ b/platform/linux-generic/include-abi/odp/api/abi/byteorder.h @@ -75,7 +75,7 @@ typedef uint64_t __odp_bitwise odp_u64be_t; typedef uint16_t __odp_bitwise odp_u16sum_t; typedef uint32_t __odp_bitwise odp_u32sum_t; -#include +#define _ODP_INLINE static inline #include /** diff --git a/platform/linux-generic/include-abi/odp/api/abi/packet.h b/platform/linux-generic/include-abi/odp/api/abi/packet.h index 31d446f8dd9f..1aa7cbd5838e 100644 --- a/platform/linux-generic/include-abi/odp/api/abi/packet.h +++ b/platform/linux-generic/include-abi/odp/api/abi/packet.h @@ -32,6 +32,9 @@ typedef ODP_HANDLE_T(odp_packet_t); typedef uint8_t odp_packet_seg_t; +/* or it will be provided by packet_inlines.h */ +#define _ODP_HAVE_PACKET_SEG_NDX 1 + static inline uint8_t _odp_packet_seg_to_ndx(odp_packet_seg_t seg) { return (uint8_t)seg; @@ -53,7 +56,7 @@ typedef enum { #define ODP_NUM_PACKET_COLORS 3 -#include +#define _ODP_INLINE static inline #include #include diff --git a/platform/linux-generic/include-abi/odp/api/abi/std_clib.h b/platform/linux-generic/include-abi/odp/api/abi/std_clib.h index b31034df4705..8ef9e9ad22c8 100644 --- a/platform/linux-generic/include-abi/odp/api/abi/std_clib.h +++ b/platform/linux-generic/include-abi/odp/api/abi/std_clib.h @@ -17,7 +17,7 @@ extern "C" { #endif -#include +#define _ODP_INLINE static inline #include #ifdef __cplusplus diff --git a/platform/linux-generic/include-abi/odp/api/abi/sync.h b/platform/linux-generic/include-abi/odp/api/abi/sync.h index 74e3fb15fef9..9ecc40f227c7 100644 --- a/platform/linux-generic/include-abi/odp/api/abi/sync.h +++ b/platform/linux-generic/include-abi/odp/api/abi/sync.h @@ -21,7 +21,7 @@ extern "C" { * @{ */ -#include +#define _ODP_INLINE static inline #include /** diff --git a/platform/linux-generic/include-abi/odp/api/abi/ticketlock.h b/platform/linux-generic/include-abi/odp/api/abi/ticketlock.h index 958184be6907..87358d2afe1d 100644 --- a/platform/linux-generic/include-abi/odp/api/abi/ticketlock.h +++ b/platform/linux-generic/include-abi/odp/api/abi/ticketlock.h @@ -31,7 +31,7 @@ typedef struct odp_ticketlock_s { } odp_ticketlock_t; /* Include inlined versions of API functions */ -#include +#define _ODP_INLINE static inline #include #include diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_inlines.h index 48475ba823e8..2419404c32f0 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h @@ -25,8 +25,7 @@ /** @internal Inline function offsets */ extern const _odp_packet_inline_offset_t _odp_packet_inline; -#include -#if ODP_ABI_COMPAT == 1 +#ifndef _ODP_HAVE_PACKET_SEG_NDX #include /** @internal Inline function @param seg @return */ static inline uint32_t _odp_packet_seg_to_ndx(odp_packet_seg_t seg) diff --git a/platform/linux-generic/include/odp/api/plat/static_inline.h.in b/platform/linux-generic/include/odp/api/plat/static_inline.h.in deleted file mode 100644 index 3cf0043478f3..000000000000 --- a/platform/linux-generic/include/odp/api/plat/static_inline.h.in +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2016, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * Macro for static inline functions - */ - -#ifndef ODP_PLAT_STATIC_INLINE_H_ -#define ODP_PLAT_STATIC_INLINE_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @internal - * @def ODP_ABI_COMPAT - * Control ABI compatibility - */ - -/** - * @internal - * @def _ODP_INLINE - * Define a function as inlined or not inlined (for ABI compatibility) - */ -#if @ODP_ABI_COMPAT@ -#define ODP_ABI_COMPAT 1 -#define _ODP_INLINE -#else -#define ODP_ABI_COMPAT 0 -#define _ODP_INLINE static inline -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index f4504bf98e45..e605f6281806 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -22,7 +22,6 @@ AM_CONDITIONAL([PLATFORM_IS_LINUX_GENERIC], [test "${with_platform}" = "linux-generic"]) AC_CONFIG_FILES([platform/linux-generic/Makefile platform/linux-generic/libodp-linux.pc - platform/linux-generic/include/odp/api/plat/static_inline.h platform/linux-generic/test/Makefile platform/linux-generic/test/validation/api/shmem/Makefile platform/linux-generic/test/validation/api/pktio/Makefile