From patchwork Mon Jun 12 20:54:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103676 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp105597qgd; Mon, 12 Jun 2017 13:55:27 -0700 (PDT) X-Received: by 10.200.12.78 with SMTP id l14mr3819438qti.227.1497300926967; Mon, 12 Jun 2017 13:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497300926; cv=none; d=google.com; s=arc-20160816; b=q0zB7ZvpQU4H7jnoyjCT6oz/0gpFk6n7Qr2o+S+UilnYttIRNdSMSE22tpFx/MYr4i lJZwsgWJDCjlVY60ZDAYgMhnXR7awtNbzVddnM3KgRf7W3P+Dh4qBMJ2tELE2fNDydes qgd7A9bASQfOorRkOpzqwaaie+HZlD95C2OM54gq4Daif3pCFPlhrB/a0w42NDtksQcN cXRQJe2ypuZ88kjR7ir/e8+AkQs50Id50rOWCjyi8VYWlm4EqFQ4cjaMfRFWXoVXFhsx bE0yb2uwFGGAoHpyeKMfycCxUtGUyn5bU2Yx1SKxzyLCzjlC0y+7WhtnSGj9uwQFwAqP qQjA== 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=0ZiyWrq9Ksmf2X3U9cFJmazoEJa+A1h8ajIuVDM+iNdUo7Bvc+2VbdgspXXEUIM/F7 +6KCRKK72jcJb79yxO7v06gUcOo7rIF7Q3161OswTGdVZw0D0e3oZcuIsX3A3Zeu08nu 2Wm1PpJfEHm6ByFGbJpzv0yunYLKITNL1SjuIARF3rLSG5F3LNJg4uZu2qcFk3xWpN/2 eoeke2EAb0RV/WKTH44JrdHetXS6gHedjtcfNaPrmfxgk6Z2/i4L+OeDrcS4gjXN1att TQYT/7uJfl9W9Idmhaqk8xiYjyV9owk7AWEe9oqSl+I/zNV3JN58KsLf2B6yHbFyAU2v 3shQ== 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 f95si9494409qtb.88.2017.06.12.13.55.26; Mon, 12 Jun 2017 13:55:26 -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 9FAFE60BFB; Mon, 12 Jun 2017 20:55:26 +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 45001609B0; Mon, 12 Jun 2017 20:54:44 +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 C22656097E; Mon, 12 Jun 2017 20:54:40 +0000 (UTC) Received: from mail-ot0-f178.google.com (mail-ot0-f178.google.com [74.125.82.178]) by lists.linaro.org (Postfix) with ESMTPS id 977BD6097E for ; Mon, 12 Jun 2017 20:54:39 +0000 (UTC) Received: by mail-ot0-f178.google.com with SMTP id a2so74333847oth.2 for ; Mon, 12 Jun 2017 13:54:39 -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=NxzN1Nh3uzJas+5ZVJuy9CcnvgD9hzrVrUtNyoGQOtN28CmcGjp2wXsGM+zYQdEeDA a5Dloy5WyzesvTy6Vcmaa8entBZS9WLhmf/AfmHm5urNr+/GdsQZt+lIhigkPtlnkkkX sICoQyVApH8cIOiY+bBRxS5sf8lD+O1DK2DZYiPi+85AX7Fg0Au7wNLMsI7GSifJI366 75RNbJbx+AZb26UhmC+tc0wyfKLNsFKYPKbwnHdHFmkUkZGkMet2gOTXGv6spcWTCqIm 97rNSo46Hgc7+fWLZDXQae7npInW7jZ4DVe2S6wf0HVD566ohNtnmwhZNwXy/Ei4Q9hl lpFw== X-Gm-Message-State: AKS2vOznrzsx8A1/XAAT803BBGdflMt4KrJvlsHQfRJtg6zh30dQ2c6u WlizgcoY3yYy3kKRIDisPkep X-Received: by 10.157.18.204 with SMTP id g70mr32856110otg.123.1497300878736; Mon, 12 Jun 2017 13:54:38 -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 y34sm5427056oty.53.2017.06.12.13.54.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 13:54:38 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 15:54:31 -0500 Message-Id: <20170612205434.21993-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612205434.21993-1-bill.fischofer@linaro.org> References: <20170612205434.21993-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv5 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 *