From patchwork Mon Oct 23 11:10:47 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: 116719 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4548638qgn; Mon, 23 Oct 2017 04:47:35 -0700 (PDT) X-Received: by 10.55.94.65 with SMTP id s62mr1328984qkb.282.1508759255363; Mon, 23 Oct 2017 04:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508759255; cv=none; d=google.com; s=arc-20160816; b=LHFlsGGpENCX/FDGuWq28lzDkqjIc0HleF4ivCaLwQOH8bJcgUUO50/1TyrvqgknvD DpZypNdII3dt6gajP5YKQ9FhyCllWCU9LYcndBC7wyTvidH53Qb+Iqy18QzRzjXxcWxp i03NfdCMJ6OVXlVIw7uAT3RH38zBST9i7/CoQuLC3LBUuZazgFoDF8nZiK9Ak3whDk0h Hf1CkYXa+KU0p0r4psgEcUWIZhWdUjfs0BggqE1tS0XrHzPixHEVohCbgmvAfbo1M1Yx cOUZqAP2vLYsSfoXP/+UsJTa5gSKiah4myHscPesrwEhBsFO2yXP22gKZg4BcJG9ZA04 /uWg== 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=38W5S+mPqSKxreDRGJwPRkK2sCXU57RY8NqX7eQZ7To=; b=rb8Ixb2PrpZHDiAMsDWnOml5sk9Z2GQM+15RWMRkGtTyuo75RXyGP7pXLGXWle79gp Cmwuwmz0t+OIWxmhCGLFr6LF2A4F9NQlPw96gJtmgi8m66sRNo7AYllRxqD0aOEieyHH Z04gj176vaZ5Dsijujlpc9u0iJirFXOSpEMlR03LM940LFOXNLttU+DLXEPbvqNnPZvI UC9RaC8QOaTeXq1K+a7CiookKsA5NUyfBs9YyxDvo5X970dDhhO5XZL0B2aefVDrwaHU ouxX2DegG/s41MuErWe3LJ4PGEQja05YvlPbOHaRh83G/gYHL+qgvY7QlM3JIn3jfEls fMCg== 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 d128si1426903qkf.110.2017.10.23.04.47.35; Mon, 23 Oct 2017 04:47:35 -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 1598B62964; Mon, 23 Oct 2017 11:47:35 +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 8FDDA628B9; Mon, 23 Oct 2017 11:15:13 +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 41E5162874; Mon, 23 Oct 2017 11:14:25 +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 0F40C62292 for ; Mon, 23 Oct 2017 11:11:30 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id a69so19668424lfe.5 for ; Mon, 23 Oct 2017 04:11:29 -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=38W5S+mPqSKxreDRGJwPRkK2sCXU57RY8NqX7eQZ7To=; b=i0uCfrfp2nRM2xHWP3FGlK1K6BZVeCOWF6OogW0VSx5KZMzSMKWxuT82tF7sg6Qgyp p58dN4NVC7izHrE02wqwEiMgrO1yJ8NxAAR3jVq0LAk7gqGE7zxB8f2KWxbyeHNip7Qy EewjujA5eYyQ7RtxYnyZjXdL4slYgbyeNGLRMwH5PNASHp9yVyo9drZoZIpNSpIVrvnX t6ImyM7gVtCrKZmbCpOzgC9pxWpXV3/WBqWoBqNiUD6GKp9M8FY/0voGYYd+eetUQ4mz erboGnChhPJJmBfRr1Pqglkmy8h3PLAFn+N5f+9Lc6iC3W4SLVCGqxiOOOSzuKfrOFOv +wVA== X-Gm-Message-State: AMCzsaUmxylW3RYI/giksp7ROFTIR/VYwf7sluYHs0zqeQWGtZM2PCLa wDVqs8Xmi2YnEAb8tJYM6xLoLwoJ1mWdTA== X-Google-Smtp-Source: ABhQp+QmJUmX2upCBBPfDAPh33GKT++bjkdPbit7q7cPBjO7YbxLuGK9xkapyxbqu/hF6nJmB1gEjw== X-Received: by 10.25.38.21 with SMTP id m21mr4209312lfm.95.1508757088570; Mon, 23 Oct 2017 04:11:28 -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.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 04:11:27 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Mon, 23 Oct 2017 14:10:47 +0300 Message-Id: <20171023111057.6328-20-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 19/29] linux-gen, include: switch byteorder.h to api+abi 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" Signed-off-by: Dmitry Eremin-Solenikov --- include/Makefile.am | 1 + include/odp/api/byteorder.h | 28 ++++++++++++++ platform/linux-generic/Makefile.am | 3 +- .../odp/api/abi/byteorder.h} | 15 +++++--- platform/linux-generic/include/odp/api/byteorder.h | 43 ---------------------- .../include/odp/api/plat/byteorder_inlines.h | 6 +++ platform/linux-generic/odp_byteorder.c | 1 + 7 files changed, 47 insertions(+), 50 deletions(-) create mode 100644 include/odp/api/byteorder.h rename platform/linux-generic/{include/odp/api/plat/byteorder_types.h => include-abi/odp/api/abi/byteorder.h} (84%) delete mode 100644 platform/linux-generic/include/odp/api/byteorder.h -- 2.14.2 diff --git a/include/Makefile.am b/include/Makefile.am index d1eb26bc59c2..229f47fc7173 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -8,6 +8,7 @@ odpapiinclude_HEADERS = \ odp/api/atomic.h \ odp/api/barrier.h \ odp/api/buffer.h \ + odp/api/byteorder.h \ odp/api/cpumask.h \ odp/api/event.h \ odp/api/init.h \ diff --git a/include/odp/api/byteorder.h b/include/odp/api/byteorder.h new file mode 100644 index 000000000000..cbb45429943a --- /dev/null +++ b/include/odp/api/byteorder.h @@ -0,0 +1,28 @@ +/* Copyright (c) 2014, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP byteorder + */ + +#ifndef ODP_API_BYTEORDER_H_ +#define ODP_API_BYTEORDER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 304ca86862f3..966fc13f5c02 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -20,7 +20,6 @@ odpinclude_HEADERS = \ odpapiincludedir= $(includedir)/odp/api odpapiinclude_HEADERS = \ include/odp/api/align.h \ - include/odp/api/byteorder.h \ include/odp/api/chksum.h \ include/odp/api/classification.h \ include/odp/api/compiler.h \ @@ -47,7 +46,6 @@ odpapiplatincludedir= $(includedir)/odp/api/plat odpapiplatinclude_HEADERS = \ include/odp/api/plat/atomic_inlines.h \ include/odp/api/plat/byteorder_inlines.h \ - include/odp/api/plat/byteorder_types.h \ include/odp/api/plat/packet_flag_inlines.h \ include/odp/api/plat/packet_flag_inlines_api.h \ include/odp/api/plat/packet_inlines.h \ @@ -69,6 +67,7 @@ odpapiabiarchinclude_HEADERS = \ include-abi/odp/api/abi/atomic.h \ include-abi/odp/api/abi/barrier.h \ include-abi/odp/api/abi/buffer.h \ + include-abi/odp/api/abi/byteorder.h \ include-abi/odp/api/abi/classification.h \ include-abi/odp/api/abi/cpumask.h \ include-abi/odp/api/abi/crypto.h \ diff --git a/platform/linux-generic/include/odp/api/plat/byteorder_types.h b/platform/linux-generic/include-abi/odp/api/abi/byteorder.h similarity index 84% rename from platform/linux-generic/include/odp/api/plat/byteorder_types.h rename to platform/linux-generic/include-abi/odp/api/abi/byteorder.h index 20d52bf8fa6b..0f8fac0b16c8 100644 --- a/platform/linux-generic/include/odp/api/plat/byteorder_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/byteorder.h @@ -10,23 +10,25 @@ * ODP byteorder */ -#ifndef ODP_BYTEORDER_TYPES_H_ -#define ODP_BYTEORDER_TYPES_H_ +#ifndef ODP_API_ABI_BYTEORDER_H_ +#define ODP_API_ABI_BYTEORDER_H_ #ifdef __cplusplus extern "C" { #endif +#include + #ifndef __BYTE_ORDER__ -#error __BYTE_ORDER not defined! +#error __BYTE_ORDER__ not defined! #endif #ifndef __ORDER_BIG_ENDIAN__ -#error __BIG_ENDIAN not defined! +#error __ORDER_BIG_ENDIAN__ not defined! #endif #ifndef __ORDER_LITTLE_ENDIAN__ -#error __LITTLE_ENDIAN not defined! +#error __ORDER_LITTLE_ENDIAN__ not defined! #endif /* for use with type checkers such as sparse */ @@ -73,6 +75,9 @@ 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 +#include + /** * @} */ diff --git a/platform/linux-generic/include/odp/api/byteorder.h b/platform/linux-generic/include/odp/api/byteorder.h deleted file mode 100644 index ec3d0eef763a..000000000000 --- a/platform/linux-generic/include/odp/api/byteorder.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2014, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP byteorder - */ - -#ifndef ODP_PLAT_BYTEORDER_H_ -#define ODP_PLAT_BYTEORDER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/** @ingroup odp_compiler_optim - * @{ - */ - -#include -#if ODP_ABI_COMPAT == 0 -#include -#endif - -/** - * @} - */ - -#include - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/byteorder_inlines.h b/platform/linux-generic/include/odp/api/plat/byteorder_inlines.h index e7818904b11a..6f3139628ebd 100644 --- a/platform/linux-generic/include/odp/api/plat/byteorder_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/byteorder_inlines.h @@ -17,6 +17,12 @@ extern "C" { #endif +#ifndef __odp_force +#define __odp_force +#endif + +#include + /** @ingroup odp_compiler_optim * @{ */ diff --git a/platform/linux-generic/odp_byteorder.c b/platform/linux-generic/odp_byteorder.c index a3d1f981e965..faf1c5904bb4 100644 --- a/platform/linux-generic/odp_byteorder.c +++ b/platform/linux-generic/odp_byteorder.c @@ -7,6 +7,7 @@ #include "config.h" #include +#include #if ODP_ABI_COMPAT == 1 #include #endif