From patchwork Mon Jun 12 19:42:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103670 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp81441qgd; Mon, 12 Jun 2017 12:42:55 -0700 (PDT) X-Received: by 10.200.42.177 with SMTP id b46mr12555888qta.122.1497296575131; Mon, 12 Jun 2017 12:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497296575; cv=none; d=google.com; s=arc-20160816; b=g1GgHTg1loDSRVOd3UmWswZcE2znrDLKqEipP7XPTaxAvuXUPBktLmvJFRBdETpka5 C3FjDY1Y/eSrNME744T4+/JrzT3/sYm4VENJ3BL5qvn0Ex79AJ1XkuXrCN5bEJ3OCl9T cxC09LvdlxmhV8LJS2Iwk5UKyq1eaeibjRIkJObCqZohonZmQDR2EXH8PwD98awQx9qc UbtGZwKCWYETdLAxgTX7RpwrP+VSExxDqlrIG36lqSSjW8sEFLG6TrSmzJsE/dCi9iOu A+2tctmixLwTqVzwglMyaSDC3EukqAgJ0K7Z2LdlM6BOfB5fHYkI3+xDg3scs3RylAAB yMNw== 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=KvQb91Mu54WvGbyk1Mbcjg3LNUyTxoBa1cKN5jJPFuj9vhDR1CflpVz2fRuiKPkzTe 5ESoMrFn1qIm/7SJ+nR+Sbnk/ldw2GYMzSznmy5+9KpaHmXo0Ul1I7YdA+NDnt4HTFPd oggCTGdjIOrUZNtI9KXAlpb8AUprksly0GXvaNCcXcQzqat7DiPeStxbo1w2LMk84K0S rCBlzzrCsTUuyXBOfdAoAh5tp6HVsbLYC6z/fefXBm73qrVlZloPqyXa1SMkzuypt3sC 0Trda7S9V3jwZ8nqzZAPu5dDpsAWPuHSnJx/4NVFMU6/h6xL6Zb5BvwWjh6RJza/4pyt FGwQ== 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 q54si9409540qte.281.2017.06.12.12.42.54; Mon, 12 Jun 2017 12:42:55 -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 6405A60BF8; Mon, 12 Jun 2017 19:42:54 +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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 49D6C60B65; Mon, 12 Jun 2017 19:42:14 +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 35D34609A8; Mon, 12 Jun 2017 19:42:11 +0000 (UTC) Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by lists.linaro.org (Postfix) with ESMTPS id 3F1C360993 for ; Mon, 12 Jun 2017 19:42:10 +0000 (UTC) Received: by mail-oi0-f48.google.com with SMTP id b6so6773960oia.1 for ; Mon, 12 Jun 2017 12:42:10 -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=EMrSkPMruOpm7oQHraTXCbyO4cYKFiWJwk8emDRmBDYlZ2KRojQpiVPKhYvKCOL07/ 8PbwRkbgHBMKv//UewvVdWZaSP6I2y2rU/0gBmkMLMlUHjHRdHAFEnqo2Ou3KDHxHhaw GcKRBxcPl2fcIUMSJK22wpEzItpm0Ok54GO3wqQMFXF3vhpoizfultto0WgAzAIirExg Lv7Mi8k9qQyPYIhHJtB48/bMtudbu90IhD4dRPN8xJ5+9nEYc0i/Pg1Lo0OsGNbRywZW JuZr4fb0n8vPdknmK5d4RmbrK5UhHGuAI+vYcL2nQDlpHdlrTBN5I2RWMHQxl0y0gSrc jbfQ== X-Gm-Message-State: AODbwcARCjbuuUC7nw5ljgUWjVvMi8f075+xRrC55J6JuEQPvMDcim38 /UH/ufY4D+0H4mjI70hac5Q/ X-Received: by 10.202.73.213 with SMTP id w204mr21929309oia.39.1497296529482; Mon, 12 Jun 2017 12:42:09 -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 c93sm4698347otb.38.2017.06.12.12.42.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 12:42:08 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 12 Jun 2017 14:42:02 -0500 Message-Id: <20170612194205.8592-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612194205.8592-1-bill.fischofer@linaro.org> References: <20170612194205.8592-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv4 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 *