From patchwork Fri Oct 27 12:50:03 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: 117342 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp770578qgn; Fri, 27 Oct 2017 06:25:33 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TEEPBpTFWzX0MNZ+akhsJlfjfta7TZTgE1HmCukR3VGvi3mMM4LDMumIjcux1qwdS/GkcJ X-Received: by 10.200.47.77 with SMTP id k13mr809607qta.298.1509110733286; Fri, 27 Oct 2017 06:25:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509110733; cv=none; d=google.com; s=arc-20160816; b=0fRpgly1qZZwZKsKbMZFtAe4q0imStljlFyyZpLoamO2mjGH13yl29qVYzHIwY39lh ih2WkjUGd+XfDzk8xArqacQS6lTs2+SYmFz7L0Y9sCWPG+KUDgXaqI4CqDskQPZTojrA Vfc1U91O076bFdFXkA54X4rFfb45/g/0rKAaqf2etK/Uu3yhHo391vj4bLsziGf38rDX H4CQCtSWHfiwcmHED1qBtLZFK/0otRKGWpcIv4NZm41X5IjH9ItzAS2A0BfSKipDIK2A bUxudrcbysa412zvWnRXGUU5skaJ0cEm3Xqsj7DwGk0VLTKzhLIMh9kQ02MtC+kuN1YP hK4Q== 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=vMUzwVbAxluG9+D9cNsetZ4CBz+CB1iPPkbQ/4uvtGgM/xYjoNk4L4Q+iIojczMHWK NmgMiZnjjJe3B+bh6DxbMBNMWtzXvJ1QwnV+SSmtAO5oOUC/pA4JOH9eGCMlWHjht5zK 6tElgXJcXYtJOJ/j8XMeCn2a9Ta8dNshUu/l8ReRq/PII7MMzBObU5wrK9gVRxZmuYfk 9CreE0IdnUyGlApFlEh4oczAq3ZZmgoEJxtmh/h1TY2unmvST389LctJMg2LQxb/Eot8 /gkcLYiS3gICyJHevKQOuZWilR23c1X2D5TlbKyAPSOznfG576zc4uXI9dxjDFGMXNoL aeQA== 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 n123si336578qkd.423.2017.10.27.06.25.32; Fri, 27 Oct 2017 06:25:33 -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 CB8A062A3B; Fri, 27 Oct 2017 13:25:32 +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 E99BD629A3; Fri, 27 Oct 2017 12:54:20 +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 11AFE62956; Fri, 27 Oct 2017 12:53:14 +0000 (UTC) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by lists.linaro.org (Postfix) with ESMTPS id 08DCD62955 for ; Fri, 27 Oct 2017 12:50:45 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id k40so7304401lfi.4 for ; Fri, 27 Oct 2017 05:50:44 -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=PeFS8hOw6X/208doCyZoxLFMB1neywTIKf7pCnQOKZMj6lqB+CSS72uyj++oNt9tx4 R1YXj/cXjwrcCZGzxPbQrXRMBMXgh50/EDkqQgc1hQvtETonRmwxcYes5qh13zSqZf5K yGvyoRBkISk3EcAX3e3EqnRz8IGHAazAOhh4LnEOhAXfxw8DarHfQdOMlrfXD0MM8y70 enOAprNrPMDA8sTYbGEgTZ0SjYaimCSb5mi9OOyVxbTDJe0+fQlEmIZHjKvWOCfaVnG0 MlODzlJm4MNd2lphtjQDoTZ6rYfraSTcVLx+tXyOVZ+3l3zIQ108U0A9uSsGFt1x/x/S y2YQ== X-Gm-Message-State: AMCzsaVTVOUX2qKZKY9dwJaOHjAY+SZCRqUvWIk8J3iUWoKCtugV3GqV fJz+Oo8jZKxL1cx56gMpfpMc/gkZccXB9Q== X-Received: by 10.46.47.7 with SMTP id v7mr149930ljv.192.1509108643654; Fri, 27 Oct 2017 05:50:43 -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.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Oct 2017 05:50:42 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Fri, 27 Oct 2017 15:50:03 +0300 Message-Id: <20171027125014.27313-20-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 19/30] 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