From patchwork Tue Jun 13 12:55:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 105160 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp449352obh; Tue, 13 Jun 2017 05:55:26 -0700 (PDT) X-Received: by 10.55.72.198 with SMTP id v189mr3124434qka.133.1497358526694; Tue, 13 Jun 2017 05:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497358526; cv=none; d=google.com; s=arc-20160816; b=uZsitg3JSKg6RbFPtrfRyLeLkaDItneHkX7/hXvy668bl4/o38VzlSo5WuEnkGMgdJ 6sSPGwc4PzV/vxkLT0gx5H6NchmYnGk9TiLlz3qvTCsnn37M5snLM38A9X8Z5F/hZ+CN MoQZEAH1LB5DB0u2r1aLalnfBzRmmfIWJxy89FVhfLyRp1oYIzQrjCiyor3Q83POPFs5 LxZG/bXpWys3Yg0qRx90mb06z0E0phDCR9fepFW4KZ+Rc7qYy6WaFMnBkKx+V3YcJE7L 9r7kFfQvTd9Ou1vvaA0s4v+Nl0YdYix8St6/6JzRtAVzATwcBaaHlBp+rCIzQUEHFsjG iUeg== 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=NIG5PxrpQMZvnqWmrVjMz/7loMJKm5nyCFCcRMAR1hM=; b=TXjriRnvaaPDTfQyhWcfvKYjRdAcwjVf3GgpTx13haNt1+Rvdmq/uAA36kn3YkGppZ mB6KENoCpDTT6KA9c+PMyKWxpzoWLpF4+xPfcJbB31iDNtLOlXO5tYj75Y0FF7f+shno K4wu83Mor0vajJeo6BZCsvUkqLPXQrEDwfgagnXx6OFZVbX/+0pRGs3kGvs4Tv9+10sq jUfrOWi96R3KCSi0WTVELeZXSjk2yi1f4xFaMJb+EGf7uvkYyNpuY9qm2RPynCWuAnIk P7MwjR6geMFATYpfW0uueP9QB+SQjcOhY8mB68u7Y0b2qovfAE4zSuf3yCyR012hTNv4 pZUw== 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 p37si7791059qtp.101.2017.06.13.05.55.26; Tue, 13 Jun 2017 05: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 28A7360BF7; Tue, 13 Jun 2017 12: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=0.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 29C5E60BEE; Tue, 13 Jun 2017 12:55:22 +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 D2AC860BEE; Tue, 13 Jun 2017 12:55:19 +0000 (UTC) Received: from mail-ot0-f175.google.com (mail-ot0-f175.google.com [74.125.82.175]) by lists.linaro.org (Postfix) with ESMTPS id D72E8609E3 for ; Tue, 13 Jun 2017 12:55:18 +0000 (UTC) Received: by mail-ot0-f175.google.com with SMTP id k4so87013969otd.0 for ; Tue, 13 Jun 2017 05:55:18 -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=NIG5PxrpQMZvnqWmrVjMz/7loMJKm5nyCFCcRMAR1hM=; b=pC9vJNHOAuyajhaAvX4FPbdGlcuq3j4xXz3vHT14r/eeCwFetiezvbu6dr4M1oxQvG n76IgyUUgUNZVuoAxvXr5Pz5RHRzaSRSOeW/hNMzQO8mTU5nwH5gyFiGUDXKPtT0ZlJr 6Npsk6y5ObDsqeXMcN3LM0hAYjI8R4trs3jfFxK3MyW+LZc6ajUZorAmU4ArH5JQyeGK uvSk95sPc3ErPGgDMwMLDWypUTDt7a/aiXswPfpKQL+XgvqXd9oZ+Qa4VTLkXrEo1SsX PFs5h+b0yynA0j/FmkbkE16WIwKAxOu2/Gh28IlGmPwoWUE/Ix1CijcNuuYuWtxY4Eyv MZhQ== X-Gm-Message-State: AKS2vOzUsF6HsepGGaf/60mlekMhZMDqcXJmL7KNDpfFoRwSxmMbX1Ct 3Y3vBEO64WVof85qV2wmB8BI X-Received: by 10.157.34.197 with SMTP id y63mr27004128ota.218.1497358518000; Tue, 13 Jun 2017 05:55:18 -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 f35sm6530517otd.15.2017.06.13.05.55.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:55:17 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 13 Jun 2017 07:55:11 -0500 Message-Id: <20170613125515.24874-1-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [lng-odp] [API-NEXT PATCHv7 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 | 69 ++++++++++++++++++++++++ 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, 107 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 Reviewed-by: Petri Savolainen diff --git a/include/odp/api/spec/feature.h b/include/odp/api/spec/feature.h new file mode 100644 index 00000000..0cfc141d --- /dev/null +++ b/include/odp/api/spec/feature.h @@ -0,0 +1,69 @@ +/* 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, e.g., odp_cls_xxx(), odp_cos_xxx() */ + uint32_t cls:1; + + /** Crypto APIs, e.g., odp_crypto_xxx() */ + uint32_t crypto:1; + + /** IPsec APIs, e.g., odp_ipsec_xxx() */ + uint32_t ipsec:1; + + /** Scheduler APIs, e.g., odp_schedule_xxx() */ + uint32_t schedule:1; + + /** Time APIs are, e.g., odp_time_xxx() */ + uint32_t time:1; + + /** Timer APIs, e.g., odp_timer_xxx(), odp_timeout_xxx() */ + uint32_t timer:1; + + /** Traffic Manager APIs, 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 Tue Jun 13 12:55:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 105161 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp449601obh; Tue, 13 Jun 2017 05:56:04 -0700 (PDT) X-Received: by 10.237.37.169 with SMTP id x38mr49252726qtc.133.1497358564155; Tue, 13 Jun 2017 05:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497358564; cv=none; d=google.com; s=arc-20160816; b=l+pVMtykI+QTQZL9JksjvbqnjLPFk0WaaoWfESrih7fFxw45eNAfo4+AGF9cBGKDHm IC/ZFnn7P3MLP7kJNKLmE8XQ/zioGeUbs8SytVXJY5eZaK8jMKzMMhJW0RF0IOQV+u8C MyOPZyDyQXqnKKIMvZpm4/OvB44UXITIjHtmnwbWXXT82nhFwKeKjdJtFsOEB3EHVHsi alrePs3KvtQoXYyhRDgzb/DUCdgwtw9yKxFG6tkwtnp7tSKgNq+IqyNQif0M/Co0Sbj5 Q1PGQMtp9S/J0x6XKl9UzhdnJAfyAbblZcqVtPqzg2bozuXxUsVu4LCcUppmd3xQYlOS ky9w== 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=1ISAcako6sphC78Q2IxyR3yZMtqg1Ig3uZ1e2RrqrZ4oLXm2oBG+Xp24uwIsOd3nd8 cEkYuN2kSLvk65dh8m3vcHiQJnDewJGDMuzcfKLK4vCCGb+EmZ0/RoGN2QyD/61Fdr0q KtSYQpJ4PqJ+ZsfCSegtw+wHB/iTClkvb2p1cZfKxpO/kiE2rt7LxDdUY1BHiy3TANtq jeWNTNL7y4VdQSqwPTCVJOmFAj6Nm4xWa4o5o7KxnzAHIclRKdQvcaNWMLzXqlisALJV Y5QgFv8cIyq2PyBg8ojgO3FlX1yKT/rgbv12igigpdSmj2YMNRqKccvv2uDhBYhoVUQG BxsQ== 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 l184si11653033qkb.157.2017.06.13.05.56.03; Tue, 13 Jun 2017 05:56:04 -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 CB33560BF1; Tue, 13 Jun 2017 12:56:03 +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 83A4960BF3; Tue, 13 Jun 2017 12:55:25 +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 3390760BEE; Tue, 13 Jun 2017 12:55:21 +0000 (UTC) Received: from mail-ot0-f179.google.com (mail-ot0-f179.google.com [74.125.82.179]) by lists.linaro.org (Postfix) with ESMTPS id 48488609E3 for ; Tue, 13 Jun 2017 12:55:20 +0000 (UTC) Received: by mail-ot0-f179.google.com with SMTP id a2so87025083oth.2 for ; Tue, 13 Jun 2017 05:55:20 -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=C5WTII1u/kz2XdYlAan9Z+ph9dY6vpfHY+oa8EoD1xnfLQXdITEaGgUC/5i9vYN9kQ a8fcll1Nn/537/IqpOPRIkNVo7IA9pklJ7CNDdQCkxdnolNOVgtxZtbR6hAmHXfO98wV VUY6RvZSqUQAe+gTpL2k3wCeUPcnC5lagYEYT9aGoVDguet8WFZraQoRWH0r4v4PXwxz oaJ1wSPG5YMKUSXC9deMFuWD0ZkyueiHCVKOHX34FTTCvPLX1q7jxh+bDPx2q3Jfjsx6 2TYW9u5bRu/NzboTiK2fOGpgHS0GBxy38Crj+2sCKDaghDq5E1NwN0lkdW1mBTMU3OrJ MV1w== X-Gm-Message-State: AODbwcBP/7tg97vsqUvx3cp4PnUY0wu0EzljAXT3ixMnVFPph2YxyWwO nOsWQmgJF+VFddMlqytb7Q+V X-Received: by 10.157.6.135 with SMTP id 7mr13144296otx.93.1497358519577; Tue, 13 Jun 2017 05:55:19 -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 f35sm6530517otd.15.2017.06.13.05.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:55:18 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 13 Jun 2017 07:55:12 -0500 Message-Id: <20170613125515.24874-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613125515.24874-1-bill.fischofer@linaro.org> References: <20170613125515.24874-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv7 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 Tue Jun 13 12:55:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 105162 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp449753obh; Tue, 13 Jun 2017 05:56:27 -0700 (PDT) X-Received: by 10.200.43.99 with SMTP id 32mr76269007qtv.6.1497358587775; Tue, 13 Jun 2017 05:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497358587; cv=none; d=google.com; s=arc-20160816; b=Z8v1DvRQglP8NXb+A2czzh0D6eyV00l/vRSSi8oKRs+NWV9UsmVgWU3Gk8WYkkdJ1w IYYvSc9FA9fiCz1I7Yy/6FP/v2zGeV1ww51YbcDTIB2jKQCV766bCKdL+JucAwJcWFlP jUovJXENA0WwFwYJkufii+OeVA40LZ6NoWbWUO15fGTd100FMPCEqo3rVbXXCTzQ+jrS JUnYGbSE5ALoFt6tbNDeTfTyZ4CDsfxxO7wZY/Dl0Wt+m3wsAQKgJCc04sfHdJpqDkdb OusswBLuNzW93TCkb0f3WPUjtuB1Zhlqx2Z/oIM+XFtQ8qiBirNyMMKPwFQ2GfCuFdZO klTA== 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=NSFu8kXUu3CpCobxm1qSRby7rHUq08BdxRnUrfpMkjbf2r60cxBxYrBFCB93bJHmtX z/7VV0nMLJ5rsEgZrtVPQXK3puvOu9H3ZZuSHDLCsAEi4cCCboidl0lWM+1dfZDAle7D CPX19K2GdKORMg2vPn/EGh+RLR5sTVcP8UCQrec26dI99KEZ9SUKW6QORVbYKM7WASA9 sfCuC44jMeisA/Trl+bXR14qavnjAb4UBsKSWAdrJ7C7sKeM4zJNcQQL8p9yFkMlImuA PLMRloAUaixFDvhcWgGC5cwKI+Tf7PbCsO8pjeKJefmenc/vaqtMZg9nh16EfufC4lR0 4tVg== 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 o128si11587074qka.274.2017.06.13.05.56.27; Tue, 13 Jun 2017 05:56:27 -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 673EE606B5; Tue, 13 Jun 2017 12:56:27 +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 E285B60BF6; Tue, 13 Jun 2017 12:55: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 A5C23609E3; Tue, 13 Jun 2017 12:55:22 +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 9E86C609E3 for ; Tue, 13 Jun 2017 12:55:21 +0000 (UTC) Received: by mail-ot0-f178.google.com with SMTP id i31so86966335ota.3 for ; Tue, 13 Jun 2017 05:55:21 -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=U9kaW3KSi5EXOkVj1jaYMjDSbpilxooeymqpaZ/JY9BdNVaMFFnKPg6Vlf3oFVBn7c XQLvIs9gM5WO5jVkl1rCVcAFGP7ZkTc3T3GhLT77fyanwjdmox9tT1LjifzhKmz/X/hE ItIOH9HQdzfNGWpDQPm3SWT7x5s3Z2ZGL6ZrzrE+eJdomEY6n1kNjvsYy/zhaXBpku+e jVqFnM9esd3JVwzL+V/ueoWNSnnTxlVrgdB49Zyb0LzFXRaabBzmvVEa4kbMpT5OFfas rqmhhB1w0OYgSrf+5DQwbovNYge4B6v2oYcI7k4AS9CwMhQjJYda7mmcu6FyGTSdkjzo iHKg== X-Gm-Message-State: AKS2vOw7bvZ6X3vlRzh/l/l9it81exEBH1PmSnD6d0AZVbIWbWSDcBUm 4AiP0Z/WuLwv4cnQQ2wczH4w X-Received: by 10.157.3.45 with SMTP id 42mr29502940otv.234.1497358520941; Tue, 13 Jun 2017 05:55:20 -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 f35sm6530517otd.15.2017.06.13.05.55.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:55:20 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 13 Jun 2017 07:55:13 -0500 Message-Id: <20170613125515.24874-3-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613125515.24874-1-bill.fischofer@linaro.org> References: <20170613125515.24874-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv7 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 Tue Jun 13 12:55:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 105163 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp449909obh; Tue, 13 Jun 2017 05:56:50 -0700 (PDT) X-Received: by 10.200.50.199 with SMTP id a7mr61251194qtb.91.1497358610627; Tue, 13 Jun 2017 05:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497358610; cv=none; d=google.com; s=arc-20160816; b=y4+RHD7nCsL6PuOT/un5GIEBu6cTcFv1AXuzvCXhAQgR2lG0yxSOUYduXqHfNN+iF9 /iB07LW7oHnWjD4145V7nkJFZft0Nz+oDvqnQuy3PU61AN4LAgM33hgmrxnXK+Xck14v 5X+aqVuML1tTlJ/TrdWo+OB3WllEw/eK0SDFyx1GCbGBwlqwlTPTrJadtPEPvrDBvbrd yv4XpBF+krSpF+rC8tyxT6GNOOjrrVUQxQcG+lz+mZ3FtsaOOejT5MM1xN+mUcJPCweo 2y7LTOCjcGNxUHSU3f2hxd9BCeJa3SNDqAlemvUQOf5e1EJiNaugMDrm73VOKXNzbsrm mb9A== 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=0ENscSQ5WTMKv/3JysXjWOYNOKsrhgmOfCQ1czDggOT6ObkkJ9o2TGF/3MVSfw8bYw 03p/v2CUTTCvwtxsi+FqR6uROhqROxmM/pnHVnhdtbekQ5+EV9PkoqEghxVoRv8F5RLf cRTSbpc2ZCzgIAowSfXaOm6wIASl2/Cf3M26G2P1+J3WWRC2rEbfTl5nfpF/NbfPm89H yjv82n/lXxyOAK0xdXGsKDJ+/qOwwKCQA28iv95K2GqXzxcRn9tA+IV+VvLMDtqU/ZK6 HOhIvpHp3Civs519e3qDsrd//catxGaciMxewA0Rqj9wVVVS8JIoTE8s8PcconPHb0pw mfDw== 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 q35si11259067qtg.91.2017.06.13.05.56.50; Tue, 13 Jun 2017 05:56: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 3B76160BF2; Tue, 13 Jun 2017 12:56:50 +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 7054760C03; Tue, 13 Jun 2017 12:55:51 +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 A72D860BFF; Tue, 13 Jun 2017 12:55:47 +0000 (UTC) Received: from mail-ot0-f182.google.com (mail-ot0-f182.google.com [74.125.82.182]) by lists.linaro.org (Postfix) with ESMTPS id 9EC7860BF2 for ; Tue, 13 Jun 2017 12:55:22 +0000 (UTC) Received: by mail-ot0-f182.google.com with SMTP id k4so87015154otd.0 for ; Tue, 13 Jun 2017 05:55:22 -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=FYcKXjCRwtFVCNEYIma2zwmRLSVgrlLjVKVXoY3nApi5GXtFYEl90hvC79G37TIdrO tusj9/UUpJ3h+ImEQCQrvxceyrkACcQn8ua4tzbymKFCbHEUInjBE+3Ii0Drg1tOTCOe aWeVd8DIw6Xo+4atDQVdSYKS1RxPtki7Vfct1hKyKdJXAeOx/WTMeDvVzKbNcmViXtlL Vd8Av71k+jW4DWHZRHuHcrwNLUQ1qnxsRUwEC/ToIfzzvF7K1+KeevR6cJM5mcTQ1IeV Hatuf1TnhDvlSdxrr8T7MTmAM49tSb8x9SG/WPaxOznHn8vX0kC8r3NW0WCFggi7fGho 29kw== X-Gm-Message-State: AODbwcDcAzAvR+riA8iw3QztJmQXYFsKoG2lFo9+DiCR2x+EZFnvEid1 Mg6RlBflcvL9fdeAwU/85hvq X-Received: by 10.157.7.166 with SMTP id 35mr20177771oto.42.1497358521877; Tue, 13 Jun 2017 05:55:21 -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 f35sm6530517otd.15.2017.06.13.05.55.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:55:21 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 13 Jun 2017 07:55:14 -0500 Message-Id: <20170613125515.24874-4-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613125515.24874-1-bill.fischofer@linaro.org> References: <20170613125515.24874-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv7 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 Tue Jun 13 12:55:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 105164 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp450098obh; Tue, 13 Jun 2017 05:57:17 -0700 (PDT) X-Received: by 10.237.53.102 with SMTP id b35mr67562250qte.83.1497358637754; Tue, 13 Jun 2017 05:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497358637; cv=none; d=google.com; s=arc-20160816; b=EM3hAwAI6xkQJh/3LIVVGC+bvqFHELglS8BYyH/+lufT+oZ4xFr3I3cNkDAiRTRd5G Zlqh35AdR+kB2m4Y55he2BXYVeOY79cy6rnWvjEpEvOrLlumNY1NF/8cLXSYL7Tk4G09 wP/4UNyIYymS4BF1uOlJlRL8CyIfH65F1BAEqNlrUriyDcUd9Gk8itXdju8ZG+5x/W1m kVxJhssu9XNVtxP1HTw3y7QNecyDaOab6KDXe35rVbhjA6F8unqxgyOIPeUy64JIFx8L GteYHXt7sdkMPVhchX/8nCti1ibvBQ9yGM6pzETPkaDfPc/SeAkYnRRwgIhEloXuO3mS ujYQ== 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=rQbk0JFn4KEEl41X7OmN+poRQYh1On55Rc2RZ3MzKfePuks49PvOuerVvCjbZmDPNn Nul0dZPzIkjed9xb2x7Hsa293u863ZwTeZK9xdAOEzMKuC3/YR3KJseEHi5IxTYGO0KB ni5jaNM+qbWCX3o/yx/5DLbcGJwLCANnFmqWTzqI6Z23v3uudk4ovJ2Nfay7yaU6eTTo EX0vzdeqZOEAxvSlHeN2PkyqRNHg/Zrk4v5vp5RlqknTenrpTr9AC1BFrMfP3KLOATvn it1xZz2Z5wPXWxxRHcgf61NSJv7NwXEw3FiV+Bll2YUdku74TMbfhjm0UGTTxD0qB6R3 cUug== 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 127si11385664qkm.159.2017.06.13.05.57.17; Tue, 13 Jun 2017 05:57: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 3FDD460BFA; Tue, 13 Jun 2017 12:57:17 +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 D53F060BFD; Tue, 13 Jun 2017 12:56:08 +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 8EAF060BFE; Tue, 13 Jun 2017 12:56:01 +0000 (UTC) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com [74.125.82.177]) by lists.linaro.org (Postfix) with ESMTPS id A77C2609E3 for ; Tue, 13 Jun 2017 12:55:23 +0000 (UTC) Received: by mail-ot0-f177.google.com with SMTP id t31so87064422ota.1 for ; Tue, 13 Jun 2017 05:55:23 -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=U0CAKQW3MxZZKze8W5nvrEA5voaZOZCAq/bf3x35o3vO99yvMswXUwlsQAL46V4FIq SWMq9NRaAs1J5qON+wCqcz4arodUQK5PA9T0Hs8oGWOUu9nHGUGyGxz2S69Tx0McAB0d Wj8hdMRmFOpFaRKKDZ/Ld+061rwnc+AN9iePVb+lejzEZQ2ewPXBlAKBmPwWLyUQMbNY 2Un+UT0YSmvWq19PsN1hFRa5qp5/dkOZLBjURazhIxPI6VDaDGWrEyfJi/nE0JRP2MNP W3ewpb86Aqr//mVFQ3eB28t5rTNGjdYl9ATjafsWTKM/Q/NuU4ZfS35rn1DwN5tGUKIE rkWQ== X-Gm-Message-State: AKS2vOyS7lsUlH1mJoRBDv9xXd5hlTcRIjfPKQh+wJ6CynlM/V1C/b3u 88XkbXf5w5cUFUvtE1ctid6o X-Received: by 10.157.53.22 with SMTP id o22mr388706otc.155.1497358522877; Tue, 13 Jun 2017 05:55:22 -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 f35sm6530517otd.15.2017.06.13.05.55.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:55:22 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 13 Jun 2017 07:55:15 -0500 Message-Id: <20170613125515.24874-5-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613125515.24874-1-bill.fischofer@linaro.org> References: <20170613125515.24874-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv7 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