From patchwork Mon Oct 23 11:10:43 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: 116716 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4544256qgn; Mon, 23 Oct 2017 04:41:50 -0700 (PDT) X-Received: by 10.55.19.228 with SMTP id 97mr17367299qkt.271.1508758910062; Mon, 23 Oct 2017 04:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508758910; cv=none; d=google.com; s=arc-20160816; b=KAYWKCQvpg8HhxI8fVsuh0Auzm/cfdFgt62XDMrifp8KzvtCH99pY8fmGxl6iVetpf qWVwo5tKOMiEQwAt+S3XOXz+4BfUd89f9HssZ6wKOB2nlyUraIcJl2i24M4WIIFb9s69 m69gMmoux2cyRUWKdfiXqgVNlg9WcipsyIp+pH/bpOIofqDx6eW0rjCLbQxZtTfPhutv fM1gOmDD/fjYFSjn4ZFupOe08UZ2yP7m1qbAAIdq2L6Twl9akY5YNsZi1MKwDfCxKSbi UmxjxiEdK0auFHzk6NgS31cIfq4d2wRvaU03I6feBDV1idlR7DstVJXLy9bFEtoGiYWp JnGg== 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=71VpIYO+kLBHdtOFK/qtX1fkOBw/2IqxrfXXt6fGtps=; b=VJE2kKhSVZ7Bjo+VUn23mnQo9Xmm0OeP/MsbVqgPAGkoug+II+ZGzm5IPNjxf1tI9J VcxgG7+q+aUOJOyVqtNMGY9VItZUBf0zxFwme1Q755YbtEVblyC1POsuYftDEUX6TAE9 9ecj7netN5NekGM2SUNxHT7iAFzIphewJKX4FZAI7GWoVjXLuZfK1hUZSuwrzqrJ+u+n SzcotrjwFS9UHKwoEKbiexygkO5mOyS/12CdfSjJ6z/LpjC0a+eQO3t8OwR9Q9G7vdcs ACY9LCc7wPpkXNwOb/HJBR163ONpOPmulTtv3/Lvt2SlNGpyeDCdG44hZVUpj4UybYYz PrNg== 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 p25si3565541qte.430.2017.10.23.04.41.49; Mon, 23 Oct 2017 04:41:49 -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 7BFF762940; Mon, 23 Oct 2017 11:41:49 +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 973906289E; Mon, 23 Oct 2017 11:14:49 +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 6C0AE622D8; Mon, 23 Oct 2017 11:13:20 +0000 (UTC) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by lists.linaro.org (Postfix) with ESMTPS id 1F20F61DF6 for ; Mon, 23 Oct 2017 11:11:25 +0000 (UTC) Received: by mail-lf0-f67.google.com with SMTP id k40so19658559lfi.4 for ; Mon, 23 Oct 2017 04:11:25 -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=71VpIYO+kLBHdtOFK/qtX1fkOBw/2IqxrfXXt6fGtps=; b=M1Acd1DIo8DbGcJbGX5L5RTE4aqzCJ/SDp8VVL/ygIRQGQft8UVBfOhaVG0U+/AJKK tmse83p/cZOilfhlltHj+U6LDut48yGyPBG4xGtCjsxroEiwNEIHR668jvrc+KVg3fpL Km3IGpdBqDcLpKWhsnjkgPX81+wFsKyHtdI3WZPDXCPU71V+YVsJLV//99Bw9M4kHBtl EJF1jZWGv21ygS1ZMA6CkGKE+cIpDpze0eTllNFHllcuKkvikoEC9jesGCt2la/oAZZ8 BRjb+32Db9Wrucfe0I4MgYd0MzCmA3kurzLVAYV2joIpjzATZiHDNBpqO8tOD0RTZwly LRBQ== X-Gm-Message-State: AMCzsaUa5c6R0/wSsz8GmWhW0kEHATijWPkiUudDkheouEeKxUfSIgkz zrMFq0EB7UyPQy7XoifcUx2kT0JdK19yJA== X-Google-Smtp-Source: ABhQp+RZIZol41bQR9vJ+d2rmCGmPojlZafQEabCb+ELIx1uhq6LzDeDC/Ju2IpLeNTYlAFQTmLNWw== X-Received: by 10.46.56.14 with SMTP id f14mr5803012lja.46.1508757082913; Mon, 23 Oct 2017 04:11:22 -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.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 04:11:21 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Mon, 23 Oct 2017 14:10:43 +0300 Message-Id: <20171023111057.6328-16-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 15/29] linux-gen, include: for several simple headers switch to api+abi pattern 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" Start simplifying platform headers by using same include paths for ABI-compat and non-ABI-compat modes. In either case there will be header (provided either by generic includes, or by platform itself). In case of non-ABI-compat mode, this header provides runtime-optimized versions of some functions, etc. Signed-off-by: Dmitry Eremin-Solenikov --- Makefile.inc | 3 + include/Makefile.am | 17 ++ .../include => include}/odp/api/cpumask.h | 6 +- .../include => include}/odp/api/init.h | 14 +- .../include => include}/odp/api/rwlock.h | 6 +- .../include => include}/odp/api/rwlock_recursive.h | 6 +- .../include => include}/odp/api/schedule.h | 15 +- .../include => include}/odp/api/schedule_types.h | 6 +- .../include => include}/odp/api/spinlock.h | 6 +- .../odp/api/spinlock_recursive.h | 6 +- .../include => include}/odp/api/std_types.h | 19 +-- .../include => include}/odp/api/thread.h | 6 +- .../include => include}/odp/api/thrmask.h | 14 +- .../include => include}/odp/api/time.h | 8 +- .../include => include}/odp/api/traffic_mngr.h | 13 +- .../include => include}/odp/api/version.h | 7 +- platform/linux-generic/Makefile.am | 51 +++--- .../odp/api/abi/barrier.h} | 4 +- .../include-abi/odp/api/abi/cpumask.h | 7 + .../linux-generic/include-abi/odp/api/abi/init.h | 7 + .../linux-generic/include-abi/odp/api/abi/rwlock.h | 7 + .../include-abi/odp/api/abi/rwlock_recursive.h | 7 + .../include-abi/odp/api/abi/schedule.h | 7 + .../include-abi/odp/api/abi/schedule_types.h | 7 + .../include-abi/odp/api/abi/spinlock.h | 7 + .../include-abi/odp/api/abi/spinlock_recursive.h | 7 + .../include-abi/odp/api/abi/std_types.h | 7 + .../linux-generic/include-abi/odp/api/abi/thread.h | 7 + .../include-abi/odp/api/abi/thrmask.h | 7 + .../linux-generic/include-abi/odp/api/abi/time.h | 7 + .../include-abi/odp/api/abi/traffic_mngr.h | 7 + .../include-abi/odp/api/abi/version.h | 7 + platform/linux-generic/include/odp/api/barrier.h | 2 +- .../include/odp/api/plat/cpumask_types.h | 54 ------ .../include/odp/api/plat/init_types.h | 35 ---- .../include/odp/api/plat/rwlock_recursive_types.h | 38 ----- .../include/odp/api/plat/rwlock_types.h | 37 ----- .../include/odp/api/plat/schedule_types.h | 64 ------- .../odp/api/plat/spinlock_recursive_types.h | 36 ---- .../include/odp/api/plat/spinlock_types.h | 34 ---- .../include/odp/api/plat/thread_types.h | 34 ---- .../include/odp/api/plat/thrmask_types.h | 48 ------ .../include/odp/api/plat/time_types.h | 53 ------ .../include/odp/api/plat/traffic_mngr_types.h | 185 --------------------- .../include/odp/api/plat/version_types.h | 30 ---- 45 files changed, 187 insertions(+), 768 deletions(-) rename {platform/linux-generic/include => include}/odp/api/cpumask.h (74%) rename {platform/linux-generic/include => include}/odp/api/init.h (64%) rename {platform/linux-generic/include => include}/odp/api/rwlock.h (75%) rename {platform/linux-generic/include => include}/odp/api/rwlock_recursive.h (70%) rename {platform/linux-generic/include => include}/odp/api/schedule.h (63%) rename {platform/linux-generic/include => include}/odp/api/schedule_types.h (71%) rename {platform/linux-generic/include => include}/odp/api/spinlock.h (72%) rename {platform/linux-generic/include => include}/odp/api/spinlock_recursive.h (68%) rename {platform/linux-generic/include => include}/odp/api/std_types.h (54%) rename {platform/linux-generic/include => include}/odp/api/thread.h (74%) rename {platform/linux-generic/include => include}/odp/api/thrmask.h (64%) rename {platform/linux-generic/include => include}/odp/api/time.h (76%) rename {platform/linux-generic/include => include}/odp/api/traffic_mngr.h (62%) rename {platform/linux-generic/include => include}/odp/api/version.h (73%) rename platform/linux-generic/{include/odp/api/plat/barrier_types.h => include-abi/odp/api/abi/barrier.h} (89%) create mode 100644 platform/linux-generic/include-abi/odp/api/abi/cpumask.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/init.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/rwlock.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/rwlock_recursive.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/schedule.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/schedule_types.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/spinlock.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/spinlock_recursive.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/std_types.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/thread.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/thrmask.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/time.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/traffic_mngr.h create mode 100644 platform/linux-generic/include-abi/odp/api/abi/version.h delete mode 100644 platform/linux-generic/include/odp/api/plat/cpumask_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/init_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/rwlock_recursive_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/rwlock_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/schedule_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/spinlock_recursive_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/spinlock_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/thread_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/thrmask_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/time_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h delete mode 100644 platform/linux-generic/include/odp/api/plat/version_types.h -- 2.14.2 diff --git a/Makefile.inc b/Makefile.inc index 11fc7c759c85..91be46bcb017 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -8,6 +8,9 @@ ODP_INCLUDES = \ if ODP_ABI_COMPAT ODP_INCLUDES += \ -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ +else +ODP_INCLUDES += \ + -I$(top_srcdir)/platform/@with_platform@/include-abi endif HELPER_INCLUDES = \ diff --git a/include/Makefile.am b/include/Makefile.am index 9437f5f68d5a..0e39a0d8db5f 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -3,6 +3,23 @@ include_HEADERS = \ odp_api.h \ odp_drv.h +odpapiincludedir= $(includedir)/odp/api/ +odpapiinclude_HEADERS = \ + odp/api/cpumask.h \ + odp/api/init.h \ + odp/api/rwlock.h \ + odp/api/rwlock_recursive.h \ + odp/api/schedule.h \ + odp/api/schedule_types.h \ + odp/api/spinlock.h \ + odp/api/spinlock_recursive.h \ + odp/api/std_types.h \ + odp/api/thread.h \ + odp/api/thrmask.h \ + odp/api/time.h \ + odp/api/traffic_mngr.h \ + odp/api/version.h + odpapispecincludedir= $(includedir)/odp/api/spec odpapispecinclude_HEADERS = \ odp/api/spec/align.h \ diff --git a/platform/linux-generic/include/odp/api/cpumask.h b/include/odp/api/cpumask.h similarity index 74% rename from platform/linux-generic/include/odp/api/cpumask.h rename to include/odp/api/cpumask.h index 325ea52edfbe..f5140df1d351 100644 --- a/platform/linux-generic/include/odp/api/cpumask.h +++ b/include/odp/api/cpumask.h @@ -10,14 +10,14 @@ * ODP CPU masks and enumeration */ -#ifndef ODP_PLAT_CPUMASK_H_ -#define ODP_PLAT_CPUMASK_H_ +#ifndef ODP_API_CPUMASK_H_ +#define ODP_API_CPUMASK_H_ #ifdef __cplusplus extern "C" { #endif -#include +#include #include diff --git a/platform/linux-generic/include/odp/api/init.h b/include/odp/api/init.h similarity index 64% rename from platform/linux-generic/include/odp/api/init.h rename to include/odp/api/init.h index 1d9f59a6f521..af3f1f740b6a 100644 --- a/platform/linux-generic/include/odp/api/init.h +++ b/include/odp/api/init.h @@ -10,22 +10,14 @@ * ODP initialization. */ -#ifndef ODP_PLAT_INIT_H_ -#define ODP_PLAT_INIT_H_ +#ifndef ODP_API_INIT_H_ +#define ODP_API_INIT_H_ #ifdef __cplusplus extern "C" { #endif -#include - -/** @ingroup odp_initialization - * @{ - */ - -/** - * @} - */ +#include #include diff --git a/platform/linux-generic/include/odp/api/rwlock.h b/include/odp/api/rwlock.h similarity index 75% rename from platform/linux-generic/include/odp/api/rwlock.h rename to include/odp/api/rwlock.h index 4a86173f51e1..1aab75965adc 100644 --- a/platform/linux-generic/include/odp/api/rwlock.h +++ b/include/odp/api/rwlock.h @@ -10,14 +10,14 @@ * ODP RW Locks */ -#ifndef ODP_PLAT_RWLOCK_H_ -#define ODP_PLAT_RWLOCK_H_ +#ifndef ODP_API_RWLOCK_H_ +#define ODP_API_RWLOCK_H_ #ifdef __cplusplus extern "C" { #endif -#include +#include #include diff --git a/platform/linux-generic/include/odp/api/rwlock_recursive.h b/include/odp/api/rwlock_recursive.h similarity index 70% rename from platform/linux-generic/include/odp/api/rwlock_recursive.h rename to include/odp/api/rwlock_recursive.h index 4a081532daed..f205f434d20b 100644 --- a/platform/linux-generic/include/odp/api/rwlock_recursive.h +++ b/include/odp/api/rwlock_recursive.h @@ -10,14 +10,14 @@ * ODP resursive read/write lock */ -#ifndef ODP_PLAT_RWLOCK_RECURSIVE_H_ -#define ODP_PLAT_RWLOCK_RECURSIVE_H_ +#ifndef ODP_API_RWLOCK_RECURSIVE_H_ +#define ODP_API_RWLOCK_RECURSIVE_H_ #ifdef __cplusplus extern "C" { #endif -#include +#include #include diff --git a/platform/linux-generic/include/odp/api/schedule.h b/include/odp/api/schedule.h similarity index 63% rename from platform/linux-generic/include/odp/api/schedule.h rename to include/odp/api/schedule.h index 00264851703b..dcdc0ff49e2e 100644 --- a/platform/linux-generic/include/odp/api/schedule.h +++ b/include/odp/api/schedule.h @@ -10,22 +10,15 @@ * ODP schedule */ -#ifndef ODP_PLAT_SCHEDULE_H_ -#define ODP_PLAT_SCHEDULE_H_ +#ifndef ODP_API_SCHEDULE_H_ +#define ODP_API_SCHEDULE_H_ #ifdef __cplusplus extern "C" { #endif -#include - -/** @ingroup odp_scheduler - * @{ - */ - -/** - * @} - */ +#include +#include #include diff --git a/platform/linux-generic/include/odp/api/schedule_types.h b/include/odp/api/schedule_types.h similarity index 71% rename from platform/linux-generic/include/odp/api/schedule_types.h rename to include/odp/api/schedule_types.h index 536007d66ad5..7c347ae464de 100644 --- a/platform/linux-generic/include/odp/api/schedule_types.h +++ b/include/odp/api/schedule_types.h @@ -10,14 +10,14 @@ * ODP schedule */ -#ifndef ODP_PLAT_SCHEDULE_TYPES_H_ -#define ODP_PLAT_SCHEDULE_TYPES_H_ +#ifndef ODP_API_SCHEDULE_TYPES_H_ +#define ODP_API_SCHEDULE_TYPES_H_ #ifdef __cplusplus extern "C" { #endif -#include +#include #include diff --git a/platform/linux-generic/include/odp/api/spinlock.h b/include/odp/api/spinlock.h similarity index 72% rename from platform/linux-generic/include/odp/api/spinlock.h rename to include/odp/api/spinlock.h index 830f4edd2316..0f41216d0259 100644 --- a/platform/linux-generic/include/odp/api/spinlock.h +++ b/include/odp/api/spinlock.h @@ -10,14 +10,14 @@ * ODP spinlock */ -#ifndef ODP_PLAT_SPINLOCK_H_ -#define ODP_PLAT_SPINLOCK_H_ +#ifndef ODP_API_SPINLOCK_H_ +#define ODP_API_SPINLOCK_H_ #ifdef __cplusplus extern "C" { #endif -#include +#include #include diff --git a/platform/linux-generic/include/odp/api/spinlock_recursive.h b/include/odp/api/spinlock_recursive.h similarity index 68% rename from platform/linux-generic/include/odp/api/spinlock_recursive.h rename to include/odp/api/spinlock_recursive.h index d97b0173ac34..23f79db223ff 100644 --- a/platform/linux-generic/include/odp/api/spinlock_recursive.h +++ b/include/odp/api/spinlock_recursive.h @@ -10,14 +10,14 @@ * ODP resursive spinlock */ -#ifndef ODP_PLAT_SPINLOCK_RECURSIVE_H_ -#define ODP_PLAT_SPINLOCK_RECURSIVE_H_ +#ifndef ODP_API_SPINLOCK_RECURSIVE_H_ +#define ODP_API_SPINLOCK_RECURSIVE_H_ #ifdef __cplusplus extern "C" { #endif -#include +#include #include diff --git a/platform/linux-generic/include/odp/api/std_types.h b/include/odp/api/std_types.h similarity index 54% rename from platform/linux-generic/include/odp/api/std_types.h rename to include/odp/api/std_types.h index b61f33f4c55b..c99cbf9796a5 100644 --- a/platform/linux-generic/include/odp/api/std_types.h +++ b/include/odp/api/std_types.h @@ -10,28 +10,15 @@ * Standard C language types and definitions for ODP. */ -#ifndef ODP_PLAT_STD_TYPES_H_ -#define ODP_PLAT_STD_TYPES_H_ +#ifndef ODP_API_STD_TYPES_H_ +#define ODP_API_STD_TYPES_H_ #ifdef __cplusplus extern "C" { #endif -/* uint64_t, uint32_t, etc */ -#include -/* true and false for odp_bool_t */ -#include - -/** @addtogroup odp_system ODP SYSTEM - * @{ - */ - -typedef int odp_bool_t; - -/** - * @} - */ +#include #include diff --git a/platform/linux-generic/include/odp/api/thread.h b/include/odp/api/thread.h similarity index 74% rename from platform/linux-generic/include/odp/api/thread.h rename to include/odp/api/thread.h index c54abc890aa1..85af314beecb 100644 --- a/platform/linux-generic/include/odp/api/thread.h +++ b/include/odp/api/thread.h @@ -10,14 +10,14 @@ * ODP thread API */ -#ifndef ODP_PLAT_THREAD_H_ -#define ODP_PLAT_THREAD_H_ +#ifndef ODP_API_THREAD_H_ +#define ODP_API_THREAD_H_ #ifdef __cplusplus extern "C" { #endif -#include +#include #include diff --git a/platform/linux-generic/include/odp/api/thrmask.h b/include/odp/api/thrmask.h similarity index 64% rename from platform/linux-generic/include/odp/api/thrmask.h rename to include/odp/api/thrmask.h index b1c2077754d5..568beb1c5872 100644 --- a/platform/linux-generic/include/odp/api/thrmask.h +++ b/include/odp/api/thrmask.h @@ -10,22 +10,14 @@ * ODP thread masks */ -#ifndef ODP_PLAT_THRMASK_H_ -#define ODP_PLAT_THRMASK_H_ +#ifndef ODP_API_THRMASK_H_ +#define ODP_API_THRMASK_H_ #ifdef __cplusplus extern "C" { #endif -#include - -/** @ingroup odp_thread - * @{ - */ - -/** - * @} - */ +#include #include diff --git a/platform/linux-generic/include/odp/api/time.h b/include/odp/api/time.h similarity index 76% rename from platform/linux-generic/include/odp/api/time.h rename to include/odp/api/time.h index 8d1c33e68f29..629677d45e45 100644 --- a/platform/linux-generic/include/odp/api/time.h +++ b/include/odp/api/time.h @@ -10,18 +10,16 @@ * ODP time */ -#ifndef ODP_PLAT_TIME_H_ -#define ODP_PLAT_TIME_H_ +#ifndef ODP_API_TIME_H_ +#define ODP_API_TIME_H_ #ifdef __cplusplus extern "C" { #endif #include +#include - - -#include #include #ifdef __cplusplus diff --git a/platform/linux-generic/include/odp/api/traffic_mngr.h b/include/odp/api/traffic_mngr.h similarity index 62% rename from platform/linux-generic/include/odp/api/traffic_mngr.h rename to include/odp/api/traffic_mngr.h index 3e6f5fbbe036..6360ccf9b4f8 100644 --- a/platform/linux-generic/include/odp/api/traffic_mngr.h +++ b/include/odp/api/traffic_mngr.h @@ -10,22 +10,15 @@ * ODP Traffic manager */ -#ifndef ODP_PLAT_TRAFFIC_MNGR_H_ -#define ODP_PLAT_TRAFFIC_MNGR_H_ +#ifndef ODP_API_TRAFFIC_MNGR_H_ +#define ODP_API_TRAFFIC_MNGR_H_ #ifdef __cplusplus extern "C" { #endif -/** @ingroup odp_traffic_mngr - * @{ - */ - -/** - * @} - */ +#include -#include #include #ifdef __cplusplus diff --git a/platform/linux-generic/include/odp/api/version.h b/include/odp/api/version.h similarity index 73% rename from platform/linux-generic/include/odp/api/version.h rename to include/odp/api/version.h index fc4ea5865590..35c844e703cb 100644 --- a/platform/linux-generic/include/odp/api/version.h +++ b/include/odp/api/version.h @@ -10,14 +10,15 @@ * ODP version */ -#ifndef ODP_PLAT_VERSION_H_ -#define ODP_PLAT_VERSION_H_ +#ifndef ODP_API_VERSION_H_ +#define ODP_API_VERSION_H_ #ifdef __cplusplus extern "C" { #endif -#include +#include + #include #ifdef __cplusplus diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 703b12c702ea..4f47b277de29 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -28,7 +28,6 @@ odpapiinclude_HEADERS = \ include/odp/api/compiler.h \ include/odp/api/chksum.h \ include/odp/api/cpu.h \ - include/odp/api/cpumask.h \ include/odp/api/crypto.h \ include/odp/api/debug.h \ include/odp/api/deprecated.h \ @@ -37,7 +36,6 @@ odpapiinclude_HEADERS = \ include/odp/api/feature.h \ include/odp/api/hash.h \ include/odp/api/hints.h \ - include/odp/api/init.h \ include/odp/api/ipsec.h \ include/odp/api/packet_flags.h \ include/odp/api/packet.h \ @@ -46,39 +44,24 @@ odpapiinclude_HEADERS = \ include/odp/api/pool.h \ include/odp/api/queue.h \ include/odp/api/random.h \ - include/odp/api/rwlock.h \ - include/odp/api/rwlock_recursive.h \ - include/odp/api/schedule.h \ - include/odp/api/schedule_types.h \ include/odp/api/shared_memory.h \ - include/odp/api/spinlock.h \ - include/odp/api/spinlock_recursive.h \ include/odp/api/std_clib.h \ - include/odp/api/std_types.h \ include/odp/api/support.h \ include/odp/api/sync.h \ include/odp/api/system_info.h \ - include/odp/api/thread.h \ - include/odp/api/thrmask.h \ include/odp/api/ticketlock.h \ - include/odp/api/time.h \ - include/odp/api/timer.h \ - include/odp/api/traffic_mngr.h \ - include/odp/api/version.h + include/odp/api/timer.h odpapiplatincludedir= $(includedir)/odp/api/plat odpapiplatinclude_HEADERS = \ include/odp/api/plat/atomic_inlines.h \ include/odp/api/plat/atomic_types.h \ - include/odp/api/plat/barrier_types.h \ include/odp/api/plat/buffer_types.h \ include/odp/api/plat/byteorder_inlines.h \ include/odp/api/plat/byteorder_types.h \ include/odp/api/plat/classification_types.h \ - include/odp/api/plat/cpumask_types.h \ include/odp/api/plat/crypto_types.h \ include/odp/api/plat/event_types.h \ - include/odp/api/plat/init_types.h \ include/odp/api/plat/ipsec_types.h \ include/odp/api/plat/packet_flag_inlines.h \ include/odp/api/plat/packet_flag_inlines_api.h \ @@ -88,28 +71,38 @@ odpapiplatinclude_HEADERS = \ include/odp/api/plat/packet_io_types.h \ include/odp/api/plat/pool_types.h \ include/odp/api/plat/queue_types.h \ - include/odp/api/plat/rwlock_types.h \ - include/odp/api/plat/rwlock_recursive_types.h \ - include/odp/api/plat/schedule_types.h \ include/odp/api/plat/shared_memory_types.h \ - include/odp/api/plat/spinlock_types.h \ - include/odp/api/plat/spinlock_recursive_types.h \ include/odp/api/plat/std_clib_inlines.h \ include/odp/api/plat/strong_types.h \ include/odp/api/plat/sync_inlines.h \ - include/odp/api/plat/thread_types.h \ - include/odp/api/plat/thrmask_types.h \ include/odp/api/plat/ticketlock_inlines.h \ include/odp/api/plat/ticketlock_inlines_api.h \ include/odp/api/plat/ticketlock_types.h \ - include/odp/api/plat/time_types.h \ - include/odp/api/plat/timer_types.h \ - include/odp/api/plat/traffic_mngr_types.h \ - include/odp/api/plat/version_types.h + include/odp/api/plat/timer_types.h nodist_odpapiplatinclude_HEADERS = \ include/odp/api/plat/static_inline.h +if !ODP_ABI_COMPAT +odpapiabiarchincludedir= $(includedir)/odp/api/abi +odpapiabiarchinclude_HEADERS = \ + include-abi/odp/api/abi/barrier.h \ + include-abi/odp/api/abi/cpumask.h \ + include-abi/odp/api/abi/init.h \ + include-abi/odp/api/abi/rwlock.h \ + include-abi/odp/api/abi/rwlock_recursive.h \ + include-abi/odp/api/abi/schedule.h \ + include-abi/odp/api/abi/schedule_types.h \ + include-abi/odp/api/abi/spinlock.h \ + include-abi/odp/api/abi/spinlock_recursive.h \ + include-abi/odp/api/abi/std_types.h \ + include-abi/odp/api/abi/thread.h \ + include-abi/odp/api/abi/thrmask.h \ + include-abi/odp/api/abi/time.h \ + include-abi/odp/api/abi/traffic_mngr.h \ + include-abi/odp/api/abi/version.h +endif + odpdrvincludedir = $(includedir)/odp/drv odpdrvinclude_HEADERS = \ include/odp/drv/align.h \ diff --git a/platform/linux-generic/include/odp/api/plat/barrier_types.h b/platform/linux-generic/include-abi/odp/api/abi/barrier.h similarity index 89% rename from platform/linux-generic/include/odp/api/plat/barrier_types.h rename to platform/linux-generic/include-abi/odp/api/abi/barrier.h index 00b383cc676c..51d913774c8e 100644 --- a/platform/linux-generic/include/odp/api/plat/barrier_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/barrier.h @@ -10,8 +10,8 @@ * ODP barrier */ -#ifndef ODP_BARRIER_TYPES_H_ -#define ODP_BARRIER_TYPES_H_ +#ifndef ODP_ABI_BARRIER_H_ +#define ODP_ABI_BARRIER_H_ #ifdef __cplusplus extern "C" { diff --git a/platform/linux-generic/include-abi/odp/api/abi/cpumask.h b/platform/linux-generic/include-abi/odp/api/abi/cpumask.h new file mode 100644 index 000000000000..d991896d8eea --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/cpumask.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/init.h b/platform/linux-generic/include-abi/odp/api/abi/init.h new file mode 100644 index 000000000000..81eafefe3070 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/init.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/rwlock.h b/platform/linux-generic/include-abi/odp/api/abi/rwlock.h new file mode 100644 index 000000000000..cba0743e74be --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/rwlock.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/rwlock_recursive.h b/platform/linux-generic/include-abi/odp/api/abi/rwlock_recursive.h new file mode 100644 index 000000000000..841710d3c821 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/rwlock_recursive.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/schedule.h b/platform/linux-generic/include-abi/odp/api/abi/schedule.h new file mode 100644 index 000000000000..18427744fc84 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/schedule.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/schedule_types.h b/platform/linux-generic/include-abi/odp/api/abi/schedule_types.h new file mode 100644 index 000000000000..b3ea96b5a1d1 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/schedule_types.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/spinlock.h b/platform/linux-generic/include-abi/odp/api/abi/spinlock.h new file mode 100644 index 000000000000..4894095bb08a --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/spinlock.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/spinlock_recursive.h b/platform/linux-generic/include-abi/odp/api/abi/spinlock_recursive.h new file mode 100644 index 000000000000..a7a49bd4d1c9 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/spinlock_recursive.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/std_types.h b/platform/linux-generic/include-abi/odp/api/abi/std_types.h new file mode 100644 index 000000000000..91130000a7f3 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/std_types.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/thread.h b/platform/linux-generic/include-abi/odp/api/abi/thread.h new file mode 100644 index 000000000000..dc29a7dac301 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/thread.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/thrmask.h b/platform/linux-generic/include-abi/odp/api/abi/thrmask.h new file mode 100644 index 000000000000..0c1dc0ce59ad --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/thrmask.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/time.h b/platform/linux-generic/include-abi/odp/api/abi/time.h new file mode 100644 index 000000000000..2672d7892624 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/time.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/traffic_mngr.h b/platform/linux-generic/include-abi/odp/api/abi/traffic_mngr.h new file mode 100644 index 000000000000..4245cbf7068b --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/traffic_mngr.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include-abi/odp/api/abi/version.h b/platform/linux-generic/include-abi/odp/api/abi/version.h new file mode 100644 index 000000000000..b36d53958931 --- /dev/null +++ b/platform/linux-generic/include-abi/odp/api/abi/version.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/linux-generic/include/odp/api/barrier.h b/platform/linux-generic/include/odp/api/barrier.h index ab1b7756246e..98200f87b5ea 100644 --- a/platform/linux-generic/include/odp/api/barrier.h +++ b/platform/linux-generic/include/odp/api/barrier.h @@ -20,7 +20,7 @@ extern "C" { #include #include #include -#include +#include #include diff --git a/platform/linux-generic/include/odp/api/plat/cpumask_types.h b/platform/linux-generic/include/odp/api/plat/cpumask_types.h deleted file mode 100644 index c2727a46ce10..000000000000 --- a/platform/linux-generic/include/odp/api/plat/cpumask_types.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -/** - * @file - * - * ODP CPU masks and enumeration - */ - -#ifndef ODP_CPUMASK_TYPES_H_ -#define ODP_CPUMASK_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** @addtogroup odp_cpumask - * @{ - */ - -#include -#include - -#define ODP_CPUMASK_SIZE 1024 - -#define ODP_CPUMASK_STR_SIZE ((ODP_CPUMASK_SIZE + 3) / 4 + 3) - -/** - * CPU mask - * - * Don't access directly, use access functions. - */ -typedef struct odp_cpumask_t { - /** @private CPU mask storage - * - * This is private to the implementation. - * Don't access directly, use access functions. - */ - uint8_t _u8[ODP_CPUMASK_SIZE / 8]; -} odp_cpumask_t ODP_ALIGNED(8); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/init_types.h b/platform/linux-generic/include/odp/api/plat/init_types.h deleted file mode 100644 index 888b04a7020e..000000000000 --- a/platform/linux-generic/include/odp/api/plat/init_types.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP initialization. - */ - -#ifndef ODP_INIT_TYPES_H_ -#define ODP_INIT_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -typedef uint64_t odp_instance_t; - -/** - * @internal platform specific data - */ -typedef struct odp_platform_init_t { - int ipc_ns; /**< Name space for ipc shared objects. */ -} odp_platform_init_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/rwlock_recursive_types.h b/platform/linux-generic/include/odp/api/plat/rwlock_recursive_types.h deleted file mode 100644 index 36f9204ac91f..000000000000 --- a/platform/linux-generic/include/odp/api/plat/rwlock_recursive_types.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP recursive read/write lock - */ - -#ifndef ODP_RWLOCK_RECURSIVE_TYPES_H_ -#define ODP_RWLOCK_RECURSIVE_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/** @internal */ -struct odp_rwlock_recursive_s { - odp_rwlock_t lock; /**< the lock */ - int wr_owner; /**< write owner thread */ - uint32_t wr_cnt; /**< write recursion count */ - uint8_t rd_cnt[ODP_THREAD_COUNT_MAX]; /**< read recursion count */ -}; - -typedef struct odp_rwlock_recursive_s odp_rwlock_recursive_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/rwlock_types.h b/platform/linux-generic/include/odp/api/plat/rwlock_types.h deleted file mode 100644 index f7dc04496c35..000000000000 --- a/platform/linux-generic/include/odp/api/plat/rwlock_types.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -/** - * @file - * - * ODP rwlock - */ - -#ifndef ODP_RWLOCK_TYPES_H_ -#define ODP_RWLOCK_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/** @internal */ -struct odp_rwlock_s { - odp_atomic_u32_t cnt; /**< lock count - 0 lock not taken - -1 write lock taken - >0 read lock(s) taken */ -}; - -typedef struct odp_rwlock_s odp_rwlock_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/schedule_types.h b/platform/linux-generic/include/odp/api/plat/schedule_types.h deleted file mode 100644 index 4e75f9eecae7..000000000000 --- a/platform/linux-generic/include/odp/api/plat/schedule_types.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -/** - * @file - * - * ODP schedule - */ - -#ifndef ODP_SCHEDULE_TYPES_H_ -#define ODP_SCHEDULE_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/** @addtogroup odp_scheduler - * @{ - */ - -#define ODP_SCHED_WAIT UINT64_MAX -#define ODP_SCHED_NO_WAIT 0 - -typedef int odp_schedule_prio_t; - -#define ODP_SCHED_PRIO_HIGHEST 0 - -#define ODP_SCHED_PRIO_NORMAL 4 - -#define ODP_SCHED_PRIO_LOWEST 7 - -#define ODP_SCHED_PRIO_DEFAULT ODP_SCHED_PRIO_NORMAL - -typedef int odp_schedule_sync_t; - -#define ODP_SCHED_SYNC_PARALLEL 0 -#define ODP_SCHED_SYNC_ATOMIC 1 -#define ODP_SCHED_SYNC_ORDERED 2 - -typedef int odp_schedule_group_t; - -/* These must be kept in sync with thread_globals_t in odp_thread.c */ -#define ODP_SCHED_GROUP_INVALID ((odp_schedule_group_t)-1) -#define ODP_SCHED_GROUP_ALL 0 -#define ODP_SCHED_GROUP_WORKER 1 -#define ODP_SCHED_GROUP_CONTROL 2 - -#define ODP_SCHED_GROUP_NAME_LEN 32 - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/spinlock_recursive_types.h b/platform/linux-generic/include/odp/api/plat/spinlock_recursive_types.h deleted file mode 100644 index c5a1adff935e..000000000000 --- a/platform/linux-generic/include/odp/api/plat/spinlock_recursive_types.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP recursive spinlock - */ - -#ifndef ODP_SPINLOCK_RECURSIVE_TYPES_H_ -#define ODP_SPINLOCK_RECURSIVE_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/** @internal */ -struct odp_spinlock_recursive_s { - odp_spinlock_t lock; /**< the lock */ - int owner; /**< thread owning the lock */ - uint32_t cnt; /**< recursion count */ -}; - -typedef struct odp_spinlock_recursive_s odp_spinlock_recursive_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/spinlock_types.h b/platform/linux-generic/include/odp/api/plat/spinlock_types.h deleted file mode 100644 index f38ece6afd48..000000000000 --- a/platform/linux-generic/include/odp/api/plat/spinlock_types.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -/** - * @file - * - * ODP spinlock - */ - -#ifndef ODP_SPINLOCK_TYPES_H_ -#define ODP_SPINLOCK_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/** @internal */ -struct odp_spinlock_s { - char lock; /**< lock flag, should match odp_atomic_flag_t */ -}; - -typedef struct odp_spinlock_s odp_spinlock_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/thread_types.h b/platform/linux-generic/include/odp/api/plat/thread_types.h deleted file mode 100644 index 33af459831c1..000000000000 --- a/platform/linux-generic/include/odp/api/plat/thread_types.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP thread - */ - -#ifndef ODP_THREAD_TYPES_H_ -#define ODP_THREAD_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** @addtogroup odp_thread - * @{ - */ - -#define ODP_THREAD_COUNT_MAX 128 - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/thrmask_types.h b/platform/linux-generic/include/odp/api/plat/thrmask_types.h deleted file mode 100644 index 5d93890c1b3c..000000000000 --- a/platform/linux-generic/include/odp/api/plat/thrmask_types.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP thread masks - */ - -#ifndef ODP_THRMASK_TYPES_H_ -#define ODP_THRMASK_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** @addtogroup odp_thread - * @{ - */ - -#include - -/** - * Minimum size of output buffer for odp_thrmask_to_str() - */ -#define ODP_THRMASK_STR_SIZE ODP_CPUMASK_STR_SIZE - -/** - * Thread mask - * - * Don't access directly, use access functions. - */ -typedef struct odp_thrmask_t { - odp_cpumask_t m; /**< @private Mask*/ -} odp_thrmask_t; - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/time_types.h b/platform/linux-generic/include/odp/api/plat/time_types.h deleted file mode 100644 index e7111c8c51f7..000000000000 --- a/platform/linux-generic/include/odp/api/plat/time_types.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP time service - */ - -#ifndef ODP_TIME_TYPES_H_ -#define ODP_TIME_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** @addtogroup odp_time - * @{ - **/ - -/** - * @internal Time structure used for both POSIX timespec and HW counter - * implementations. - */ -typedef struct odp_time_t { - /** @internal Variant mappings for time type */ - union { - /** @internal Used with generic 64 bit operations */ - uint64_t u64; - - /** @internal Nanoseconds */ - uint64_t nsec; - - /** @internal HW timer counter value */ - uint64_t count; - - }; -} odp_time_t; - -#define ODP_TIME_NULL ((odp_time_t){.u64 = 0}) - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h b/platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h deleted file mode 100644 index be3926d460a8..000000000000 --- a/platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/** - * @file - * - * ODP traffic mngr - */ - -#ifndef ODP_TRAFFIC_MNGR_TYPES_H_ -#define ODP_TRAFFIC_MNGR_TYPES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/** @addtogroup odp_traffic_mngr - * Macros and operations on a TM system. - * @{ - */ - -/** The ODP_TM_MAX_NUM_SYSTEMS constant specifies the maximum number of TM - * systems that may be created. On some platforms this might be much more - * limited to as little as one hardware TM system. - */ -#define ODP_TM_MAX_NUM_SYSTEMS 64 - -/** The ODP_TM_MAX_PRIORITIES constant specifies the largest range of - * priorities that any TM system can support. All strict priority values MUST - * in the range 0..ODP_TM_MAX_PRIORITIES-1. - */ -#define ODP_TM_MAX_PRIORITIES 16 - -/** The ODP_TM MAX_LEVELS constant specifies the largest range of - * tm_node levels that any TM system can support. Hence all tm_node level - * values MUST be in the range 0..ODP_TM_MAX_LEVELS-1. Smaller tm_node - * levels are associated with tm_nodes closer to the TM system egress. - */ -#define ODP_TM_MAX_LEVELS 8 - -/** - * The smallest SCHED weight is 1 (i.e. 0 is not a legal WFQ/WRR value). - */ -#define ODP_TM_MIN_SCHED_WEIGHT 1 - -/** The ODP_TM_MAX_SCHED_WEIGHT constant is the largest weight any TM system - * can support (at least from a configuration standpoint). A given TM system - * could have a smaller value. - */ -#define ODP_TM_MAX_SCHED_WEIGHT 255 - -/** The ODP_TM_MAX_TM_QUEUES constant is the largest number of tm_queues - * that can be handled by any one TM system. - */ -#define ODP_TM_MAX_TM_QUEUES (16 * 1024 * 1024) - -/** The ODP_TM_MAX_NUM_OUTPUTS constant is the largest number of outputs that - * can be configured for any one TM system. - */ -#define ODP_TM_MAX_NUM_OUTPUTS 256 - -/** The ODP_TM_MAX_NUM_TM_NODES constant is the largest number of tm_nodes that - * can be in existence for any one TM system. - */ -#define ODP_TM_MAX_NUM_TM_NODES (1024 * 1024) - -/** The ODP_TM_MAX_TM_NODE_FANIN constant is the largest number of fan-in - * "inputs" that can be simultaneously connected to a single tm_node. - * *TBD* Does this need to be as large as ODP_TM_MAX_TM_QUEUES? *TBD* - */ -#define ODP_TM_MAX_TM_NODE_FANIN (1024 * 1024) - -/** The ODP_TM_MIN_SHAPER_BW constant is the smallest amount of bandwidth that - * can a shaper's peak or commit rate can be set to. It is in units of - * 1000 bytes/second so that it and the ODP_TM_MAX_SHAPER_BW can both fit in - * 32 bits. - */ -#define ODP_TM_MIN_SHAPER_BW 1 - -/** The ODP_TM_MAX_SHAPER_BW constant is the largest amound of bandwidth that - * any shaper's peak or commit rate can be set to. It is in units of - * 1000 bytes/second so that it and the ODP_TM_MIN_SHAPER_BW can both fit in - * 32 bits. - */ -#define ODP_TM_MAX_SHAPER_BW 12500000 - -/** The ODP_NUM_SHAPER_COLORS constant just counts the number of enumeration - * values defined in the odp_tm_shaper_color_t type. - */ -#define ODP_NUM_SHAPER_COLORS 3 - -/** The INVALID_PRIORITY constant is used when one needs to indicate an - * invalid priority value. - */ -#define ODP_TM_INVALID_PRIORITY 255 - -/** The odp_tm_percent_t type is used when specifying fields that are - * percentages. It is a fixed point integer whose units are 1/100 of a - * percent. Hence 100% is represented as the integer value 10000. Note - * that because it is often used as a ratio of the current queue value and - * maximum queue threshold, it can be > 100%, but in any event will never - * be larger than 500% (i.e. it MUST be capped at 50000). - */ -typedef uint16_t odp_tm_percent_t; - -/** The odp_tm_handle_t type is a generic type that can stand for any of the - * other ODP_TM handle types. - */ -typedef uint64_t odp_tm_handle_t; - -/** Each odp_tm_t value represents a specific TM system. Almost all - * functions in this API require a odp_tm_t value - either directly - * as a function parameter or indirectly by having another ODP TM handle value - * as a function parameter. - */ -typedef odp_tm_handle_t odp_tm_t; - -/** Each odp_tm_queue_t value is an opaque ODP handle representing a specific - * tm_queue within a specific TM system. - */ -typedef odp_tm_handle_t odp_tm_queue_t; - -/** Each odp_tm_node_t value is an opaque ODP handle representing a specific - * tm_node within a specific TM system. - */ -typedef odp_tm_handle_t odp_tm_node_t; - -/** Each odp_tm_shaper_t value is an opaque ODP handle representing a specific - * shaper profile usable across all TM systems described by this API. A given - * shaper profile can then be attached to any tm_queue or tm_node. - */ -typedef odp_tm_handle_t odp_tm_shaper_t; - -/** Each odp_tm_sched_t value is an opaque ODP handle representing a specific - * tm_node scheduler profile usable across all TM systems described by this - * API. A given tm_node scheduler profile can then be attached to any tm_node. - */ -typedef odp_tm_handle_t odp_tm_sched_t; - -/** Each odp_tm_threshold_t value is an opaque ODP handle representing a - * specific queue threshold profile usable across all TM systems described by - * this API. A given queue threshold profile can then be attached to any - * tm_queue or tm_node. - */ -typedef odp_tm_handle_t odp_tm_threshold_t; - -/** Each odp_tm_wred_t value is an opaque ODP handle representing a specific - * WRED profile usable across all TM systems described by this API. A given - * WRED profile can then be attached to any tm_queue or tm_node. - */ -typedef odp_tm_handle_t odp_tm_wred_t; - -/** The ODP_TM_INVALID constant can be used with any ODP TM handle type and - * indicates that this value does NOT represent a valid TM object. - */ -#define ODP_TM_INVALID 0 - -/** - * @def ODP_TM_ROOT - * Constant that is used to refer to the egress/root node of the TM subsystem's - * tree/hierarchy of nodes. - */ -#define ODP_TM_ROOT ((odp_tm_handle_t)-1) - -/** @internal Get printable format of odp_tm_handle_t @param hdl @return */ -static inline uint64_t odp_tm_handle_to_u64(odp_tm_handle_t hdl) -{ - return hdl; -} - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/plat/version_types.h b/platform/linux-generic/include/odp/api/plat/version_types.h deleted file mode 100644 index e3327eb338e6..000000000000 --- a/platform/linux-generic/include/odp/api/plat/version_types.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef ODP_VERSION_TYPESH_ -#define ODP_VERSION_TYPESH_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** @internal Version string expand */ -#define ODP_VERSION_STR_EXPAND(x) #x - -/** @internal Version to string */ -#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x) - -/** @internal API version string */ -#define ODP_VERSION_API_STR \ -ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ -ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ -ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) - -#ifdef __cplusplus -} -#endif - -#endif