From patchwork Mon Nov 6 20: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: 118092 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3148920qgn; Mon, 6 Nov 2017 12:00:49 -0800 (PST) X-Google-Smtp-Source: ABhQp+RS9AQutYk4M84TceZkhGnNKg8F182u9f7f8gXOYcaKJqhL/7XQRGM7gBrV6ASGqG8O0GWE X-Received: by 10.36.163.140 with SMTP id p134mr10782237ite.46.1509998448795; Mon, 06 Nov 2017 12:00:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509998448; cv=none; d=google.com; s=arc-20160816; b=SD5LuuphoLugFA37Jhe4KdQWkwpTrRItuffSsZJg7w5UhCO3PBcnKc53jKokfwYF4P Tj94SvYP6jIvR1zsoGh3myh11i5sAvye+9P97eJSDRsF1oEjVMDvnmA2E/892mabHkLX Z7NE3ggYT40pb4UEH2wDMgiEAFFF/fMMLKtYeePpjAW9mL6KiKXQVqVtfEuw0Jf3wwiC qfcCgh4A0rQjAvSdYD56R37R/yu5Aiai9YxZDRPBdyIxnCHeiR1g/SQREYClS8TAJF2h OBCq+yrljFgDPKjLGe1yLqpzz59EDu+U3nvdweMBrG2gIoTQEUx/rpyKgUpEgUlB1Ikz lX6Q== 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=Dps0HLSv1mJLm2sOkOxAREOZGAAa4LUl+JQZ7PqbiX4=; b=xNM9cI1BHiepR7H9+u8JDxXp+raukSqfvhLM39rd7OsSBwymMlNdqCF6/lcc+ILQzF Gtz4cectp7qJW4XIjM+ZuEGnc30x9RUAbmV7XgBVdpe7DvAcz2WA7fFesSB4AUCZg0HV Mu+6WqFP6pvbZaziTlvm95r+ANTRDlNsHO22iVlTRGp4IvPVLZlC3Uf5ThZBZ1u/4Hsm tgjzbTLc0aFYcOf/FWmOKwHCwBzlNNtsrdxKQ9tbamDZYZ/PmCioUBerl1ARfsfJW5or tPDZQ2wpbAEtFQJ7WWzKsO7m4YXF5R5jZIQiOuwzhWpt2pEYqT/c6q+ZqyU4cj7aOBCi Msdg== 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 d12si11300271ioe.241.2017.11.06.12.00.47; Mon, 06 Nov 2017 12:00:48 -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 D0ED560C39; Mon, 6 Nov 2017 20:00:47 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 6454760750; Mon, 6 Nov 2017 20:00:17 +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 E95ED6074C; Mon, 6 Nov 2017 20:00:12 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 53817606B3 for ; Mon, 6 Nov 2017 20:00:10 +0000 (UTC) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward106o.mail.yandex.net (Yandex) with ESMTP id DBF877875AF for ; Mon, 6 Nov 2017 23:00:08 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id L38VT9ultO-08Yih8h1; Mon, 06 Nov 2017 23:00:08 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kjmdnsAqIW-08FOkcDh; Mon, 06 Nov 2017 23:00:08 +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 23:00:04 +0300 Message-Id: <1509998406-12706-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> References: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 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 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: 7b1bdbd556cad7a42550ae18152f2f9281b6930e **/ 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 *