From patchwork Mon Oct 23 11:10:44 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: 116715 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4542484qgn; Mon, 23 Oct 2017 04:39:41 -0700 (PDT) X-Received: by 10.36.233.196 with SMTP id f187mr8398290ith.14.1508758781021; Mon, 23 Oct 2017 04:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508758781; cv=none; d=google.com; s=arc-20160816; b=ddz7vlR7yv6eV4G4/E6BKNBoQlhkCWiMfriKTXQC7jr/rTx8dzSmRzlzhUBZhy89VW rZYgoaU+cs3G1h8J26KWrha7ngfsL2LpqazYED9M4bX6mXOn+gRF/yodsIEMNtFLfXUO XJFgv5PLwRDmLcqIRD1Y1AJFg5vnHcHMpqhJ91MHHyMh2FwBnLDocaiqH0jxwWxbdy/m yzGdxjZ3Wi9q2KruVRbq/VXopQBsVf6yUnVUr695dzsKmS2Wt3sADJ1BPidvtMeuw2VF THFO/XYEXDlrRf+3GFJdEzWE8h2WjxAls3WVCpK3cH5/hkGwSxz0HFUHaqC2uoX1lOHn KMTg== 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=7fndndn13tI05pyXQmEydTUCWZM4VoaqyE8wlkya07s=; b=xwEAALIhzuEofwsGM055uDNCH7+QegybADRZ1UDMcycO78Sl0BdAlp1dKMycGDZINR yIU7D0JmvoG6gNB7p7BAXIFR4V/RujK412+/Rb26KOJ8AmR4EYMWRstd9e5Jbx1qG4Bk QnOBPgBzdALu/zBFCOE6vMYjlwAoqQ6w660x7+dlShaPaLfjWR2Kb1ikAQAx5oK3Kgs8 /besIK2HewEDO0WKJ2mA/xY1eofl5Br72zDqWC+m9busoZAMpP8/Zhd90ZwLijIksuux 6F+USjWyvwqwzq7lE9lf9ukW1xxS30Db1e2e87Fh5ERWnofKFxyGOblh4JLpBQGcm3mu Qp0Q== 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 u11si5459505iod.27.2017.10.23.04.39.40; Mon, 23 Oct 2017 04:39:41 -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 8F418622E8; Mon, 23 Oct 2017 11:39:40 +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 3E0346286B; Mon, 23 Oct 2017 11:14:28 +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 9C72A622D9; Mon, 23 Oct 2017 11:13:15 +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 5207361E03 for ; Mon, 23 Oct 2017 11:11:26 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id l23so19662281lfk.10 for ; Mon, 23 Oct 2017 04:11:26 -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=7fndndn13tI05pyXQmEydTUCWZM4VoaqyE8wlkya07s=; b=YvoLsUmkyFNO3hkMHfMQV88QS6aeGv/cIrC1cMyKR4XJjuBsmLRwdJn4EuBJFsvFHA XILBcliqgpNc+6SbZqcHn8sIr2DfzXY2r1quv4TYjL9BdWJRGb1XGwl79ZnudrOQ27dP Gqtrsg2TWYpMbkm0tIMPI/C6JhgjgDIxEtRthpInJzTGdOmJxVSYI+Ll82LvDXxmlDW4 uiF3qSNpOE0732pDG/MjMKxGjbdAU8TyVAhblmhwjK4ANT5XsFZQKW+uPk1hhZ4WW7gE 5LLy1XpDDaUfIIv3NiGfLbHkcKathstOJX6XgikZXeSAGq7YUjCghwstL70cp4SK7HT9 VPiQ== X-Gm-Message-State: AMCzsaVn2gR++nInJv2dWt4uLm91e0L7vwH+YasYoToKwCvqcE3RNoAu G2i0E8iGXsMG5e34F9MWYvvI3qq9UwRaDg== X-Google-Smtp-Source: ABhQp+Q1g9ITd3bJwt84CWqdYqXcEp+Kds8R7njV89Q2gpFOhInXK13DKuTzxR2LzEZZuGtKfBH9fA== X-Received: by 10.25.228.197 with SMTP id x66mr939748lfi.231.1508757084196; Mon, 23 Oct 2017 04:11:24 -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.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 04:11:23 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Mon, 23 Oct 2017 14:10:44 +0300 Message-Id: <20171023111057.6328-17-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 16/29] linux-gen, include: progress in switching headers 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" Rework more platform headers to use odp/api/abi/ subdir instead of odp/api/plat/. Signed-off-by: Dmitry Eremin-Solenikov --- include/Makefile.am | 8 +++++ .../include => include}/odp/api/barrier.h | 6 ++-- .../include => include}/odp/api/buffer.h | 18 ++++-------- .../include => include}/odp/api/event.h | 14 ++------- .../include => include}/odp/api/ipsec.h | 14 ++------- .../include => include}/odp/api/pool.h | 17 ++++------- .../include => include}/odp/api/queue.h | 12 ++++---- .../include => include}/odp/api/shared_memory.h | 14 ++------- .../include => include}/odp/api/timer.h | 20 ++++--------- platform/linux-generic/Makefile.am | 34 +++++++++------------- .../odp/api/abi/buffer.h} | 11 ++----- .../odp/api/abi/classification.h} | 11 ++----- .../odp/api/abi/crypto.h} | 11 ++----- .../odp/api/abi/event.h} | 12 ++------ .../odp/api/abi/ipsec.h} | 4 +-- .../odp/api/abi/packet_io.h} | 10 ++----- .../odp/api/abi/pool.h} | 13 ++------- .../odp/api/abi/queue.h} | 11 ++----- .../odp/api/abi/shared_memory.h} | 11 ++----- .../odp/api/abi/timer.h} | 4 +-- .../linux-generic/include/odp/api/classification.h | 12 ++++---- platform/linux-generic/include/odp/api/crypto.h | 10 +++---- platform/linux-generic/include/odp/api/packet.h | 8 ++--- platform/linux-generic/include/odp/api/packet_io.h | 8 ++--- .../include/odp/api/plat/packet_inlines.h | 1 + .../include/odp/api/plat/strong_types.h | 2 ++ .../linux-generic/include/odp_queue_internal.h | 1 + .../include/odp_queue_scalable_internal.h | 1 + platform/linux-generic/odp_packet_io.c | 6 ++++ 29 files changed, 106 insertions(+), 198 deletions(-) rename {platform/linux-generic/include => include}/odp/api/barrier.h (78%) rename {platform/linux-generic/include => include}/odp/api/buffer.h (58%) rename {platform/linux-generic/include => include}/odp/api/event.h (65%) rename {platform/linux-generic/include => include}/odp/api/ipsec.h (67%) rename {platform/linux-generic/include => include}/odp/api/pool.h (53%) rename {platform/linux-generic/include => include}/odp/api/queue.h (58%) rename {platform/linux-generic/include => include}/odp/api/shared_memory.h (62%) rename {platform/linux-generic/include => include}/odp/api/timer.h (54%) rename platform/linux-generic/{include/odp/api/plat/buffer_types.h => include-abi/odp/api/abi/buffer.h} (73%) rename platform/linux-generic/{include/odp/api/plat/classification_types.h => include-abi/odp/api/abi/classification.h} (74%) rename platform/linux-generic/{include/odp/api/plat/crypto_types.h => include-abi/odp/api/abi/crypto.h} (71%) rename platform/linux-generic/{include/odp/api/plat/event_types.h => include-abi/odp/api/abi/event.h} (80%) rename platform/linux-generic/{include/odp/api/plat/ipsec_types.h => include-abi/odp/api/abi/ipsec.h} (88%) rename platform/linux-generic/{include/odp/api/plat/packet_io_types.h => include-abi/odp/api/abi/packet_io.h} (83%) rename platform/linux-generic/{include/odp/api/plat/pool_types.h => include-abi/odp/api/abi/pool.h} (76%) rename platform/linux-generic/{include/odp/api/plat/queue_types.h => include-abi/odp/api/abi/queue.h} (74%) rename platform/linux-generic/{include/odp/api/plat/shared_memory_types.h => include-abi/odp/api/abi/shared_memory.h} (73%) rename platform/linux-generic/{include/odp/api/plat/timer_types.h => include-abi/odp/api/abi/timer.h} (92%) -- 2.14.2 diff --git a/include/Makefile.am b/include/Makefile.am index 0e39a0d8db5f..946b7c07cf73 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -5,18 +5,26 @@ include_HEADERS = \ odpapiincludedir= $(includedir)/odp/api/ odpapiinclude_HEADERS = \ + odp/api/barrier.h \ + odp/api/buffer.h \ odp/api/cpumask.h \ + odp/api/event.h \ odp/api/init.h \ + odp/api/ipsec.h \ + odp/api/pool.h \ + odp/api/queue.h \ odp/api/rwlock.h \ odp/api/rwlock_recursive.h \ odp/api/schedule.h \ odp/api/schedule_types.h \ + odp/api/shared_memory.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/timer.h \ odp/api/traffic_mngr.h \ odp/api/version.h diff --git a/platform/linux-generic/include/odp/api/barrier.h b/include/odp/api/barrier.h similarity index 78% rename from platform/linux-generic/include/odp/api/barrier.h rename to include/odp/api/barrier.h index 98200f87b5ea..7101b4c64948 100644 --- a/platform/linux-generic/include/odp/api/barrier.h +++ b/include/odp/api/barrier.h @@ -10,8 +10,8 @@ * ODP execution barriers */ -#ifndef ODP_PLAT_BARRIER_H_ -#define ODP_PLAT_BARRIER_H_ +#ifndef ODP_API_BARRIER_H_ +#define ODP_API_BARRIER_H_ #ifdef __cplusplus extern "C" { @@ -19,7 +19,7 @@ extern "C" { #include #include -#include +#include #include #include diff --git a/platform/linux-generic/include/odp/api/buffer.h b/include/odp/api/buffer.h similarity index 58% rename from platform/linux-generic/include/odp/api/buffer.h rename to include/odp/api/buffer.h index 81dbf1280049..15734ca7102f 100644 --- a/platform/linux-generic/include/odp/api/buffer.h +++ b/include/odp/api/buffer.h @@ -10,25 +10,17 @@ * ODP buffer descriptor */ -#ifndef ODP_PLAT_BUFFER_H_ -#define ODP_PLAT_BUFFER_H_ +#ifndef ODP_API_BUFFER_H_ +#define ODP_API_BUFFER_H_ #ifdef __cplusplus extern "C" { #endif #include -#include -#include -#include - -/** @ingroup odp_buffer - * @{ - */ - -/** - * @} - */ +#include +#include +#include #include diff --git a/platform/linux-generic/include/odp/api/event.h b/include/odp/api/event.h similarity index 65% rename from platform/linux-generic/include/odp/api/event.h rename to include/odp/api/event.h index 55931b625a52..71c64eb9b93e 100644 --- a/platform/linux-generic/include/odp/api/event.h +++ b/include/odp/api/event.h @@ -10,22 +10,14 @@ * ODP event */ -#ifndef ODP_PLAT_EVENT_H_ -#define ODP_PLAT_EVENT_H_ +#ifndef ODP_API_EVENT_H_ +#define ODP_API_EVENT_H_ #ifdef __cplusplus extern "C" { #endif -#include - -/** @ingroup odp_event - * @{ - */ - -/** - * @} - */ +#include #include diff --git a/platform/linux-generic/include/odp/api/ipsec.h b/include/odp/api/ipsec.h similarity index 67% rename from platform/linux-generic/include/odp/api/ipsec.h rename to include/odp/api/ipsec.h index 44c5d02553f0..cb39750e5d80 100644 --- a/platform/linux-generic/include/odp/api/ipsec.h +++ b/include/odp/api/ipsec.h @@ -10,22 +10,14 @@ * ODP IPSEC API - platform specific header */ -#ifndef ODP_PLAT_IPSEC_H_ -#define ODP_PLAT_IPSEC_H_ +#ifndef ODP_API_IPSEC_H_ +#define ODP_API_IPSEC_H_ #ifdef __cplusplus extern "C" { #endif -#include - -/** @ingroup odp_ipsec - * @{ - */ - -/** - * @} - */ +#include #include diff --git a/platform/linux-generic/include/odp/api/pool.h b/include/odp/api/pool.h similarity index 53% rename from platform/linux-generic/include/odp/api/pool.h rename to include/odp/api/pool.h index d712b65010c7..845ed5fbe652 100644 --- a/platform/linux-generic/include/odp/api/pool.h +++ b/include/odp/api/pool.h @@ -10,24 +10,17 @@ * ODP pool */ -#ifndef ODP_PLAT_POOL_H_ -#define ODP_PLAT_POOL_H_ +#ifndef ODP_API_POOL_H_ +#define ODP_API_POOL_H_ #ifdef __cplusplus extern "C" { #endif -/** @ingroup odp_buffer - * @{ - */ - -/** - * @} - */ +#include +#include +#include -#include -#include -#include #include #ifdef __cplusplus diff --git a/platform/linux-generic/include/odp/api/queue.h b/include/odp/api/queue.h similarity index 58% rename from platform/linux-generic/include/odp/api/queue.h rename to include/odp/api/queue.h index f958ff5140c8..6a67b176130b 100644 --- a/platform/linux-generic/include/odp/api/queue.h +++ b/include/odp/api/queue.h @@ -10,18 +10,18 @@ * ODP queue */ -#ifndef ODP_PLAT_QUEUE_H_ -#define ODP_PLAT_QUEUE_H_ +#ifndef ODP_API_QUEUE_H_ +#define ODP_API_QUEUE_H_ #ifdef __cplusplus extern "C" { #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/platform/linux-generic/include/odp/api/shared_memory.h b/include/odp/api/shared_memory.h similarity index 62% rename from platform/linux-generic/include/odp/api/shared_memory.h rename to include/odp/api/shared_memory.h index affc290e71d9..940126483988 100644 --- a/platform/linux-generic/include/odp/api/shared_memory.h +++ b/include/odp/api/shared_memory.h @@ -10,22 +10,14 @@ * ODP shared memory */ -#ifndef ODP_PLAT_SHARED_MEMORY_H_ -#define ODP_PLAT_SHARED_MEMORY_H_ +#ifndef ODP_API_SHARED_MEMORY_H_ +#define ODP_API_SHARED_MEMORY_H_ #ifdef __cplusplus extern "C" { #endif -#include - -/** @ingroup odp_shared_memory - * @{ - */ - -/** - * @} - */ +#include #include diff --git a/platform/linux-generic/include/odp/api/timer.h b/include/odp/api/timer.h similarity index 54% rename from platform/linux-generic/include/odp/api/timer.h rename to include/odp/api/timer.h index 1450727f8608..e69a85323c30 100644 --- a/platform/linux-generic/include/odp/api/timer.h +++ b/include/odp/api/timer.h @@ -10,26 +10,18 @@ * ODP timer service */ -#ifndef ODP_PLAT_TIMER_H_ -#define ODP_PLAT_TIMER_H_ +#ifndef ODP_API_TIMER_H_ +#define ODP_API_TIMER_H_ #ifdef __cplusplus extern "C" { #endif #include -#include -#include -#include -#include - -/** @ingroup odp_timer - * @{ - */ - -/** - * @} - */ +#include +#include +#include +#include #include diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 4f47b277de29..1516f8ee7aee 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -21,64 +21,46 @@ odpapiincludedir= $(includedir)/odp/api odpapiinclude_HEADERS = \ include/odp/api/align.h \ include/odp/api/atomic.h \ - include/odp/api/barrier.h \ - include/odp/api/buffer.h \ include/odp/api/byteorder.h \ + include/odp/api/chksum.h \ include/odp/api/classification.h \ include/odp/api/compiler.h \ - include/odp/api/chksum.h \ include/odp/api/cpu.h \ include/odp/api/crypto.h \ include/odp/api/debug.h \ include/odp/api/deprecated.h \ include/odp/api/errno.h \ - include/odp/api/event.h \ include/odp/api/feature.h \ include/odp/api/hash.h \ include/odp/api/hints.h \ - include/odp/api/ipsec.h \ include/odp/api/packet_flags.h \ include/odp/api/packet.h \ include/odp/api/packet_io.h \ include/odp/api/packet_io_stats.h \ - include/odp/api/pool.h \ - include/odp/api/queue.h \ include/odp/api/random.h \ - include/odp/api/shared_memory.h \ include/odp/api/std_clib.h \ include/odp/api/support.h \ include/odp/api/sync.h \ include/odp/api/system_info.h \ - include/odp/api/ticketlock.h \ - include/odp/api/timer.h + include/odp/api/ticketlock.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/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/crypto_types.h \ - include/odp/api/plat/event_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 \ include/odp/api/plat/packet_inlines.h \ include/odp/api/plat/packet_inlines_api.h \ include/odp/api/plat/packet_types.h \ - 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/shared_memory_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/ticketlock_inlines.h \ include/odp/api/plat/ticketlock_inlines_api.h \ - include/odp/api/plat/ticketlock_types.h \ - include/odp/api/plat/timer_types.h + include/odp/api/plat/ticketlock_types.h nodist_odpapiplatinclude_HEADERS = \ include/odp/api/plat/static_inline.h @@ -87,18 +69,28 @@ if !ODP_ABI_COMPAT odpapiabiarchincludedir= $(includedir)/odp/api/abi odpapiabiarchinclude_HEADERS = \ include-abi/odp/api/abi/barrier.h \ + include-abi/odp/api/abi/buffer.h \ + include-abi/odp/api/abi/classification.h \ include-abi/odp/api/abi/cpumask.h \ + include-abi/odp/api/abi/crypto.h \ + include-abi/odp/api/abi/event.h \ include-abi/odp/api/abi/init.h \ + include-abi/odp/api/abi/ipsec.h \ + include-abi/odp/api/abi/packet_io.h \ + include-abi/odp/api/abi/pool.h \ + include-abi/odp/api/abi/queue.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/shared_memory.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/timer.h \ include-abi/odp/api/abi/traffic_mngr.h \ include-abi/odp/api/abi/version.h endif diff --git a/platform/linux-generic/include/odp/api/plat/buffer_types.h b/platform/linux-generic/include-abi/odp/api/abi/buffer.h similarity index 73% rename from platform/linux-generic/include/odp/api/plat/buffer_types.h rename to platform/linux-generic/include-abi/odp/api/abi/buffer.h index 8b79bb52e552..90b6653a66a5 100644 --- a/platform/linux-generic/include/odp/api/plat/buffer_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/buffer.h @@ -10,18 +10,13 @@ * ODP buffer descriptor */ -#ifndef ODP_BUFFER_TYPES_H_ -#define ODP_BUFFER_TYPES_H_ +#ifndef ODP_API_ABI_BUFFER_H_ +#define ODP_API_ABI_BUFFER_H_ #ifdef __cplusplus extern "C" { #endif -#include -#if ODP_ABI_COMPAT == 1 -#include -#else - #include #include @@ -37,8 +32,6 @@ typedef ODP_HANDLE_T(odp_buffer_t); * @} */ -#endif - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp/api/plat/classification_types.h b/platform/linux-generic/include-abi/odp/api/abi/classification.h similarity index 74% rename from platform/linux-generic/include/odp/api/plat/classification_types.h rename to platform/linux-generic/include-abi/odp/api/abi/classification.h index d210feb0ce13..3f866c67aaa1 100644 --- a/platform/linux-generic/include/odp/api/plat/classification_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/classification.h @@ -10,18 +10,13 @@ * ODP classification descriptor */ -#ifndef ODP_CLASSIFICATION_TYPES_H_ -#define ODP_CLASSIFICATION_TYPES_H_ +#ifndef ODP_API_ABI_CLASSIFICATION_H_ +#define ODP_API_ABI_CLASSIFICATION_H_ #ifdef __cplusplus extern "C" { #endif -#include -#if ODP_ABI_COMPAT == 1 -#include -#else - #include /** @ingroup odp_classification @@ -40,8 +35,6 @@ typedef ODP_HANDLE_T(odp_pmr_t); * @} */ -#endif - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp/api/plat/crypto_types.h b/platform/linux-generic/include-abi/odp/api/abi/crypto.h similarity index 71% rename from platform/linux-generic/include/odp/api/plat/crypto_types.h rename to platform/linux-generic/include-abi/odp/api/abi/crypto.h index 2cc747eb2fde..fe3a921295e4 100644 --- a/platform/linux-generic/include/odp/api/plat/crypto_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/crypto.h @@ -11,18 +11,13 @@ * ODP crypto */ -#ifndef ODP_CRYPTO_TYPES_H_ -#define ODP_CRYPTO_TYPES_H_ +#ifndef ODP_API_ABI_CRYPTO_H_ +#define ODP_API_ABI_CRYPTO_H_ #ifdef __cplusplus extern "C" { #endif -#include -#if ODP_ABI_COMPAT == 1 -#include -#else - /** @ingroup odp_crypto * @{ */ @@ -36,8 +31,6 @@ typedef ODP_HANDLE_T(odp_crypto_compl_t); * @} */ -#endif - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp/api/plat/event_types.h b/platform/linux-generic/include-abi/odp/api/abi/event.h similarity index 80% rename from platform/linux-generic/include/odp/api/plat/event_types.h rename to platform/linux-generic/include-abi/odp/api/abi/event.h index 9bff607a5684..802e431f3a82 100644 --- a/platform/linux-generic/include/odp/api/plat/event_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/event.h @@ -11,19 +11,13 @@ * ODP event */ -#ifndef ODP_EVENT_TYPES_H_ -#define ODP_EVENT_TYPES_H_ +#ifndef ODP_API_ABI_EVENT_H_ +#define ODP_API_ABI_EVENT_H_ #ifdef __cplusplus extern "C" { #endif -#include -#if ODP_ABI_COMPAT == 1 -#include -#else - -#include #include /** @ingroup odp_event @@ -53,8 +47,6 @@ typedef enum odp_event_subtype_t { * @} */ -#endif - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp/api/plat/ipsec_types.h b/platform/linux-generic/include-abi/odp/api/abi/ipsec.h similarity index 88% rename from platform/linux-generic/include/odp/api/plat/ipsec_types.h rename to platform/linux-generic/include-abi/odp/api/abi/ipsec.h index a36cdada47ce..75d84c43a043 100644 --- a/platform/linux-generic/include/odp/api/plat/ipsec_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/ipsec.h @@ -10,8 +10,8 @@ * ODP IPSEC API - platform specific types */ -#ifndef ODP_PLAT_IPSEC_TYPES_H_ -#define ODP_PLAT_IPSEC_TYPES_H_ +#ifndef ODP_API_ABI_IPSEC_H_ +#define ODP_API_ABI_IPSEC_H_ #ifdef __cplusplus extern "C" { diff --git a/platform/linux-generic/include/odp/api/plat/packet_io_types.h b/platform/linux-generic/include-abi/odp/api/abi/packet_io.h similarity index 83% rename from platform/linux-generic/include/odp/api/plat/packet_io_types.h rename to platform/linux-generic/include-abi/odp/api/abi/packet_io.h index 5a45321fb527..a84e858e650a 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_io_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/packet_io.h @@ -11,8 +11,8 @@ * ODP Packet IO */ -#ifndef ODP_PACKET_IO_TYPES_H_ -#define ODP_PACKET_IO_TYPES_H_ +#ifndef ODP_API_ABI_PACKET_IO_H_ +#define ODP_API_ABI_PACKET_IO_H_ #ifdef __cplusplus extern "C" { @@ -47,12 +47,6 @@ typedef struct odp_pktout_queue_t { #define ODP_PKTIN_NO_WAIT 0 #define ODP_PKTIN_WAIT UINT64_MAX -/** Get printable format of odp_pktio_t */ -static inline uint64_t odp_pktio_to_u64(odp_pktio_t hdl) -{ - return _odp_pri(hdl); -} - /** * @} */ diff --git a/platform/linux-generic/include/odp/api/plat/pool_types.h b/platform/linux-generic/include-abi/odp/api/abi/pool.h similarity index 76% rename from platform/linux-generic/include/odp/api/plat/pool_types.h rename to platform/linux-generic/include-abi/odp/api/abi/pool.h index 8bc816d4e64b..586e80f75bb4 100644 --- a/platform/linux-generic/include/odp/api/plat/pool_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/pool.h @@ -10,21 +10,16 @@ * ODP pool */ -#ifndef ODP_POOL_TYPES_H_ -#define ODP_POOL_TYPES_H_ +#ifndef ODP_API_ABI_POOL_H_ +#define ODP_API_ABI_POOL_H_ #ifdef __cplusplus extern "C" { #endif -#include -#if ODP_ABI_COMPAT == 1 -#include -#else - #include #include -#include +#include /** @ingroup odp_pool * @{ @@ -46,8 +41,6 @@ typedef enum odp_pool_type_t { * @} */ -#endif - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp/api/plat/queue_types.h b/platform/linux-generic/include-abi/odp/api/abi/queue.h similarity index 74% rename from platform/linux-generic/include/odp/api/plat/queue_types.h rename to platform/linux-generic/include-abi/odp/api/abi/queue.h index 1561e2239114..28c721a770e3 100644 --- a/platform/linux-generic/include/odp/api/plat/queue_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/queue.h @@ -10,18 +10,13 @@ * ODP queue */ -#ifndef ODP_QUEUE_TYPES_H_ -#define ODP_QUEUE_TYPES_H_ +#ifndef ODP_API_ABI_QUEUE_H_ +#define ODP_API_ABI_QUEUE_H_ #ifdef __cplusplus extern "C" { #endif -#include -#if ODP_ABI_COMPAT == 1 -#include -#else - #include #include @@ -39,8 +34,6 @@ typedef ODP_HANDLE_T(odp_queue_t); * @} */ -#endif - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp/api/plat/shared_memory_types.h b/platform/linux-generic/include-abi/odp/api/abi/shared_memory.h similarity index 73% rename from platform/linux-generic/include/odp/api/plat/shared_memory_types.h rename to platform/linux-generic/include-abi/odp/api/abi/shared_memory.h index 2c5b4ed2e7b9..05922238c881 100644 --- a/platform/linux-generic/include/odp/api/plat/shared_memory_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/shared_memory.h @@ -11,18 +11,13 @@ * ODP shared memory */ -#ifndef ODP_SHARED_MEMORY_TYPES_H_ -#define ODP_SHARED_MEMORY_TYPES_H_ +#ifndef ODP_API_ABI_SHARED_MEMORY_H_ +#define ODP_API_ABI_SHARED_MEMORY_H_ #ifdef __cplusplus extern "C" { #endif -#include -#if ODP_ABI_COMPAT == 1 -#include -#else - #include #include @@ -41,8 +36,6 @@ typedef ODP_HANDLE_T(odp_shm_t); * @} */ -#endif - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp/api/plat/timer_types.h b/platform/linux-generic/include-abi/odp/api/abi/timer.h similarity index 92% rename from platform/linux-generic/include/odp/api/plat/timer_types.h rename to platform/linux-generic/include-abi/odp/api/abi/timer.h index 9605d584121f..19b6a4b0d73e 100644 --- a/platform/linux-generic/include/odp/api/plat/timer_types.h +++ b/platform/linux-generic/include-abi/odp/api/abi/timer.h @@ -11,8 +11,8 @@ * ODP timer service */ -#ifndef ODP_TIMER_TYPES_H_ -#define ODP_TIMER_TYPES_H_ +#ifndef ODP_API_ABI_TIMER_H_ +#define ODP_API_ABI_TIMER_H_ #ifdef __cplusplus extern "C" { diff --git a/platform/linux-generic/include/odp/api/classification.h b/platform/linux-generic/include/odp/api/classification.h index 377d1a02f7e8..01be7063d102 100644 --- a/platform/linux-generic/include/odp/api/classification.h +++ b/platform/linux-generic/include/odp/api/classification.h @@ -10,19 +10,19 @@ * ODP classification descriptor */ -#ifndef ODP_PLAT_CLASSIFICATION_H_ -#define ODP_PLAT_CLASSIFICATION_H_ +#ifndef ODP_API_CLASSIFICATION_H_ +#define ODP_API_CLASSIFICATION_H_ #ifdef __cplusplus extern "C" { #endif #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include diff --git a/platform/linux-generic/include/odp/api/crypto.h b/platform/linux-generic/include/odp/api/crypto.h index 4f65932aa1e1..ead28eab0bfc 100644 --- a/platform/linux-generic/include/odp/api/crypto.h +++ b/platform/linux-generic/include/odp/api/crypto.h @@ -10,8 +10,8 @@ * ODP crypto */ -#ifndef ODP_PLAT_CRYPTO_H_ -#define ODP_PLAT_CRYPTO_H_ +#ifndef ODP_API_CRYPTO_H_ +#define ODP_API_CRYPTO_H_ #ifdef __cplusplus extern "C" { @@ -19,9 +19,9 @@ extern "C" { #include #include -#include -#include -#include +#include +#include +#include #include /** @ingroup odp_crypto diff --git a/platform/linux-generic/include/odp/api/packet.h b/platform/linux-generic/include/odp/api/packet.h index eff40803531f..5d744df544d6 100644 --- a/platform/linux-generic/include/odp/api/packet.h +++ b/platform/linux-generic/include/odp/api/packet.h @@ -18,11 +18,11 @@ extern "C" { #endif #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include #if ODP_ABI_COMPAT == 0 diff --git a/platform/linux-generic/include/odp/api/packet_io.h b/platform/linux-generic/include/odp/api/packet_io.h index 76c7dfeda1cf..9107685a36dc 100644 --- a/platform/linux-generic/include/odp/api/packet_io.h +++ b/platform/linux-generic/include/odp/api/packet_io.h @@ -18,11 +18,11 @@ extern "C" { #endif #include -#include -#include +#include +#include #include -#include -#include +#include +#include /** @ingroup odp_packet_io * @{ 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 1804fa6f2f1b..bfd65cbf1068 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h @@ -13,6 +13,7 @@ #ifndef _ODP_PLAT_PACKET_INLINES_H_ #define _ODP_PLAT_PACKET_INLINES_H_ +#include #include #include #include diff --git a/platform/linux-generic/include/odp/api/plat/strong_types.h b/platform/linux-generic/include/odp/api/plat/strong_types.h index 2e3070f8b185..ce920285efb8 100644 --- a/platform/linux-generic/include/odp/api/plat/strong_types.h +++ b/platform/linux-generic/include/odp/api/plat/strong_types.h @@ -15,6 +15,8 @@ #ifndef STRONG_TYPES_H_ #define STRONG_TYPES_H_ +#include + /** Use strong typing for ODP types */ #ifdef __cplusplus /* Allow type to be expanded before concatenation with underscore */ diff --git a/platform/linux-generic/include/odp_queue_internal.h b/platform/linux-generic/include/odp_queue_internal.h index dd846d592120..df1b29ff8dcb 100644 --- a/platform/linux-generic/include/odp_queue_internal.h +++ b/platform/linux-generic/include/odp_queue_internal.h @@ -18,6 +18,7 @@ extern "C" { #endif +#include #include #include #include diff --git a/platform/linux-generic/include/odp_queue_scalable_internal.h b/platform/linux-generic/include/odp_queue_scalable_internal.h index ddc65f604cb8..58d64aa5b37c 100644 --- a/platform/linux-generic/include/odp_queue_scalable_internal.h +++ b/platform/linux-generic/include/odp_queue_scalable_internal.h @@ -13,6 +13,7 @@ extern "C" { #endif +#include #include #include #include diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 566fc847c2c0..e6ed8632cba9 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -1772,3 +1772,9 @@ int odp_pktout_send(odp_pktout_queue_t queue, const odp_packet_t packets[], return entry->s.ops->send(entry, queue.index, packets, num); } + +/** Get printable format of odp_pktio_t */ +uint64_t odp_pktio_to_u64(odp_pktio_t hdl) +{ + return _odp_pri(hdl); +}