From patchwork Mon Nov 6 15: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: 118063 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2862057qgn; Mon, 6 Nov 2017 07:02:52 -0800 (PST) X-Google-Smtp-Source: ABhQp+QL7QRamcHw2C9ROnBPm2yVQTXsyreXChJ6PqOaDzP73tTpu0+g4MLgkMXnOzp1A1zisvZH X-Received: by 10.36.203.194 with SMTP id u185mr9406392itg.120.1509980572195; Mon, 06 Nov 2017 07:02:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509980572; cv=none; d=google.com; s=arc-20160816; b=gxQDpT2E1hk9XAMhz2ptm6+TWNWw0jVTXSuepXVKANrdzREeinamMJbubu7zx4qr68 B86KKb9CSCWFz4aAaj/cPR8xWaPkjxAYiXPmKidzfr4om+qXQIb3iFSGGTAlRNu0Prty 9wlbOA/jA6cv0ZehVDRSzC2d2LXQRWz1AfUx+DMM1X/MxbdDjgc29Po7iEQeOQeP3kh3 ugZPE+x6I1/JeRzDPJkVi1z6BgD6MKCMyRe/sdIp/mu/SQYD/ptmweNMnWROp6+aNpt3 AtsvkyhT+IDMRv2cRf8ZnuCxbDmeQzPSVaVcA/KLQ6yTA10nfQw5hTiq4i4sXXRFmTPC PgCQ== 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=W9MbtGEdiFdUv6I8BxyIshETMk5bIJAVdGYz0qk/qFA=; b=vxUYV6+Lla09BJr/PDKaBkDc6kY95Hl18II+J2TzPM0NbdfAgO57OEB1Hw6kCUxSnz 9FQMuC2pz4rJU7rvFN3s+R9JF1RHhQWlnnvs0PEivjJ41YdFZ7ZlZ6xXZ24Mz725tsQZ oa0pFpS9k6nZ4kflUf5Vea6lSLqOhpkZhxchIn5AJmdrdca3fdC3sGdzzxt6m/CrmzzM SFQgDUBx562izyY87b1gab6Y/4o7Ytgm3KFEpGMukgw5WUpXygRATB7l2ZjnkGV6tQgw Yha3SPhLSFyKbYF3/0Cc4DqAGZdj36nQcG4/aP2MGhNQ6FKLdIS20HorV+4dgDg38JQb 103w== 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 q78si8383081itq.35.2017.11.06.07.02.49; Mon, 06 Nov 2017 07:02:52 -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 59FB060C4B; Mon, 6 Nov 2017 15:02: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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 E98D060C0C; Mon, 6 Nov 2017 15:00: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 2849960BFE; Mon, 6 Nov 2017 15:00:23 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 118C7607EC for ; Mon, 6 Nov 2017 15:00:12 +0000 (UTC) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 607FF4447445 for ; Mon, 6 Nov 2017 18:00:10 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6TnWqxABKW-0A3OoLso; Mon, 06 Nov 2017 18:00:10 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id T0MgOkT6Js-09rapa2K; Mon, 06 Nov 2017 18: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 18:00:05 +0300 Message-Id: <1509980407-6367-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> References: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 Subject: [lng-odp] [PATCH v1 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 278 (muvarov:next2) ** https://github.com/Linaro/odp/pull/278 ** Patch: https://github.com/Linaro/odp/pull/278.patch ** Base sha: f318c88f26b15140dda243e6a1d27e3c8f9d275b ** Merge commit sha: c83975d85777ff167e18764bf9fd8f310a65e206 **/ 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 *