From patchwork Tue Jun 13 12:03:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 105155 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp367347qgd; Tue, 13 Jun 2017 05:03:34 -0700 (PDT) X-Received: by 10.55.9.6 with SMTP id 6mr13239236qkj.163.1497355414443; Tue, 13 Jun 2017 05:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497355414; cv=none; d=google.com; s=arc-20160816; b=R2DfDM/f5gNZXVhM+kjgmjlr3xVXt0EGOaz8StlThp/h5tURXbGdE8IASbfPgwTsew ZF1js+qleTCJfAzDXut5uGF8635JrdnveB0c2xOjVKVodiuKHlQsHgR/b9fbmkRowqvy OTgCyacU8yUJ6wyqul8n5/66ea0HXg9izemZR8cd5Qk/1WZNy8O8LaxHmDjxACi1dL6i RXtdv4SfUPYJLrIF16+eG743qct7IlrA9QQnWoPuWB5bgR+ETMFKWt/EHSg1ioJ/vglu ptPRAB6Qq2bqG4jRlCGSoyU53qbmZ7fgWNwksdjfWSQ9+GNRh976PzzqncAF5sc0GyRo orNg== 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=j3BuaQUG0c34wcDE6uG2bcaqwjuSFgdXp/5fVHnaIZpVKV55ypl9bTTFrR7WN9eU6T 66wTikYA5TaO3TOha5S92Ex+9Fr7+ci6P1iLK/LBThfLgKyYqCrUbXLUWxBrRUFAvtOU yMBuIys6ntE43O2cL62nUGv520OGQtZ5iMXwceqYaSyDfXfZEVJgxzHFerc5xDqzx/Kb BR2iu0pQMVImIIke+uIXX9Aaw4x9pjxbi/zCaHpfn41dWXXvrt2oQlKH+W6JUr2lZmYK zt3zHpmxX+j11UcHs0HAgqAFP4qK4zK9Pg3ihzIv/lDPB4xrJCFPXeC8pCVjIeftlbwX cbqg== 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 u185si11390881qkd.28.2017.06.13.05.03.33; Tue, 13 Jun 2017 05:03:34 -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 9D99F60BF6; Tue, 13 Jun 2017 12:03:33 +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 8152D60AF1; Tue, 13 Jun 2017 12:03:30 +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 CB67C60B29; Tue, 13 Jun 2017 12:03:28 +0000 (UTC) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com [74.125.82.177]) by lists.linaro.org (Postfix) with ESMTPS id EE5CC60A03 for ; Tue, 13 Jun 2017 12:03:27 +0000 (UTC) Received: by mail-ot0-f177.google.com with SMTP id k4so86050868otd.0 for ; Tue, 13 Jun 2017 05:03:27 -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=DGDsKY+F6iDJinA4bq8/SoieLrn2morahkNT2q60Fe1KVIh3X7oTtI7VI3YNbtB/Rk LsTEQaLE9XC/3eojGSdIqzph2A15D9rNRXgS8ccWTh/qDySSEJPEnl+u04mH0y3m3KjZ FRzDdKO7eAuNcZoDnXc8bZEHK+9BjTxBGsk3J+0U+X+bwGf6GcRX1QS9ejq/OegzxLNG LftiSBC5ThvFtlESwepVeqyDW74XCryzhhrDK4ZdN27y9q0my+SVH9BvjMV7p1teXrHG +lLh+1GqIyFzO67EBKSW9gX6rHk18z/LwOEZzFJD/7bS7F5F8R/bt+JNNMPTDAUYaVkF ZPUg== X-Gm-Message-State: AODbwcAIqol6+Z7VpRe5bFOcLyEYm1damMKpQ/lbG6rvQGcZsMW9O0N1 YlS7bH+BfQQB7BJimBzVIEbC X-Received: by 10.157.44.231 with SMTP id e36mr34938172otd.82.1497355407178; Tue, 13 Jun 2017 05:03:27 -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 p3sm6389439ota.51.2017.06.13.05.03.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:03:26 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 13 Jun 2017 07:03:20 -0500 Message-Id: <20170613120323.30475-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613120323.30475-1-bill.fischofer@linaro.org> References: <20170613120323.30475-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv6 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 *