From patchwork Mon Oct 23 11:10:55 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: 116726 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4565904qgn; Mon, 23 Oct 2017 05:05:26 -0700 (PDT) X-Received: by 10.55.42.136 with SMTP id q8mr16870561qkq.86.1508760325857; Mon, 23 Oct 2017 05:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508760325; cv=none; d=google.com; s=arc-20160816; b=Cew2t74UlZR8dOnL1UkA0Yv/ta8PSslHqBHF6IptfukapYOtSFvoo/wJ7SHQs+cgRz zlLogIrfS3q7fPy1eBDjCTGzlYsp6IuQrFoP5GTkbj69IHIXOW4NUWOJh386jZBqzAXi e0iAgzY6u2eMr1P0A5loylnmosHKP3YYEm+q94k8q3xB+yIA5CftOam7U4961RMeWcNz LAPIxg8VjWwkGIieE4ZbZQsD4PJyN9AfFVNdvMDXSvKaUSrsBzspA6gL+JLgXBTlWjgJ UKbJV9cM4HfJld3tEQmmmA+FCptRGjUcOMju8xKPojXPCmvz3lT+X099erVR6TwGIsqA 5eSQ== 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=iWL6WK+5cLkO9rYP7aQ701dSyzkqWIztsZNmdISes8LgLUKqDklBPCYSr72rYfzrrl YEUtE7/HxjuHecfQvsG+7VO6XlAOwoBYdzzepwO6wp6aWWpSbOZcvn/0QDbWMt8QdZT/ XLgCDSa7FDvOz1yPY4/pBAGHbsa3uWSOHMieQ36Ue7KDw1vgm9ZbnGy4u4p5vGsxGDMf 9ihc1azCG5OUyO+YqeLpTbv3qqHPUwa/5p6l6qiOK90x6238Iscbp4H4J5OIuDdCguDV AWiDpfaQx4NrqIOehwbhOQQPh2bYoVqUMLEen3debeEtYeA5FCqMiRyN6fYulEf6VnoV 6gZA== 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 f15si6199287qkf.11.2017.10.23.05.05.25; Mon, 23 Oct 2017 05:05:25 -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 4CDCF6299A; Mon, 23 Oct 2017 12:05:25 +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 29CC1622A0; Mon, 23 Oct 2017 11:18:08 +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 A52716229C; Mon, 23 Oct 2017 11:17:39 +0000 (UTC) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by lists.linaro.org (Postfix) with ESMTPS id 8F2056229D for ; Mon, 23 Oct 2017 11:11:42 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id g70so19665367lfl.3 for ; Mon, 23 Oct 2017 04:11:42 -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=YlsKTKOsRCyFe74EHNPC6nmjdM30DsHIXh/LC11WndCLiADyWCqx7e6O5fDSTTuCAz TXvM0IFZ9a+MggI1/Mrye8Ldo407j29bH+Hfa3DNtfBwV4JgLwfGiW9n+5FWX8Jvtr4Y gvcoIcGV2qrVsxGn+MWzZh68dOe1WRWdIkXX17opoSZVj2SATscUSa5FadQT3maGsz5p SxjoUyveqr9E6KvOxgEn6vMsoEufhIiUh0nPqYY3Tp4TRxf9LZgbYYC+mUBpMj2EEGUg v5/rT5QQ1PcZW+QkMP3qYq/2gEC8OG7BiISIuyyQwiP41M5QPsjW/SioGPyzbYpKdQOd bNCA== X-Gm-Message-State: AMCzsaVnvAE+Kc7TkjXVFrU9lh3p4RB7tJ0zXZGdGKfL7rW/pLrquaKV 7DbzMCSGXfLhCoAJXT0RUh51LK0kA0K6jA== X-Google-Smtp-Source: ABhQp+Sd6G1J2QZGl0bFzbhNdlaSOH4KexXywGFVGYqeI4aVuo1O0Id6A59IQlLz457MKIe0pwwdKQ== X-Received: by 10.46.82.16 with SMTP id g16mr5466784ljb.131.1508757101082; Mon, 23 Oct 2017 04:11:41 -0700 (PDT) Received: from rhovanion.lumag.spb.ru ([94.25.228.135]) by smtp.gmail.com with ESMTPSA id i66sm1854643lji.51.2017.10.23.04.11.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 04:11:40 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Mon, 23 Oct 2017 14:10:55 +0300 Message-Id: <20171023111057.6328-28-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171023111057.6328-1-dmitry.ereminsolenikov@linaro.org> References: <20171023111057.6328-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH 27/29] 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