From patchwork Mon Jun 12 19:42:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103669 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp81259qgd; Mon, 12 Jun 2017 12:42:17 -0700 (PDT) X-Received: by 10.200.39.178 with SMTP id w47mr22642705qtw.87.1497296537746; Mon, 12 Jun 2017 12:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497296537; cv=none; d=google.com; s=arc-20160816; b=P97fwp7GAnAGIADXCuoWKMpVRFiE9P76+eM1dTxfky9ypMzTwL4YBHm0tnqj/WHE21 6RU17OAvyeH2v2wsEGPn7T4WAeHZXTF6B75fyVeitaWYzm0gLSb2EADVb7e2wDc7Mim7 Ssf7otkBRBZwsniWrWlzZAA0GP8tVcEg9BNmgL9sDz+0gZ9agPYfjcaKyZ/VqBVQcXOQ MMwx9kW9NqHGl/UK48lpGui4IsDJ0N4bDsKhZ9KMClo1IA3W/XI88YfuAPsmUPfGS0xp n/rJMoHptmbcGoIb3/3cxLvpJIuuf4bAt6tpaRd49AyfCcb1tYgxZJy0DZ93RcKt5Wge vfvQ== 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:message-id:date:to:from :delivered-to:arc-authentication-results; bh=EO3a5OGc4pWEqqGiHKc48GgsToXJUdLUdeXLOhxGqvQ=; b=OMHu1FpTin0aIExMy8+b553zj0bQtjcy5fV1adKTRF0DLLdjBbX20xz2F2YWfSPrZI UiQND1V0dw9yeo5enVi08zN663Sqmr45ggMMvWa7OXHEKGtKSepbrllBv3O03MjCa4sb /Qwf+EPauKa3VMGiYXWO9yu5oqOfyLlyxyzFBf9YOGBT13UKUQoOBuTDrKr6JmxiZCDg X4HRoQThlfexQ+ABeyAG0XlX474Hq3QcFgKTF6GcquIXGT1L388w3GynxE6U70uJuBhR pelHWf9kguJTy6hFf/CqUy9tolbRZN/0XjSDpSj1vC/STP/fZ3C4S4naiF8si1Fypz6b Gc2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o32si4823719qko.165.2017.06.12.12.42.16; Mon, 12 Jun 2017 12:42:17 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 8147960BEC; Mon, 12 Jun 2017 19:42:16 +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=0.3 required=5.0 tests=BAYES_00, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 D6CB2609A8; Mon, 12 Jun 2017 19:42:11 +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 DD4A9609A8; Mon, 12 Jun 2017 19:42:09 +0000 (UTC) Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by lists.linaro.org (Postfix) with ESMTPS id DF3E960993 for ; Mon, 12 Jun 2017 19:42:08 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id e11so18560457oia.2 for ; Mon, 12 Jun 2017 12:42:08 -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:cc:subject:date:message-id; bh=EO3a5OGc4pWEqqGiHKc48GgsToXJUdLUdeXLOhxGqvQ=; b=AYKa7hxN90i8wcSjVFDFqFNR0xRIysYndDrpcRbROdjuFRwIqkEbRew6nnnVjj8FyJ SrDMpy6k+KLTUVG3unZsP58QDfCkF1R+PElV6AnSmqW+XmpEv6GRH8QtpHvh5MMiQ42+ z1AF1/uPOmuhhPm+uPB2BTU2MjLA9nEpOiwWDeobxp+aSWtYtPxnnDDgu7gHMekmYdbp DWEA/rfILhrg3M5eaGwzlVMLP+HMNTPs++/Oqj35thkayHzkcddbKyxpS4yWJr2iTshr ugNcMoA3a1DXHJy/Yj4u3BrFIdGFgdJd8ebr1C8PsVrkUkjENg+DMt8uStEF9Pvv0zKJ bftg== X-Gm-Message-State: AODbwcAwfDfaPlANQqO9hm30NQGjb5rxu50jY3fkT/Q2i21Qm/w4iB6H FIn8CWhagol/lNwA2v8zWVwX X-Received: by 10.202.192.67 with SMTP id q64mr32720579oif.65.1497296528040; Mon, 12 Jun 2017 12:42:08 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id c93sm4698347otb.38.2017.06.12.12.42.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 12:42:06 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 14:42:01 -0500 Message-Id: <20170612194205.8592-1-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [lng-odp] [API-NEXT PATCHv4 1/5] api: feature: add odp feature bits 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" Add new odp_feature_t bits that permit other APIs/components to refer to various ODP features. Signed-off-by: Bill Fischofer --- include/odp/api/spec/feature.h | 65 ++++++++++++++++++++++++ include/odp_api.h | 1 + platform/Makefile.inc | 1 + platform/linux-generic/Makefile.am | 3 +- platform/linux-generic/include/odp/api/feature.h | 34 +++++++++++++ 5 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 include/odp/api/spec/feature.h create mode 100644 platform/linux-generic/include/odp/api/feature.h -- 2.11.0 diff --git a/include/odp/api/spec/feature.h b/include/odp/api/spec/feature.h new file mode 100644 index 00000000..dd8db780 --- /dev/null +++ b/include/odp/api/spec/feature.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP features. + * Define various ODP feature sets that can be referenced by other + * components. + */ + +#ifndef ODP_API_FEATURE_H_ +#define ODP_API_FEATURE_H_ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** @defgroup odp_features ODP_FEATURE + * ODP feature definitions + * @{ + */ + +/** Definition of ODP features */ +typedef union odp_feature_t { + /** All features */ + uint32_t all_feat; + + /** Individual feature bits */ + struct { + /** Classifier APIs are not used, e.g., odp_cls_xxx(), + * odp_cos_xxx() */ + uint32_t cls:1; + /** Crypto APIs are not used, e.g., odp_crypto_xxx() */ + uint32_t crypto:1; + /** IPsec APIs are not used, e.g., odp_ipsec_xxx() */ + uint32_t ipsec:1; + /** Scheduler APIs are not used, e.g., odp_schedule_xxx() */ + uint32_t schedule:1; + /** Time APIs are not used, e.g., odp_time_xxx(), + * odp_timeout_xxx() */ + uint32_t time:1; + /** Timer APIs are not used, e.g., odp_timer_xxx() */ + uint32_t timer:1; + /** Traffic Manager APIs are not used, e.g., odp_tm_xxx() */ + uint32_t tm:1; + } feat; +} odp_feature_t; + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#include +#endif diff --git a/include/odp_api.h b/include/odp_api.h index 8146e024..86232ee1 100644 --- a/include/odp_api.h +++ b/include/odp_api.h @@ -32,6 +32,7 @@ extern "C" { #include #include #include +#include #include #include #include diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 3d609aa7..9f856a15 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -32,6 +32,7 @@ odpapispecinclude_HEADERS = \ $(top_srcdir)/include/odp/api/spec/deprecated.h \ $(top_srcdir)/include/odp/api/spec/errno.h \ $(top_srcdir)/include/odp/api/spec/event.h \ + $(top_srcdir)/include/odp/api/spec/feature.h \ $(top_srcdir)/include/odp/api/spec/support.h \ $(top_srcdir)/include/odp/api/spec/hash.h \ $(top_srcdir)/include/odp/api/spec/hints.h \ diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 58c73767..b4bbd07e 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -38,7 +38,7 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/deprecated.h \ $(srcdir)/include/odp/api/errno.h \ $(srcdir)/include/odp/api/event.h \ - $(srcdir)/include/odp/api/support.h \ + $(srcdir)/include/odp/api/feature.h \ $(srcdir)/include/odp/api/hash.h \ $(srcdir)/include/odp/api/hints.h \ $(srcdir)/include/odp/api/init.h \ @@ -59,6 +59,7 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/spinlock_recursive.h \ $(srcdir)/include/odp/api/std_clib.h \ $(srcdir)/include/odp/api/std_types.h \ + $(srcdir)/include/odp/api/support.h \ $(srcdir)/include/odp/api/sync.h \ $(srcdir)/include/odp/api/system_info.h \ $(srcdir)/include/odp/api/thread.h \ diff --git a/platform/linux-generic/include/odp/api/feature.h b/platform/linux-generic/include/odp/api/feature.h new file mode 100644 index 00000000..55a86a83 --- /dev/null +++ b/platform/linux-generic/include/odp/api/feature.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP features. + */ + +#ifndef ODP_PLAT_FEATURE_H_ +#define ODP_PLAT_FEATURE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @ingroup odp_feature + * @{ + */ + +/** + * @} + */ + +#include + +#ifdef __cplusplus +} +#endif + +#endif From patchwork Mon Jun 12 19:42:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103670 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp81441qgd; Mon, 12 Jun 2017 12:42:55 -0700 (PDT) X-Received: by 10.200.42.177 with SMTP id b46mr12555888qta.122.1497296575131; Mon, 12 Jun 2017 12:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497296575; cv=none; d=google.com; s=arc-20160816; b=g1GgHTg1loDSRVOd3UmWswZcE2znrDLKqEipP7XPTaxAvuXUPBktLmvJFRBdETpka5 C3FjDY1Y/eSrNME744T4+/JrzT3/sYm4VENJ3BL5qvn0Ex79AJ1XkuXrCN5bEJ3OCl9T cxC09LvdlxmhV8LJS2Iwk5UKyq1eaeibjRIkJObCqZohonZmQDR2EXH8PwD98awQx9qc UbtGZwKCWYETdLAxgTX7RpwrP+VSExxDqlrIG36lqSSjW8sEFLG6TrSmzJsE/dCi9iOu A+2tctmixLwTqVzwglMyaSDC3EukqAgJ0K7Z2LdlM6BOfB5fHYkI3+xDg3scs3RylAAB yMNw== 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=lLVmjZKwMRjg60y5kCuHz9jPqw/+PsXr6rEBSu8fsMc=; b=KvQb91Mu54WvGbyk1Mbcjg3LNUyTxoBa1cKN5jJPFuj9vhDR1CflpVz2fRuiKPkzTe 5ESoMrFn1qIm/7SJ+nR+Sbnk/ldw2GYMzSznmy5+9KpaHmXo0Ul1I7YdA+NDnt4HTFPd oggCTGdjIOrUZNtI9KXAlpb8AUprksly0GXvaNCcXcQzqat7DiPeStxbo1w2LMk84K0S rCBlzzrCsTUuyXBOfdAoAh5tp6HVsbLYC6z/fefXBm73qrVlZloPqyXa1SMkzuypt3sC 0Trda7S9V3jwZ8nqzZAPu5dDpsAWPuHSnJx/4NVFMU6/h6xL6Zb5BvwWjh6RJza/4pyt FGwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q54si9409540qte.281.2017.06.12.12.42.54; Mon, 12 Jun 2017 12:42:55 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 6405A60BF8; Mon, 12 Jun 2017 19:42:54 +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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 49D6C60B65; Mon, 12 Jun 2017 19:42:14 +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 35D34609A8; Mon, 12 Jun 2017 19:42:11 +0000 (UTC) Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by lists.linaro.org (Postfix) with ESMTPS id 3F1C360993 for ; Mon, 12 Jun 2017 19:42:10 +0000 (UTC) Received: by mail-oi0-f48.google.com with SMTP id b6so6773960oia.1 for ; Mon, 12 Jun 2017 12:42:10 -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:cc:subject:date:message-id:in-reply-to :references; bh=lLVmjZKwMRjg60y5kCuHz9jPqw/+PsXr6rEBSu8fsMc=; b=EMrSkPMruOpm7oQHraTXCbyO4cYKFiWJwk8emDRmBDYlZ2KRojQpiVPKhYvKCOL07/ 8PbwRkbgHBMKv//UewvVdWZaSP6I2y2rU/0gBmkMLMlUHjHRdHAFEnqo2Ou3KDHxHhaw GcKRBxcPl2fcIUMSJK22wpEzItpm0Ok54GO3wqQMFXF3vhpoizfultto0WgAzAIirExg Lv7Mi8k9qQyPYIhHJtB48/bMtudbu90IhD4dRPN8xJ5+9nEYc0i/Pg1Lo0OsGNbRywZW JuZr4fb0n8vPdknmK5d4RmbrK5UhHGuAI+vYcL2nQDlpHdlrTBN5I2RWMHQxl0y0gSrc jbfQ== X-Gm-Message-State: AODbwcARCjbuuUC7nw5ljgUWjVvMi8f075+xRrC55J6JuEQPvMDcim38 /UH/ufY4D+0H4mjI70hac5Q/ X-Received: by 10.202.73.213 with SMTP id w204mr21929309oia.39.1497296529482; Mon, 12 Jun 2017 12:42:09 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id c93sm4698347otb.38.2017.06.12.12.42.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 12:42:08 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 14:42:02 -0500 Message-Id: <20170612194205.8592-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612194205.8592-1-bill.fischofer@linaro.org> References: <20170612194205.8592-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv4 2/5] api: init: add support for unused features 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" Add the not_used field to odp_init_t to permit applications to specify that they will not use various ODP features. This may allow implementations to provide optimized behavior. Also add the odp_init_param_init() API to initialize odp_init_t to default values. Signed-off-by: Bill Fischofer --- include/odp/api/spec/init.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.11.0 diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h index 154cdf8f..e8ec4113 100644 --- a/include/odp/api/spec/init.h +++ b/include/odp/api/spec/init.h @@ -29,6 +29,7 @@ extern "C" { #include #include +#include #include #include @@ -153,9 +154,23 @@ typedef struct odp_init_t { odp_log_func_t log_fn; /** Replacement for the default abort fn */ odp_abort_func_t abort_fn; + /** Unused features. These are hints to the ODP implementation that + * the application will not use any APIs associated with these + * features. Implementations may use this information to provide + * optimized behavior. Results are undefined if applications assert + * that a feature will not be used and it is used anyway. + */ + odp_feature_t not_used; } odp_init_t; /** + * Initialize the odp_init_t to default values for all fields + * + * @param[out] param Address of the odp_init_t to be initialized + */ +void odp_init_param_init(odp_init_t *param); + +/** * @typedef odp_platform_init_t * ODP platform initialization data * From patchwork Mon Jun 12 19:42:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103671 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp81761qgd; Mon, 12 Jun 2017 12:43:57 -0700 (PDT) X-Received: by 10.55.203.10 with SMTP id d10mr51263117qkj.167.1497296637816; Mon, 12 Jun 2017 12:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497296637; cv=none; d=google.com; s=arc-20160816; b=nFv6P2rbydnIsanNQc/Z1uLeU9jk+TkyV1C14FDnb9RTIhfuVvF87RhB+toS5XhlPA 2OwT96uFWrPmksP0IJVZAjMXcQSwWC/FV3LLGk+QZCMr3iflPLAgT3TuaPAyl0PRe1nn iXNAkiBzpq7ymVwKtA1/OcLUoZlv6Sl9W/Dd0njtVUa7sUPUn602PytjWDE4taHyx2lP D1L+9ewWtWeEiFZWAAATCrg4XfENdCwpriHAhItj80/uqrGZD62E8YPeIuAXcaNThSZa qA5gLr4HBJDx5Wu+JZD6peOWOl9xSJK0qNxviOm9Ibk3Opzxm5FQtstBGgS/wIOPYjjv 2mVg== 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=gpHEvZeqc4YTZqGiStLm9ZDaUW9tSYvVtFT+sQHpXQ4=; b=hzMmoJrXmUSAFBsgYHfpHL+AOAIm6u9DhPTS60azF+Qhd4ggF2/6Ems799d8gBDAu0 UssOy8/PwjleK/G4V32veoveL5biFUuAP36x+25CCbhKTX9d/UekfCCcZLgSo2sJn7cA 3VGjV8kcsN4sH1PwWIxpgxp4j1Br5aYBNjb++iz62OFvOa5zAYHYhfK93Nkkl9hkDYMV rtM4kwSJ7C+qpumNhpfZiZfMHYKkOABVuukjov2+uBRsD2iTki36Tc2L2xEJelLgEpR0 pNLVZMAhutFZ8RuuSpLEJbf7XLDCbpx1KDd8PywpCRX65aSX3puPwD44j8uVzjW9T1un AG/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i185si9769058qke.182.2017.06.12.12.43.57; Mon, 12 Jun 2017 12:43:57 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 60C8E60C0F; Mon, 12 Jun 2017 19:43:57 +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 C98F960BF4; Mon, 12 Jun 2017 19:42:16 +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 950E660993; Mon, 12 Jun 2017 19:42:12 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by lists.linaro.org (Postfix) with ESMTPS id 6074860993 for ; Mon, 12 Jun 2017 19:42:11 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id s3so57910981oia.0 for ; Mon, 12 Jun 2017 12:42:11 -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:cc:subject:date:message-id:in-reply-to :references; bh=gpHEvZeqc4YTZqGiStLm9ZDaUW9tSYvVtFT+sQHpXQ4=; b=W2zocA00Xo+b2KOPq2etf+H6fW5MfVHhWdERK1VmmNaQGmWym+CGPLRARTteHuNto+ 7ArB3ID4NmQG5+Y3ZdbCaJR2H5O/Vq0yfUisCjp18Ps+DDEWjo8Jv3pItJVlW5KQtAN1 2qAmaw0C726ExUZKgxjkcu43Qzlt0aLDGyJUB53OcOmyFawQ79KWUG7K+3VN9CdJ+uiU 2aqqf2/2KCwAbaCQ5b1nBIZLlO47nTLGlcv+vTwyr6SHvmr4tq+W5HoDcqq5dV/W3973 T9O0v30JQzTB5JFgZcGAitjIDrmLjDa/QQJ2GthZO/s2GaVTkc09F7qOYC9U6UtQVMAO Ktng== X-Gm-Message-State: AODbwcC9X/GN6rRmUwu5u95/c7ttA+WJlJ4oe8bJp8imIJVpxYOTw2vX n7RUVzXX3Ab6b6Fa+3MigJM1 X-Received: by 10.202.204.147 with SMTP id c141mr21277986oig.211.1497296530676; Mon, 12 Jun 2017 12:42:10 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id c93sm4698347otb.38.2017.06.12.12.42.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 12:42:09 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 14:42:03 -0500 Message-Id: <20170612194205.8592-3-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612194205.8592-1-bill.fischofer@linaro.org> References: <20170612194205.8592-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv4 3/5] linux-generic: init: implement odp_init_param_init() 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: Bill Fischofer --- platform/linux-generic/odp_init.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.11.0 diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 31bd7c73..62a1fbc2 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -147,6 +147,11 @@ static int read_configfile(void) return 0; } +void odp_init_param_init(odp_init_t *param) +{ + memset(param, 0, sizeof(odp_init_t)); +} + int odp_init_global(odp_instance_t *instance, const odp_init_t *params, const odp_platform_init_t *platform_params ODP_UNUSED) From patchwork Mon Jun 12 19:42:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103672 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp81866qgd; Mon, 12 Jun 2017 12:44:20 -0700 (PDT) X-Received: by 10.237.32.202 with SMTP id 68mr17586495qtb.128.1497296660831; Mon, 12 Jun 2017 12:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497296660; cv=none; d=google.com; s=arc-20160816; b=Fv9X67CAqqTmKeP6stAMNaBWHkmKs+KWqpwXREEIzWvouddc5Er+OsuHMtgmpKugLa aZ5vRv6KjQkiYXdK/CeHWomcMLVS8dZfMd12SY9VxPu/urAdsymcTxmJA3Qgj5Va8r/e BAi8GPlRKwlYFqy5aWsTLKhFhASA8jLj9sT3P5lukQJ9IyabQb6tnlGJQ0kAl7BHSo+g k1KpZjwOqZB7Mu21E+zmS/EqR0sekUAuZVaA87kOaBNL7nu7z77oyCA33Dog6ogFO8o5 u2WCOtV2Wkx7sf2CzNk5eaEaLNa1EgyEX5ujV8yHcMt8HPO0U1zATNUahIot/EjKpRr+ lMzw== 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=LmNxT3Pg+LDeOg8Q5pmdwIYAflUaZ1hTS0cVH39Ttr4=; b=J3AjDA75srnNH7BZpkNs3Z23quY9hsP4QSivQfbaECa33awbSJpcGxuh3h1SyovjMQ Os+ZmvbWpj0MB/5rRn18XV6M3Jz9dpUEYh3cRD/k77T/jsx02rldty0O9keVsd148NHU OWgbun2vdodRDezjURKcroybAYRWRT8IZFuSPsyEl8BsmMUqOpF1IqzFkpOjqj31315G XdLSk8rTHMOyLnzGTTMTiwNWoJN9tgDlbwMCF6PnZidjvb10M5DsArn8APtQ0ym0ZsFw PaTyhddnDAT0fk71dwESDVhza2neqRquIRGbfb41fL0/eR83ce73E4YqXGRl86GCcouq fOIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m62si9418240qkl.120.2017.06.12.12.44.20; Mon, 12 Jun 2017 12:44:20 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 EFA6060BD8; Mon, 12 Jun 2017 19:44:19 +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 5315D60BFD; Mon, 12 Jun 2017 19:42:47 +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 6BC1360BE7; Mon, 12 Jun 2017 19:42:41 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by lists.linaro.org (Postfix) with ESMTPS id 77ADE609E7 for ; Mon, 12 Jun 2017 19:42:12 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id b6so6774428oia.1 for ; Mon, 12 Jun 2017 12:42:12 -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:cc:subject:date:message-id:in-reply-to :references; bh=LmNxT3Pg+LDeOg8Q5pmdwIYAflUaZ1hTS0cVH39Ttr4=; b=RmWblT3BD8rTHjn4VETIHUN8zy3t31A+vwZAdRnfceIB5FUSRQt/Pm8+ddwtBGJT+0 PJMQenbp/9+0tbgG7yer8u5Wg+5AkYqnJzXEzFKJ/ITAZIDKHZLBhtB38HGYzVFvPtPl HvzcEEwpKHgZsOBEpUSvRwhlcO2RJpTMxo1/ruPiKLoBebb1rES0jahn1RRdkHAR4L2p v8Q4NPJeuKqflOAENRN9oWyRo+SlcPGnKsSr5EsAX7DRKo5tv9IRRxdZWO+G9enI9IHY QxupAMCu9LXcbrC2r+loG+83nNqeC44tZ7bOLrSIF5s6i0GxLlZJn/PbLI4I8Gc1soFf anYg== X-Gm-Message-State: AKS2vOxUZe2m/2i2vDabg94D9NkBsQLXGADN/esgKLSDGtozbeHhdlc6 H4g0namoQtKRrh7g0BwEXWeK X-Received: by 10.202.117.213 with SMTP id q204mr4360894oic.131.1497296531570; Mon, 12 Jun 2017 12:42:11 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id c93sm4698347otb.38.2017.06.12.12.42.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 12:42:10 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 14:42:04 -0500 Message-Id: <20170612194205.8592-4-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612194205.8592-1-bill.fischofer@linaro.org> References: <20170612194205.8592-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv4 4/5] validation: init: use odp_init_param_init() in init tests 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" Provide test coverage for odp_init_param_init() API. Signed-off-by: Bill Fischofer --- test/common_plat/validation/api/init/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.11.0 diff --git a/test/common_plat/validation/api/init/init.c b/test/common_plat/validation/api/init/init.c index 61055fad..6f9556d7 100644 --- a/test/common_plat/validation/api/init/init.c +++ b/test/common_plat/validation/api/init/init.c @@ -24,10 +24,10 @@ static int odp_init_log(odp_log_level_t level, const char *fmt, ...); void init_test_odp_init_global_replace_abort(void) { int status; - struct odp_init_t init_data; + odp_init_t init_data; odp_instance_t instance; - memset(&init_data, 0, sizeof(init_data)); + odp_init_param_init(&init_data); init_data.abort_fn = &odp_init_abort; status = odp_init_global(&instance, &init_data, NULL); @@ -77,10 +77,10 @@ int init_main_abort(int argc, char *argv[]) void init_test_odp_init_global_replace_log(void) { int status; - struct odp_init_t init_data; + odp_init_t init_data; odp_instance_t instance; - memset(&init_data, 0, sizeof(init_data)); + odp_init_param_init(&init_data); init_data.log_fn = &odp_init_log; replacement_logging_used = 0; From patchwork Mon Jun 12 19:42:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103673 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp81976qgd; Mon, 12 Jun 2017 12:44:45 -0700 (PDT) X-Received: by 10.233.223.199 with SMTP id t190mr22207156qkf.247.1497296685336; Mon, 12 Jun 2017 12:44:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497296685; cv=none; d=google.com; s=arc-20160816; b=ZYkD/+NbpDrKX+1zPYR79Htd3SVNEKqQ9SG9xgT4IrTLLtbhtSX/Qx3RXbV5J+kBJ2 nZa713csh1vufJ68e6h6qmShxc0CU7lQ6We9+/VfB0Gmh1AAq7//tlRNKngdDmKbs9Od C9/BpUCt4CWUVgg3dUlZzJ22YFP2/MXdmMM62hlu3n19AscrbXZqSdxhIroGItYSgskv ehctEYVsS4609NTFR5RwMpa4pu56ZPrV0MU4RXENsWw5IUA04SIOmC4UNMsn8a02gG+I bG8ASZJyE0zwsauaha/kXLu0IetSsJqbMVzPQXSWMtf1IUlEm9q8YEa/kZcqhUvN1j6p uDxg== 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=F+Nh4Sug9sNY6KSSLhPzJSavPumXjiZ5LVB1dfcTznY=; b=J3T6Cnm5ywMuZx/3Z5rKBi0JRM2LCmXUZ/d35Ya0tX83c98MaWbs+5x1Ey2ROjcifE OSbEFKrIuYbwThgNTn+Y1snyeezTJZ3AvGHYr2XkaICbtmoZapyFr5ueE4sbui5FCNTu /jj8kbzzQVBoQqtMytxdocr4yn0VliRB/k+aCm3ScfVh17qY5glZVAwSUjlgxJ3mWQxK KNa9TTUeDZ/N4eY23+/5yhAvqBXCa/FthPc6rZ7x5b59U7I4ORAW6VPsMambwy3V5in/ bOXKZYPvslYc8Wvj3NOueATbYlG73Pcm2gwYJUpQINc7t/yEggRMkq8nnX5JZLAnWlI1 C7Rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d81si6667407qke.262.2017.06.12.12.44.45; Mon, 12 Jun 2017 12:44:45 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 13F7B609A8; Mon, 12 Jun 2017 19:44:45 +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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 AA6CB60C02; Mon, 12 Jun 2017 19:42:59 +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 374AF60A36; Mon, 12 Jun 2017 19:42:52 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by lists.linaro.org (Postfix) with ESMTPS id 6C36860993 for ; Mon, 12 Jun 2017 19:42:13 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id k145so49241859oih.3 for ; Mon, 12 Jun 2017 12:42:13 -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:cc:subject:date:message-id:in-reply-to :references; bh=F+Nh4Sug9sNY6KSSLhPzJSavPumXjiZ5LVB1dfcTznY=; b=CbnOF0fCDX07/gDxH6fJy7/By2jVqZ5om7fWv2AGGnm4DsEvPVUHE9mYJSrK3n2uDF I1RC+dXldf3XxZ7YSb2h3FO5DCLeTMvw5ge323FNRcbZnagLWBL3Yu2V+zdohPS+SJCk nREFf5DdJJUoZaUN2FZWK4P3N8hf8T7PtCBwzS16LNFNmpRydndn6qJZjwjye3Rr5lxN v+RJszvJ/RxS2b9qLe1uAbWyiVetrghQBmzOWDALT4voPVLh1+NW6or/GQ5O7NLyGywm QJmidBE06I+avJtYRds+U2ztjAtulss0IzZ9KmNMGPSHkSfS5LeGuTg81Lqo4oOi0fKK qiGQ== X-Gm-Message-State: AODbwcAReDHJEl9LLHpJYCig5xTKV7SRFrUBAJwJiIscQUhn7X8sDymm W6qdRWYA9zWx0B/Nh4GasQwY X-Received: by 10.202.98.68 with SMTP id w65mr29884743oib.173.1497296532637; Mon, 12 Jun 2017 12:42:12 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id c93sm4698347otb.38.2017.06.12.12.42.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 12:42:12 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 14:42:05 -0500 Message-Id: <20170612194205.8592-5-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612194205.8592-1-bill.fischofer@linaro.org> References: <20170612194205.8592-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv4 5/5] doc: feature: add odp_init_global() documentation for unused features 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: Bill Fischofer --- doc/users-guide/users-guide.adoc | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) -- 2.11.0 diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc index ead8da5e..d78e0777 100755 --- a/doc/users-guide/users-guide.adoc +++ b/doc/users-guide/users-guide.adoc @@ -530,20 +530,44 @@ calling the terminate functions should only be done when the application is sure it has closed the ingress and subsequently drained all queues, etc. === Startup -The first API that must be called by an ODP application is 'odp_init_global()'. +The first API that must be called by an ODP application is `odp_init_global()`: +[source,c] +----- +int odp_init_global(odp_instance_t *instance, + const odp_init_t *param, + const odp_platform_init_t *platform_param); +----- This takes two pointers. The first, `odp_init_t`, contains ODP initialization data that is platform independent and portable, while the second, `odp_platform_init_t`, is passed unparsed to the implementation to be used for platform specific data that is not yet, or may never be -suitable for the ODP API. +suitable for the ODP API. Each of these parameters is optional and may be +specified as NULL to accept the implementation-defined default initialization +values. -Calling odp_init_global() establishes the ODP API framework and MUST be +Calling `odp_init_global()` establishes the ODP API framework and MUST be called before any other ODP API may be called. Note that it is only called -once per application. Following global initialization, each thread in turn +once per application. A successful call to `odp_init_global()` returns rc = 0 +and sets the `instance` variable supplied as input to the call to an handle +representing this unique ODP instance. + +The `odp_init_t` parameter is used to specify various customizations to the +ODP environment being established by this call. For example, the caller can +specify the maximum number of worker threads it will use, the thread masks +associated with these threads, as well as whether the default logging or +abort functions are to be overridden with an application-supplied handler. + +The application may also provide optimization hints to the ODP implementation +if it knows that it will never use specific ODP feature sets, such as the +packet classifier or traffic manager. Implementations may use such hints to +provide optimized behavior to applications that are known not to need these +features. + +Following global initialization, each thread in turn calls 'odp_init_local()'. This establishes the local ODP thread context for that thread and MUST be called before other ODP APIs may be -called by that thread. The sole argument to this call is the _thread type_, -which is either `ODP_THREAD_WORKER` or `ODP_THREAD_CONTROL`. +called by that thread. The sole argument to this call is the `instance` +variable returned by `odp_init_global()`. === Shutdown Shutdown is the logical reverse of the initialization procedure, with