From patchwork Tue Jun 13 12:55:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 105161 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp449601obh; Tue, 13 Jun 2017 05:56:04 -0700 (PDT) X-Received: by 10.237.37.169 with SMTP id x38mr49252726qtc.133.1497358564155; Tue, 13 Jun 2017 05:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497358564; cv=none; d=google.com; s=arc-20160816; b=l+pVMtykI+QTQZL9JksjvbqnjLPFk0WaaoWfESrih7fFxw45eNAfo4+AGF9cBGKDHm IC/ZFnn7P3MLP7kJNKLmE8XQ/zioGeUbs8SytVXJY5eZaK8jMKzMMhJW0RF0IOQV+u8C MyOPZyDyQXqnKKIMvZpm4/OvB44UXITIjHtmnwbWXXT82nhFwKeKjdJtFsOEB3EHVHsi alrePs3KvtQoXYyhRDgzb/DUCdgwtw9yKxFG6tkwtnp7tSKgNq+IqyNQif0M/Co0Sbj5 Q1PGQMtp9S/J0x6XKl9UzhdnJAfyAbblZcqVtPqzg2bozuXxUsVu4LCcUppmd3xQYlOS ky9w== 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=1ISAcako6sphC78Q2IxyR3yZMtqg1Ig3uZ1e2RrqrZ4oLXm2oBG+Xp24uwIsOd3nd8 cEkYuN2kSLvk65dh8m3vcHiQJnDewJGDMuzcfKLK4vCCGb+EmZ0/RoGN2QyD/61Fdr0q KtSYQpJ4PqJ+ZsfCSegtw+wHB/iTClkvb2p1cZfKxpO/kiE2rt7LxDdUY1BHiy3TANtq jeWNTNL7y4VdQSqwPTCVJOmFAj6Nm4xWa4o5o7KxnzAHIclRKdQvcaNWMLzXqlisALJV Y5QgFv8cIyq2PyBg8ojgO3FlX1yKT/rgbv12igigpdSmj2YMNRqKccvv2uDhBYhoVUQG BxsQ== 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 l184si11653033qkb.157.2017.06.13.05.56.03; Tue, 13 Jun 2017 05:56:04 -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 CB33560BF1; Tue, 13 Jun 2017 12:56:03 +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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 83A4960BF3; Tue, 13 Jun 2017 12:55:25 +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 3390760BEE; Tue, 13 Jun 2017 12:55:21 +0000 (UTC) Received: from mail-ot0-f179.google.com (mail-ot0-f179.google.com [74.125.82.179]) by lists.linaro.org (Postfix) with ESMTPS id 48488609E3 for ; Tue, 13 Jun 2017 12:55:20 +0000 (UTC) Received: by mail-ot0-f179.google.com with SMTP id a2so87025083oth.2 for ; Tue, 13 Jun 2017 05:55:20 -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=C5WTII1u/kz2XdYlAan9Z+ph9dY6vpfHY+oa8EoD1xnfLQXdITEaGgUC/5i9vYN9kQ a8fcll1Nn/537/IqpOPRIkNVo7IA9pklJ7CNDdQCkxdnolNOVgtxZtbR6hAmHXfO98wV VUY6RvZSqUQAe+gTpL2k3wCeUPcnC5lagYEYT9aGoVDguet8WFZraQoRWH0r4v4PXwxz oaJ1wSPG5YMKUSXC9deMFuWD0ZkyueiHCVKOHX34FTTCvPLX1q7jxh+bDPx2q3Jfjsx6 2TYW9u5bRu/NzboTiK2fOGpgHS0GBxy38Crj+2sCKDaghDq5E1NwN0lkdW1mBTMU3OrJ MV1w== X-Gm-Message-State: AODbwcBP/7tg97vsqUvx3cp4PnUY0wu0EzljAXT3ixMnVFPph2YxyWwO nOsWQmgJF+VFddMlqytb7Q+V X-Received: by 10.157.6.135 with SMTP id 7mr13144296otx.93.1497358519577; Tue, 13 Jun 2017 05:55:19 -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 f35sm6530517otd.15.2017.06.13.05.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:55:18 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 13 Jun 2017 07:55:12 -0500 Message-Id: <20170613125515.24874-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613125515.24874-1-bill.fischofer@linaro.org> References: <20170613125515.24874-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv7 2/5] 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 *