From patchwork Sun Jun 11 23:59:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103571 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp710883qgd; Sun, 11 Jun 2017 17:00:08 -0700 (PDT) X-Received: by 10.55.48.76 with SMTP id w73mr10193039qkw.103.1497225608103; Sun, 11 Jun 2017 17:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497225608; cv=none; d=google.com; s=arc-20160816; b=SaNo+lkLHynKMBrCHYEvmCOd68b7ACmAWnCFn9pqq4JTlxW+5YNBU3k2sd6CSTTd6F dzwdXeEAzliMRyhTCM2IMeiE6UHdeWvstTRV9FjEkyqO7RIhAB7cbYuW9yxC2VDbzXIJ A2PpNXLOMKXrm4pLUB5nKeIJBaCtqp9oHxNoMhcCr7//Z1V/l+bNj+q9ZvSnBXwANRyB xEzjoUzqR3kxbUTiXNn9Ieu7H3Rbr0/S34TJcsFdOkF5zJ9KJm2/X1bwLpHh1Nh0YAvv z/eQ43PfbXCENYh/9fh0TQHp445z/Vof5+hiWbZKB7g1zn4JInK/ixhEyzR0Bog0TsVg IZmw== 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=zwpK1+hPutVQgqBqEIUXVc+stnOISCqsXtlgI2T7TZuO24q9kWR2tbeQf2P/mGPTa1 pJRD28i4qS8CBWct7y697fqSUzMdUAh7v8FkjNw2fxfOOk/ENrz2zPlMB9PAbuE43QJI XK0w0lNI8YgZoGzG5OWx6C3w5yseue+2E39d7fcNEGmNiW5GDY4hBt7MaxL/Sj1DIl5L SEQd1LQYhUovkgsClbsNWPZWOemqTmvAkI2+jdavafOxqZyQNdRVApb4KVNlYkAet6yx 4w1PjjAJVNNPP6F9YGybXffdTG0MLbA5V4XL77CQzFy4i+TTUVqArRL/zS2fT7ndB0DT We4Q== 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 n34si7213746qtb.25.2017.06.11.17.00.07; Sun, 11 Jun 2017 17:00:08 -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 B32F460BDF; Mon, 12 Jun 2017 00:00:07 +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 41F6760B11; Sun, 11 Jun 2017 23:59:31 +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 4469F60B11; Sun, 11 Jun 2017 23:59:26 +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 5193B60B11 for ; Sun, 11 Jun 2017 23:59:25 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id s64so4404027oif.1 for ; Sun, 11 Jun 2017 16:59:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lLVmjZKwMRjg60y5kCuHz9jPqw/+PsXr6rEBSu8fsMc=; b=joZZbs3P6GLPUk67Zq964iUFJk5J4leHJxHZYhs+ceW4MKQQ7L0U4oN/3AT/GhUJt8 q7Qlh7ozyhShnk7vwo7MlRRDEKWLFBD3vhoeX5kkLo0W4sKbnrZJ94qL+l7NZTNv/J0V 8xavnv4hKnOQkvh4yy2D8SJ/TFyAXsNXCwLn8KJe6HFQZUxNHUjPngT9l/UQz+5XX0aC awi0ZSo2mPoE32gyjNrj6Tpz5Xa8eLyB6EvChLHfsvtwnrdnjytmvpYU3bFJg/1pjIrE zj9Yws09K3tC4FMPy3lZo0jWzSzmn+KGTW2gPli57YwR8e8RQHn0IGD8MrBjMAqxPjNU V+SA== X-Gm-Message-State: AODbwcDq1VxPS91HLF3rUveo3JjCq69MDku2ilPcLftvOZLLt1sswmjW mXMzWMIq3wI2X0fh5ljG+Kub X-Received: by 10.202.7.129 with SMTP id 123mr30169885oih.178.1497225564613; Sun, 11 Jun 2017 16:59:24 -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 o70sm4128058oik.30.2017.06.11.16.59.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 16:59:24 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 11 Jun 2017 18:59:17 -0500 Message-Id: <20170611235919.10052-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170611235919.10052-1-bill.fischofer@linaro.org> References: <20170611235919.10052-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv3 2/4] 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 *