From patchwork Mon Jun 12 20:54:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103675 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp105420qgd; Mon, 12 Jun 2017 13:54:50 -0700 (PDT) X-Received: by 10.55.50.203 with SMTP id y194mr6866964qky.40.1497300890311; Mon, 12 Jun 2017 13:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497300890; cv=none; d=google.com; s=arc-20160816; b=pqs2CF7c7zuoId72pUq27AvdlogF/rJIwmHVRjnYxIV8lusraCO9VQAjqhUAQcAzmF gqZB477b3fR1imfmYOedR1pIPG3Nd4ezT1TbbnRPMrzTC+3hiTec/5T0e7vJ7uGgl6Vi LQ3UTmwmolCO86G1Wj/GSYk2T4cfWchgxhH4cT2PIrWxl2q5YUIBOyxUzrhX2yDacI2T Te+KwmIHPKJoQpEJaIsA2VGZMk6UZu5yRnhBmrRDvZQt1YmIiyRyRPjXI6Aqqk5+wwPd nHyhWCQC0sx7sllAkGX/5K3BX6ywcM5HfpH0eDqUAle5cKLKirgZfVLN2ImmqCdWWJg1 YIRQ== 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=wKEkiGEXszlvfFU4Xb3RxYMMqipmhgLLxIo3RItF8Ja5dUk63k5U/9cWkN4WdPizHq Nh9GO+XyVEijnc6WdG/fH1amx9FyHiU1+URxL35DSwktgFeOJaprGayClH/i58guDWwH eFfTGScgLW0AvudqVybMF85A0EPgMGGErRkqL4IUmf5Xc8IKVn0KejiAh/NrKRDVrn8M +JVAnbU3tFSkElpOSD3N2CSz5uYwO18XPMPo2mkow0wy6cMM6kCw9MEKcm3XGdOo+J+R t/mSkIl0/SBIhng9P8pKgY1skmUV0yCSko7yAMGW5WwyfUGBTmf2e0M8BRDQ3sDgX5Az /K2A== 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 40si3091499qtt.63.2017.06.12.13.54.49; Mon, 12 Jun 2017 13:54:50 -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 612C060A36; Mon, 12 Jun 2017 20:54: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=-0.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 E365160993; Mon, 12 Jun 2017 20:54:42 +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 214806099C; Mon, 12 Jun 2017 20:54:40 +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 17B0C60956 for ; Mon, 12 Jun 2017 20:54:39 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id s3so58970135oia.0 for ; Mon, 12 Jun 2017 13:54:39 -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=Xic7U7Xgnqj2WXHS7zhjRUFuMY8cn9bDr97v7EESsdJo2Yumvtf6xDJtuSpem4hYhH 8fMspCxYafZazEQEyx8MpaYN5iPCyeUuW1byfQNA0fCXNDrSeJ0bBClmngPqf+as2Any 6Duw5dn6XiTIqomRXwjguX4UFOl5VCsroMZHMscPwiBPd1gux1Hx2ohA8KdxsZK6fBIx 6LZecEwoEpRVfIhGHxrVX+81zAvxRxbSW4/fP3wkHaMbeaQuIbwGIka2kJrzEfcHR6iF xw5Gu3qqH24jvFPS+TwkuaiOn4L3VauxJDC9I+EqgesnUfDeIJcHVBnI2qqNhwxsoe5M S/sw== X-Gm-Message-State: AODbwcBZ+a5higcuSNzqyFOz2Nmn4nI24VeHuYtTP1QQzu+CbbBMlSr1 AiE4DkuNmRpWWRqtpXXyCPYH X-Received: by 10.202.197.3 with SMTP id v3mr22517994oif.144.1497300878061; Mon, 12 Jun 2017 13:54:38 -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 y34sm5427056oty.53.2017.06.12.13.54.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 13:54:36 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 15:54:30 -0500 Message-Id: <20170612205434.21993-1-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [lng-odp] [API-NEXT PATCHv5 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 20:54:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103676 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp105597qgd; Mon, 12 Jun 2017 13:55:27 -0700 (PDT) X-Received: by 10.200.12.78 with SMTP id l14mr3819438qti.227.1497300926967; Mon, 12 Jun 2017 13:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497300926; cv=none; d=google.com; s=arc-20160816; b=q0zB7ZvpQU4H7jnoyjCT6oz/0gpFk6n7Qr2o+S+UilnYttIRNdSMSE22tpFx/MYr4i lJZwsgWJDCjlVY60ZDAYgMhnXR7awtNbzVddnM3KgRf7W3P+Dh4qBMJ2tELE2fNDydes qgd7A9bASQfOorRkOpzqwaaie+HZlD95C2OM54gq4Daif3pCFPlhrB/a0w42NDtksQcN cXRQJe2ypuZ88kjR7ir/e8+AkQs50Id50rOWCjyi8VYWlm4EqFQ4cjaMfRFWXoVXFhsx bE0yb2uwFGGAoHpyeKMfycCxUtGUyn5bU2Yx1SKxzyLCzjlC0y+7WhtnSGj9uwQFwAqP qQjA== 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=0ZiyWrq9Ksmf2X3U9cFJmazoEJa+A1h8ajIuVDM+iNdUo7Bvc+2VbdgspXXEUIM/F7 +6KCRKK72jcJb79yxO7v06gUcOo7rIF7Q3161OswTGdVZw0D0e3oZcuIsX3A3Zeu08nu 2Wm1PpJfEHm6ByFGbJpzv0yunYLKITNL1SjuIARF3rLSG5F3LNJg4uZu2qcFk3xWpN/2 eoeke2EAb0RV/WKTH44JrdHetXS6gHedjtcfNaPrmfxgk6Z2/i4L+OeDrcS4gjXN1att TQYT/7uJfl9W9Idmhaqk8xiYjyV9owk7AWEe9oqSl+I/zNV3JN58KsLf2B6yHbFyAU2v 3shQ== 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 f95si9494409qtb.88.2017.06.12.13.55.26; Mon, 12 Jun 2017 13:55:26 -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 9FAFE60BFB; Mon, 12 Jun 2017 20:55:26 +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 45001609B0; Mon, 12 Jun 2017 20:54:44 +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 C22656097E; Mon, 12 Jun 2017 20:54:40 +0000 (UTC) Received: from mail-ot0-f178.google.com (mail-ot0-f178.google.com [74.125.82.178]) by lists.linaro.org (Postfix) with ESMTPS id 977BD6097E for ; Mon, 12 Jun 2017 20:54:39 +0000 (UTC) Received: by mail-ot0-f178.google.com with SMTP id a2so74333847oth.2 for ; Mon, 12 Jun 2017 13:54:39 -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=NxzN1Nh3uzJas+5ZVJuy9CcnvgD9hzrVrUtNyoGQOtN28CmcGjp2wXsGM+zYQdEeDA a5Dloy5WyzesvTy6Vcmaa8entBZS9WLhmf/AfmHm5urNr+/GdsQZt+lIhigkPtlnkkkX sICoQyVApH8cIOiY+bBRxS5sf8lD+O1DK2DZYiPi+85AX7Fg0Au7wNLMsI7GSifJI366 75RNbJbx+AZb26UhmC+tc0wyfKLNsFKYPKbwnHdHFmkUkZGkMet2gOTXGv6spcWTCqIm 97rNSo46Hgc7+fWLZDXQae7npInW7jZ4DVe2S6wf0HVD566ohNtnmwhZNwXy/Ei4Q9hl lpFw== X-Gm-Message-State: AKS2vOznrzsx8A1/XAAT803BBGdflMt4KrJvlsHQfRJtg6zh30dQ2c6u WlizgcoY3yYy3kKRIDisPkep X-Received: by 10.157.18.204 with SMTP id g70mr32856110otg.123.1497300878736; Mon, 12 Jun 2017 13:54:38 -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 y34sm5427056oty.53.2017.06.12.13.54.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 13:54:38 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 15:54:31 -0500 Message-Id: <20170612205434.21993-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612205434.21993-1-bill.fischofer@linaro.org> References: <20170612205434.21993-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv5 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 20:54:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103677 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp105697qgd; Mon, 12 Jun 2017 13:55:51 -0700 (PDT) X-Received: by 10.55.114.2 with SMTP id n2mr61956000qkc.157.1497300951857; Mon, 12 Jun 2017 13:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497300951; cv=none; d=google.com; s=arc-20160816; b=wMw3ML/FJ4yssDt/LJAkMi13I8vb+Cg4LbMWNwrYQqt0EJExR4hp4JLxhBhsuc7RpU gShUk+PyGKcCFA/SV0eczPXyd7NZEbuNqooSaTpJAWGDpgV0qu+DFQDNTlghYkR/oxgu Xtz3nIttmC/KP2U/YEJqab2btKXaIIPMf9isaszcF3mBkwXImnQws3ic2h1uVKzW89+f PaEuBHTLQ9DL1s6bWO9ANBrRS74URZj4eSBVx9WGwoobcPJj2IUkRDJOEJLV+DXjegjD RcZHTRBPHWcNzotX+0RoLsvLzO+uTsU62VlF/8hPMCpVtIAmqYmTz7vZm0+m0ZEmilya M/gg== 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=ihycqBHUQB6LWvT849BhU9NtqLfqlu9UgLPZUSyWvjwkeeuiEuIQh2sFBroA0coaUM 0CwXzIxnAPa/I5rH/cErnmfqvbXauUTplW3wjPXBX0n29u84Q8j27/rO+dTYzK6VL3av L2uTeilGYCJ0kgglZQ/xx/vvifg2RaNXCGiAgHE4sV2iuZPLUwlINrL3KsFxch2FM6Us QmH/nYnBxhdjQi1gSBLC6dGEcNfAKg2D33DJGEIR09cUcPH4fKdDmQNb2rusmexG+fX/ ay1Ij6YEo8Hdp9QGhbSnEGST1NVLRhIhr9RWpJqK8xAExrD6aC+agRYblUo9+9tUlhq5 ehEw== 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 h15si9666868qth.149.2017.06.12.13.55.51; Mon, 12 Jun 2017 13:55:51 -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 84F5D609B3; Mon, 12 Jun 2017 20:55:51 +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 A29E960BD8; Mon, 12 Jun 2017 20:54: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 C8CCA60956; Mon, 12 Jun 2017 20:54:41 +0000 (UTC) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by lists.linaro.org (Postfix) with ESMTPS id B349160956 for ; Mon, 12 Jun 2017 20:54:40 +0000 (UTC) Received: by mail-oi0-f43.google.com with SMTP id b6so7838862oia.1 for ; Mon, 12 Jun 2017 13:54:40 -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=lUsJMUthdLK4zDvZwpaHGp1lxXnyZNt+b3yicCr7D2ScRtoDvUfbPRCaoBIGtdVxru 7MAE6kcn9ovgNS9evVtZZdPFq7wBpSF0sWHCLjQSw6XYRv+T99yOoX6gae1JPHDtxASR ByInLphAGFy8O9ZYpGe6ODoEhXlJ1sOZJfOJs4rYrNMQn311ij1AlUGQ5YHBzp35abpe vSLv+Dskgh40VXi2gMDV8ifSPRH1nKEwyyjs9Muz4vriM2PJfqfrD3kDnh8pP1cW5Ov+ orEk4dJXzk/97mSZcjFX6tOPx8RA6XCCGhOTUEUbS+GDRUcaPxGQ+i78jSa3tS6XbQ92 v0mQ== X-Gm-Message-State: AODbwcDNY8pJPfYVEju6qjo9BP5rmxp3hWIaWXfCBhwa+Yqawnn/rUEn FZCBquTZHGyfMvVb8zK0x5tk X-Received: by 10.202.59.195 with SMTP id i186mr31648279oia.188.1497300879904; Mon, 12 Jun 2017 13:54:39 -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 y34sm5427056oty.53.2017.06.12.13.54.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 13:54:38 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 15:54:32 -0500 Message-Id: <20170612205434.21993-3-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612205434.21993-1-bill.fischofer@linaro.org> References: <20170612205434.21993-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv5 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 20:54:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103678 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp105851qgd; Mon, 12 Jun 2017 13:56:23 -0700 (PDT) X-Received: by 10.200.46.50 with SMTP id r47mr53324919qta.209.1497300983675; Mon, 12 Jun 2017 13:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497300983; cv=none; d=google.com; s=arc-20160816; b=COCmYfXulHOV9vGQFXYtwedQAUF1TWjFF5Ok50k265zFvq7gSvvfE/Qa5uwQnTx9Nq Q/zWu2vRbg2VD88HVfRxgxQLk95R7F6/S4ZhJVfutI8h5lHW2cfYQfZOSRtajrQo/y52 Caqvd2a/HGoOmZ23ZO+C2frWkcCNfBngy3s0HB8spSdIps54PaR/hWqJBgTS9aP23Mcz eUYepGTzlGz5qwEkRoyydrXajq3J200ln/7RJ9DRvXplGaI4CZihQngezSYZFOyf5b9/ lTP4YKLTKxXuKGiyf0Hs+iB5E4RK+avPjt8CtT3Ld06rDpAdUO3NFQEc+ZkVwIRrMIDy /Dig== 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=CfbEegLpbb6iWmq+iAhu1HgsOpDv9UAAmy4Bv1t6AAhIAyKmdvYPEkzPcQTVKP3QFk mLEoWe01+1+nP+gdCtissaX3HMFEB1f8YG735ZMjJUZOhrNC9PKqTFWLH99CTYMK2AiL wTMy2vRtugrEEdOYjhMhlRl+EiW+hfZQt4FIkFKbGhH572EnfXmoXSTmLgS45VgAPP17 l5UaY94BhH/nRmn469dr18+3gsLITbzZ2cUPtYxeVodLf2RFx0SYsld3tbBSx23Ytrbn 6CRq1uu4ElGwMd2+u0T6/As+F2QpbeMslcyRuQA0AQy9Q1STlNH+QHDvIEG512sHGuuc MTkw== 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 i29si9914161qtf.132.2017.06.12.13.56.23; Mon, 12 Jun 2017 13:56:23 -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 5A59460589; Mon, 12 Jun 2017 20:56:23 +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_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 05BEA60BEE; Mon, 12 Jun 2017 20:54:50 +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 6C489609B0; Mon, 12 Jun 2017 20:54:43 +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 12AA960956 for ; Mon, 12 Jun 2017 20:54:42 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id b6so7839178oia.1 for ; Mon, 12 Jun 2017 13:54:42 -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=e0tnVHw2hCVrIUZns94D0YS06WMAnIzB81z3uR2XClXjnAaz66rPIQDKYYlqhUB5s9 Fv3rlDvRMgcYx8FUfZF7FuJXk4fToi8PRzyBka0GXm/WHdkKOtCpDznM9TC+kknrORPm I7CgSJ+8UeN0lxkfeszv13U7AiHWxa1iOF2c3rIBp/9/fjbE6zGFBRdJLMd7mewNOrSY 0Przqjy0xDsDmDRwz9g+3I+19v1OULzh8wxG6ggq4s0LrwETfORoFk/2izu9ktCyB4Mr gUOQaXL7SghPUOlAwYFzmorgajGzNNBD7Ayg1rj5v/h9YlbGm5t+22YSFcL6/orBvhSK j/eA== X-Gm-Message-State: AODbwcB6/lNBB5m+2q+raUs8pMikd3ECK24bRECbJbMuVCG9DkXH7ONB jJfJ7M3Sl1p3PbgNreQ0PKuL X-Received: by 10.202.214.3 with SMTP id n3mr22773191oig.155.1497300881269; Mon, 12 Jun 2017 13:54:41 -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 y34sm5427056oty.53.2017.06.12.13.54.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 13:54:40 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 15:54:33 -0500 Message-Id: <20170612205434.21993-4-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612205434.21993-1-bill.fischofer@linaro.org> References: <20170612205434.21993-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv5 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 20:54:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103679 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp106062qgd; Mon, 12 Jun 2017 13:57:11 -0700 (PDT) X-Received: by 10.237.48.229 with SMTP id 92mr33960460qtf.156.1497301031070; Mon, 12 Jun 2017 13:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497301031; cv=none; d=google.com; s=arc-20160816; b=P4hvS579BmWU9vqAd79J9ZBHcbFP1XMbmbU5+9k+pqHLk/HOAn+5BHSawn9bp7Awhv Lt3s4xOTRGU+3zbi4Tmiseheenmd77gnQfCpuxLULXIHJEMArRkgexu1v3gc1Ag683zw ERrpUnQuU3cU1/GvgiXwKlYlzT9stqv/4RLBHeuKIZsUFV1kVuKoo5pCjF48mkRpWjuH lOz4AE1xkE367/qPNYZYKri0DPKlIclsYjjT1FqJSCToTxkfI0vMhVH/t1hLbe6RMlDh O4TSWrnDQEu0FGsl5d65576rUcrIMmHjhsjVAKVgjYc8UqwuTpSxG550Z0W6II59jQ52 Pkpg== 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=pk/gNV3fd6oeKOKecKjBBx2mY0K+G5WFcXJbM7Pl9Og=; b=jhTI1D2IGJMN2NdPHKWAO5K+Oq6MqayiRZuZkpLnpDIH2Jf3jUN8GmiG7Lwn8gwKja ZZ4LLgtj9YgTvynPJgyqgJyDxYk3NyFmA0DVQVtigkTjnDNAkJZDs9gQ+mkA1avScKNb 4dpEa6+8Ixw1l8Y3LOPBr8Y9CYIdakDnDas2kPvZP3dltieNnsrQWQU6zca8VoXqM5i4 /DT3HAeAsQCXfm7O5utKzqt8U3y2XXOZ65Ke/J0VEHF7XG35UqcUbq0jKimRwfSamuIa jItfN3QpJme5Wf6zIJGQbDSu9v5/cem5LqGux49l3RfW8HN7nMTOpb14oBRQxz2cOKql VXQw== 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 a17si10170704qka.322.2017.06.12.13.57.10; Mon, 12 Jun 2017 13:57:11 -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 A479060BE7; Mon, 12 Jun 2017 20:57:10 +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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 F3D9560BF6; Mon, 12 Jun 2017 20:55:18 +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 13CC560956; Mon, 12 Jun 2017 20:55:15 +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 A6CFD60956 for ; Mon, 12 Jun 2017 20:54:43 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id s3so58971096oia.0 for ; Mon, 12 Jun 2017 13:54:43 -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=pk/gNV3fd6oeKOKecKjBBx2mY0K+G5WFcXJbM7Pl9Og=; b=UT9TbUH8HERxIK6VOPmhq33chHc7O8Gm1f26y6HbQKiBL6MWgnKHZQxizPSEGejWdn JytBDee7ZVV3Z/9zkVITfWFFQd3XfUBVxVL0LaeQdLBVrH7qdJq0B+kxQxZSuxYmty6o cYkhIUeYcapbO2BlynhvgppBVF9FCkN59Q7/vLhqQNgNaCv5S4T7cS71GQzc9sKU0Vjx S+RcMgtGefTHUGvxsIiyk834rq0nQEUTRglqEqlmMz1UMxigP50ljmNJL5zEmywSX8mq bKNzTyuEVJ16YtrTpxir2zkFdPTBdKzJ4VbHFkN68g3BXc8Ymplp8IzYSihhJZo6KOLJ 0EQQ== X-Gm-Message-State: AODbwcC/PNhCa/AZPsgwnK7QlmC3GOfu5jQ3G8i6VSBcGHIvtPkMgGYJ v9E2JecgqqslgtWH9mbNECTc X-Received: by 10.202.94.198 with SMTP id s189mr29839885oib.202.1497300882692; Mon, 12 Jun 2017 13:54:42 -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 y34sm5427056oty.53.2017.06.12.13.54.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 13:54:41 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 15:54:34 -0500 Message-Id: <20170612205434.21993-5-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612205434.21993-1-bill.fischofer@linaro.org> References: <20170612205434.21993-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv5 5/5] doc: userguide: 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" Update User Guide startup section to include current parameters for odp_init_global() and odp_init_local() as well as optimization hints for unused features. 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