From patchwork Sun Nov 5 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: 117991 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2039099qgn; Sun, 5 Nov 2017 12:00:48 -0800 (PST) X-Google-Smtp-Source: ABhQp+Sw5hJRVBWJh1aqUsmcZeYqp0bOgUfsyNO9+1FBxW5Lj7pLUJB/1j5AXOXdFqC2UdQ4CNs5 X-Received: by 10.200.37.61 with SMTP id 58mr20189772qtm.187.1509912048423; Sun, 05 Nov 2017 12:00:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509912048; cv=none; d=google.com; s=arc-20160816; b=kgIakPVLwqZlZgndFB9zsui/3N6TUfM+xx3ts5XlC3pRmPtBjCeh/igMQXNlgp+WWh WXBjyba6O2AuxI6wVC3IC8M6gKqxIQyVaRPQnNiKT31J98t+Ei4kkgeNFnlXBe1Q1yOv KbPz3Zppmmj7cIgeIqCmkJ7qV5kRfGKgpYEmzXhRPkPzw70Gv47UbrThm5KD6ZpacJKs mZ4rgfu1QwEtVP6AjisSev+ZFd5QxfRkrjtDvtSB++GUvm9sohJwkxMIAFx2Fzv/W6eT 3c32eghWhR7G77U4ff05C7jPW46+h8TKftBALVlnnhDITpSIdz+ksxFXv0WqropiDaXA /MnQ== 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=GL7cRGmgbhibk0E87oo4ZIUpnELXJLuIF6F7ug0FZkY=; b=OP194Kxn4+H4dcIGtkrpiDss01vZo/oIJm0lU4tLvr0uVgGZL+VkLXORW+yoVmnc+o pZYQFy03HwjOOzv8lJg/ebdyEQVKLgruv8CWoE/I4UOuxw0S8EC2HLL69aDio/scvX+E VJ31JV/yUdHASGdDnQLknBxxGy9v7v3DSNLvCPeP3Ybrdpt0JuD251fR4PZC9uUAUO4M cHqLd0rbb+31jHnF+KSo0jE6SDECc6ilLkoEqRC5Y1ijOEy/YDxRYJ273uacHtTejIvg Tc8f1Zj4x6Q0/zIE3OgUL35uW01aQkvHWsaNFA1Kij0Z372KC6tCZfiIaMxmW7htoybQ ktdQ== 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 r27si9900501qtj.352.2017.11.05.12.00.48; Sun, 05 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 214A960B4C; Sun, 5 Nov 2017 20:00:48 +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 B697F6074A; Sun, 5 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 1DF256074A; Sun, 5 Nov 2017 20:00:13 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id A83D36074A for ; Sun, 5 Nov 2017 20:00:10 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward100o.mail.yandex.net (Yandex) with ESMTP id CDB102A21131 for ; Sun, 5 Nov 2017 23:00:08 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Un9RXBP5ZH-08b8i91d; Sun, 05 Nov 2017 23:00:08 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AsckRko5Lx-08F4JJt0; Sun, 05 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: Sun, 5 Nov 2017 23:00:04 +0300 Message-Id: <1509912006-21983-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> References: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v1 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 276 (muvarov:next) ** https://github.com/Linaro/odp/pull/276 ** Patch: https://github.com/Linaro/odp/pull/276.patch ** Base sha: f318c88f26b15140dda243e6a1d27e3c8f9d275b ** Merge commit sha: a1aa17bb2964bcc180fc9b3b1568b36f8c235049 **/ 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 *