From patchwork Mon Nov 6 11:00:04 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: 118016 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2629747qgn; Mon, 6 Nov 2017 03:01:58 -0800 (PST) X-Google-Smtp-Source: ABhQp+RAubNg2aRjAdolFJ4U2//FLtM7h76mi//88Tu+RUsQbKhNagAtqWwLsO9g27C7nT9khm+R X-Received: by 10.237.59.249 with SMTP id s54mr21936195qte.34.1509966118306; Mon, 06 Nov 2017 03:01:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509966118; cv=none; d=google.com; s=arc-20160816; b=fi79v1Rcih5FU+LhRsZagt7FXn8yIuIThCEVV/T0qQ7Og0ZF/uALqC+eddFMkFjARi ky5UQGhIkWqRisVQB8L3ck8TmiMHzRM14ONn1Ls+ahstHWXqfnmd6e3jWCNz7ciwfH2G cb+sa/KR6R+H5we2ntk7aSjJ7CKghoB/EodD+TlRRyY9dEZTtVsVnML/dxcn2p2X67mm bQXXnP5u+2PwX0Rdbe70WCPJSe/eqWINXmMIl5j3iHbFrH0HToqehnYogGk9F/3d8fSo wW9djTjB0vB6eQkykilFWsPP7M2q2Bsb5p9SFIgviwxS2UDWGZDo0yXYKYj1ENeklgvq zhxQ== 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=6/iDLJAeGNYNwsLI1oyyAHWHvOYhbarNGYmChCabQmI=; b=LfkC6qio9JpFMLCQt+LMoDIkASZkvEMoC1KVtnrSsfAnLnsc1r0fD+aBIFEfjgs/Yu 7HaxNoGEuIHVH6RmjlUxHpHZKMmfKIqK6l/H+2BHSjSbbyPc2jZJj+evG6i2H8z+rwx9 6YPDY5ur0s3NRRlvcrhkP5whneYpTpMBvlkGoMIF2fjJqsTv4JX0p1mXbtUyaqryZoxf wW8XvTOrHpY6Lu+ZZmHtYEIMPHsgo69BGbRY4PulOcpOk81GquCeMnB3RhxQZ2JbXOhO P8VeuK9lP8ac0KAIvXsLxcx1edN8tp1n9ApdsbHxPrpIBG63YoLDy+YAc2C7TnbJnoVV 1JAw== 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 d29si3884537qtc.94.2017.11.06.03.01.57; Mon, 06 Nov 2017 03:01:58 -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 D4D7F60C12; Mon, 6 Nov 2017 11:01: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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 A9A85609EA; Mon, 6 Nov 2017 11:00:27 +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 1763760609; Mon, 6 Nov 2017 11:00:18 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 4780D6050D for ; Mon, 6 Nov 2017 11:00:12 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward106j.mail.yandex.net (Yandex) with ESMTP id E5CCE1801BCF for ; Mon, 6 Nov 2017 14:00:10 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IYgXaau6ta-0AIi4V8v; Mon, 06 Nov 2017 14:00:10 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iHi0qYvJl4-0A0ebqHH; Mon, 06 Nov 2017 14:00:10 +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 14:00:04 +0300 Message-Id: <1509966006-16692-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> References: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v2 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: 40eee55053ce892b452dc5e7033bbbdb030792f4 **/ 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 *