From patchwork Mon Nov 6 12:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 118022 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp2539659edm; Mon, 6 Nov 2017 04:02:15 -0800 (PST) X-Google-Smtp-Source: ABhQp+Rzor84ep9P/S4tY0qRDT1UVLchjPfZCeTyuHZMLO0wkmmIj6w7yWsIgEgxd8cYjfUtFw56 X-Received: by 10.237.42.97 with SMTP id k30mr22855458qtf.184.1509969735789; Mon, 06 Nov 2017 04:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509969735; cv=none; d=google.com; s=arc-20160816; b=gtKlAtasTizrSxyYW795jiN0LeLb4jZyvs6viM9iLsUMoKBhP+E24/xdmcbJ8yVvrK Xt1RoMGzSl00PZhDhqXxBGmnbZddBrnhG8GZREP7ZHvbjDtY8bOy/5IQCNkb6GJdZe9m iRYmP2rlRDAqdagTlF41xkjd3OT5KiNUqRkCJbsvBuwFXKIuHVBEboy63Cljnb6Pbi1k 5oetAvDPiZwLaiWvsbUqvuasLK1OeACjweLNRR+kc8SuD6MTLv4TjXkj6LQ2ahzYKbI7 0doYXFkIbJyjbXH17MO9F/lysBKTPTM6lbbSEyHW7nm0Ag07DmGTUybcaX3z3w9Njjc3 Yrew== 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:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=5MGE1N0opLFDKHzEhqPu7rCRoMLY/lQnGxMbIdOR7fE=; b=HNgomX61Jnxt76io8ORFadW9WgPqYsyYPgKVhdkOFleccjTnvDzT70JPrOqLB9tcXS W9ab6Qz7i3q59P6W1tdhXu+v6dyaSX/MuNCZaop29RixYEhE7/Zfg0UlIgJTYm361UDY kZQkIdYAHEBoJM4zNHaiGEiqFymGMH3Fm8Hs8TxpU/G83unMcB0N/RKsbXuS/F6J1+aa D+G0ZwPngLlT/NxjQTRNWshByqMtUnxDtDe9OpHuST9sdv371xfOjqTKMhLD1ErikTZM lTx4/nFzoMXqrJQ188MI6dovbtHfPugDRadW8dfzhq64DZS8PP9hZHJQsV4Dy/Gz0/Xb MrpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id o39si8580933qta.471.2017.11.06.04.02.15; Mon, 06 Nov 2017 04:02:15 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id DDDB0609D0; Mon, 6 Nov 2017 12:02:14 +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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, 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 1DDA160690; Mon, 6 Nov 2017 12:02:01 +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 0B78460C0C; Mon, 6 Nov 2017 12:01:51 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id D1F9D607A9 for ; Mon, 6 Nov 2017 12:00:11 +0000 (UTC) Received: from mxback5g.mail.yandex.net (mxback5g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:166]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 4860A2D81921 for ; Mon, 6 Nov 2017 15:00:10 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback5g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XKeqH3F66g-09sKsPim; Mon, 06 Nov 2017 15:00:10 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3HBJbpFqMH-09eGWcZE; Mon, 06 Nov 2017 15:00:09 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 6 Nov 2017 15:00:05 +0300 Message-Id: <1509969607-32198-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> References: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v3 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" From: Bill Fischofer 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 Reviewed-by: Petri Savolainen Signed-off-by: Maxim Uvarov --- /** Email created from pull request 276 (muvarov:next) ** https://github.com/Linaro/odp/pull/276 ** Patch: https://github.com/Linaro/odp/pull/276.patch ** Base sha: f318c88f26b15140dda243e6a1d27e3c8f9d275b ** Merge commit sha: bb644389b2bb70dd349aed079e00a2fea7c90eea **/ include/odp/api/spec/init.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h index 154cdf8f3..e8ec41136 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 *