From patchwork Mon Nov 6 20:00:03 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: 118095 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3150351qgn; Mon, 6 Nov 2017 12:02:00 -0800 (PST) X-Google-Smtp-Source: ABhQp+QwdvfzfYrdvgHTIWM9uG8cIMr22oaGuLI9QIYr5NfqOcb+LHjQT8XivMlhzsJHaMz+hpUB X-Received: by 10.36.12.73 with SMTP id 70mr10590109itn.121.1509998520840; Mon, 06 Nov 2017 12:02:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509998520; cv=none; d=google.com; s=arc-20160816; b=aW3DtBQqISOSeSJpgSLDMSw15dCaE2TLcI/sszgFU/k1FsEf3rD+DjT1kRqr6sTWXt hFy8qdxKJGTaHCfil0u8h8QRSjeVTPylO0NyqlPABSlrfuQIfc95n4JZ3k4MG/YpcRaD S2LcCK18vvgG2X5frgSDSSf7Y2d0uCuyigI7jh0Gvw9WAZffFQnAcRQpY9Xcbe0Ui+xn LMUctC7hq10oFsLts8FK37EHlP5WBmgs0rSNlOqqyR3x+akRM060gSorIRdaJE+66K+E vosEBFraxzNEl4AFXxFtp25PGU6xKU4VpfOrgF6i53RhsD8EGVuq9BvxHUHL3ummalWR C5Fw== 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=bGz913Jp4+HkTrUhk0Qd1JR/VDXu+Aqlz+dwWcm4ueM=; b=hyTSDom6FAK8sznqH5zrG68Hs1IEuUrdL/zIPXVmXu64bhd5DSHiOgL/NmNglwEjPV sz+yYAdDwDPHQ1o8GYShszQJY4JhzkdK6NzmcOIldJ11+x+tfLddTBQhF98xE/d2Cshe 7NOp5TtWww4wPzzk/UJFh1S008+5S/jFJlMxPAHLRArkygFH/wTQsNETEAllSfIgnfpz ib7691R/3jxbbFz9dYyqQtaavmzXkTM2VodRCEIAUklSHCkHDS5cLVXPBuZ2pOfbpmNY 4MMt2YzK7bJjOHMea+9HieG4D0dmbID02nauOG0YCW3oDK1oGhyKXvO+L4fanuHKSTDd MHMQ== 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 l87si11187743iod.124.2017.11.06.12.02.00; Mon, 06 Nov 2017 12:02:00 -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 5801760C0B; Mon, 6 Nov 2017 20:02:00 +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 7577660C2F; Mon, 6 Nov 2017 20:00:26 +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 77A0F60718; Mon, 6 Nov 2017 20:00:14 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 4FA2460636 for ; Mon, 6 Nov 2017 20:00:10 +0000 (UTC) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 6776B7875C1 for ; Mon, 6 Nov 2017 23:00:08 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id NNaZgFf0x0-08CKAZ0g; Mon, 06 Nov 2017 23:00:08 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kjmdnsAqIW-07F0hZ8K; Mon, 06 Nov 2017 23:00:07 +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: Mon, 6 Nov 2017 23:00:03 +0300 Message-Id: <1509998406-12706-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> References: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 Subject: [lng-odp] [PATCH v3 1/4] api: feature: add odp feature bits 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 new odp_feature_t bits that permit other APIs/components to refer to various ODP features. Signed-off-by: Bill Fischofer Reviewed-by: Petri Savolainen Signed-off-by: Maxim Uvarov --- /** Email created from pull request 278 (muvarov:next2) ** https://github.com/Linaro/odp/pull/278 ** Patch: https://github.com/Linaro/odp/pull/278.patch ** Base sha: f318c88f26b15140dda243e6a1d27e3c8f9d275b ** Merge commit sha: 7b1bdbd556cad7a42550ae18152f2f9281b6930e **/ include/Makefile.am | 1 + include/odp/api/spec/feature.h | 69 ++++++++++++++++++++++++ include/odp_api.h | 1 + platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/odp/api/feature.h | 34 ++++++++++++ 5 files changed, 106 insertions(+) create mode 100644 include/odp/api/spec/feature.h create mode 100644 platform/linux-generic/include/odp/api/feature.h diff --git a/include/Makefile.am b/include/Makefile.am index a3a7e1658..746b5975f 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -17,6 +17,7 @@ odpapispecinclude_HEADERS = \ odp/api/spec/debug.h \ odp/api/spec/errno.h \ odp/api/spec/event.h \ + odp/api/spec/feature.h \ odp/api/spec/hash.h \ odp/api/spec/hints.h \ odp/api/spec/init.h \ diff --git a/include/odp/api/spec/feature.h b/include/odp/api/spec/feature.h new file mode 100644 index 000000000..0cfc141db --- /dev/null +++ b/include/odp/api/spec/feature.h @@ -0,0 +1,69 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP features. + * Define various ODP feature sets that can be referenced by other + * components. + */ + +#ifndef ODP_API_FEATURE_H_ +#define ODP_API_FEATURE_H_ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** @defgroup odp_features ODP_FEATURE + * ODP feature definitions + * @{ + */ + +/** Definition of ODP features */ +typedef union odp_feature_t { + /** All features */ + uint32_t all_feat; + + /** Individual feature bits */ + struct { + /** Classifier APIs, e.g., odp_cls_xxx(), odp_cos_xxx() */ + uint32_t cls:1; + + /** Crypto APIs, e.g., odp_crypto_xxx() */ + uint32_t crypto:1; + + /** IPsec APIs, e.g., odp_ipsec_xxx() */ + uint32_t ipsec:1; + + /** Scheduler APIs, e.g., odp_schedule_xxx() */ + uint32_t schedule:1; + + /** Time APIs are, e.g., odp_time_xxx() */ + uint32_t time:1; + + /** Timer APIs, e.g., odp_timer_xxx(), odp_timeout_xxx() */ + uint32_t timer:1; + + /** Traffic Manager APIs, e.g., odp_tm_xxx() */ + uint32_t tm:1; + } feat; +} odp_feature_t; + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#include +#endif diff --git a/include/odp_api.h b/include/odp_api.h index 060ec888b..3a03a05b8 100644 --- a/include/odp_api.h +++ b/include/odp_api.h @@ -32,6 +32,7 @@ extern "C" { #include #include #include +#include #include #include #include diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 0b29e613c..356f229bb 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -35,6 +35,7 @@ odpapiinclude_HEADERS = \ include/odp/api/deprecated.h \ include/odp/api/errno.h \ include/odp/api/event.h \ + include/odp/api/feature.h \ include/odp/api/hash.h \ include/odp/api/hints.h \ include/odp/api/init.h \ diff --git a/platform/linux-generic/include/odp/api/feature.h b/platform/linux-generic/include/odp/api/feature.h new file mode 100644 index 000000000..55a86a831 --- /dev/null +++ b/platform/linux-generic/include/odp/api/feature.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP features. + */ + +#ifndef ODP_PLAT_FEATURE_H_ +#define ODP_PLAT_FEATURE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @ingroup odp_feature + * @{ + */ + +/** + * @} + */ + +#include + +#ifdef __cplusplus +} +#endif + +#endif From patchwork Mon Nov 6 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: 118092 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3148920qgn; Mon, 6 Nov 2017 12:00:49 -0800 (PST) X-Google-Smtp-Source: ABhQp+RS9AQutYk4M84TceZkhGnNKg8F182u9f7f8gXOYcaKJqhL/7XQRGM7gBrV6ASGqG8O0GWE X-Received: by 10.36.163.140 with SMTP id p134mr10782237ite.46.1509998448795; Mon, 06 Nov 2017 12:00:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509998448; cv=none; d=google.com; s=arc-20160816; b=SD5LuuphoLugFA37Jhe4KdQWkwpTrRItuffSsZJg7w5UhCO3PBcnKc53jKokfwYF4P Tj94SvYP6jIvR1zsoGh3myh11i5sAvye+9P97eJSDRsF1oEjVMDvnmA2E/892mabHkLX Z7NE3ggYT40pb4UEH2wDMgiEAFFF/fMMLKtYeePpjAW9mL6KiKXQVqVtfEuw0Jf3wwiC qfcCgh4A0rQjAvSdYD56R37R/yu5Aiai9YxZDRPBdyIxnCHeiR1g/SQREYClS8TAJF2h OBCq+yrljFgDPKjLGe1yLqpzz59EDu+U3nvdweMBrG2gIoTQEUx/rpyKgUpEgUlB1Ikz lX6Q== 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=Dps0HLSv1mJLm2sOkOxAREOZGAAa4LUl+JQZ7PqbiX4=; b=xNM9cI1BHiepR7H9+u8JDxXp+raukSqfvhLM39rd7OsSBwymMlNdqCF6/lcc+ILQzF Gtz4cectp7qJW4XIjM+ZuEGnc30x9RUAbmV7XgBVdpe7DvAcz2WA7fFesSB4AUCZg0HV Mu+6WqFP6pvbZaziTlvm95r+ANTRDlNsHO22iVlTRGp4IvPVLZlC3Uf5ThZBZ1u/4Hsm tgjzbTLc0aFYcOf/FWmOKwHCwBzlNNtsrdxKQ9tbamDZYZ/PmCioUBerl1ARfsfJW5or tPDZQ2wpbAEtFQJ7WWzKsO7m4YXF5R5jZIQiOuwzhWpt2pEYqT/c6q+ZqyU4cj7aOBCi Msdg== 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 d12si11300271ioe.241.2017.11.06.12.00.47; Mon, 06 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 D0ED560C39; Mon, 6 Nov 2017 20:00:47 +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 6454760750; Mon, 6 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 E95ED6074C; Mon, 6 Nov 2017 20:00:12 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 53817606B3 for ; Mon, 6 Nov 2017 20:00:10 +0000 (UTC) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward106o.mail.yandex.net (Yandex) with ESMTP id DBF877875AF for ; Mon, 6 Nov 2017 23:00:08 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id L38VT9ultO-08Yih8h1; Mon, 06 Nov 2017 23:00:08 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kjmdnsAqIW-08FOkcDh; Mon, 06 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: Mon, 6 Nov 2017 23:00:04 +0300 Message-Id: <1509998406-12706-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> References: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 Subject: [lng-odp] [PATCH v3 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 278 (muvarov:next2) ** https://github.com/Linaro/odp/pull/278 ** Patch: https://github.com/Linaro/odp/pull/278.patch ** Base sha: f318c88f26b15140dda243e6a1d27e3c8f9d275b ** Merge commit sha: 7b1bdbd556cad7a42550ae18152f2f9281b6930e **/ 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 * From patchwork Mon Nov 6 20:00:05 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: 118094 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3150241qgn; Mon, 6 Nov 2017 12:01:54 -0800 (PST) X-Google-Smtp-Source: ABhQp+TFNsAx2SktubybyC3Z3zJ6HjTbWBLkuWrROGgdrwPXpUOH3mPBMWGDoALzZ4bIcfi03sc8 X-Received: by 10.36.20.81 with SMTP id 78mr10593037itg.127.1509998513992; Mon, 06 Nov 2017 12:01:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509998513; cv=none; d=google.com; s=arc-20160816; b=OkZB1iuMwHGYM4jElxwSH8wxR89tbYDUuxvtAcisbG+qYU5Me4L091SDktF6qmV5H9 3ZcWTiPDnhCTKye5Ij/wFK7zDaYIIsZcCoOFgGkbOah7mI3xgiJtbcg4KiWhO/mkUQGa rvaAB0X711Ni2vBwZye8Ri23kV6whjogGKO2rvNCcLl2XyYtCzqeosPtr0dCiWzqnG86 kViLh7VS+weDbnMa7vqtkOAV4k5Ul2biaS3MQpbGbYF80FPuJfQABxSgiBTkbAfQspeu GaPF8aiOsy7WlvIyYsz6KVn/z92qnKA12dQNhsi5TDMMdRfStowfm78IinVJxp8YUsip X4xQ== 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=fwTdmf8F6sbbgQXsdLDGWsZiJDCgUJYzzrLLr1L6WTc=; b=AFDcN2XOBVr5tlR+XFzgMUE3ovJHgzOshWoFufVoWXQt6awq0WyGa+uIJ29fQJuLoE 3md6FCVdLh488/hBVxvueH5az0HqS7IwB4vBs2ndeDgvl9wl7ImsNJ3oPXxrEM3e4cyF FNccryE+6/utGLjpIo547x6MtbK+yQSl5GhyxBXWoAC75RQAIUPGj6Y0kTD6Air4kJRA GhvmG4Y26OBrvP9hYBIW4CQLCfs7DIz2vd9zrYTfFgu2vVxQDOZw2eAMkipeKX9Gzcc6 uUajytbBSy2ShDt5qVQr6KsqIJ7mJnI0QNWjLWETS4cwB5cjNT7y010y0+szoCcUFHBD KKXg== 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 h185si8564931ita.150.2017.11.06.12.01.53; Mon, 06 Nov 2017 12:01:53 -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 9E4E860C0B; Mon, 6 Nov 2017 20:01:53 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 1EB7C60C21; Mon, 6 Nov 2017 20:00:24 +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 55C6E606B3; Mon, 6 Nov 2017 20:00:14 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 4369660721 for ; Mon, 6 Nov 2017 20:00:11 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 875986A86ED4 for ; Mon, 6 Nov 2017 23:00:09 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id oqRgWLfEQL-09IKeatS; Mon, 06 Nov 2017 23:00:09 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kjmdnsAqIW-08FCqaT3; Mon, 06 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: Mon, 6 Nov 2017 23:00:05 +0300 Message-Id: <1509998406-12706-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> References: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 Subject: [lng-odp] [PATCH v3 3/4] linux-generic: init: implement odp_init_param_init() 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 Signed-off-by: Bill Fischofer Reviewed-by: Petri Savolainen Signed-off-by: Maxim Uvarov --- /** Email created from pull request 278 (muvarov:next2) ** https://github.com/Linaro/odp/pull/278 ** Patch: https://github.com/Linaro/odp/pull/278.patch ** Base sha: f318c88f26b15140dda243e6a1d27e3c8f9d275b ** Merge commit sha: 7b1bdbd556cad7a42550ae18152f2f9281b6930e **/ platform/linux-generic/odp_init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 92a583702..fe03709b7 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -25,6 +25,11 @@ struct odp_global_data_s odp_global_data; +void odp_init_param_init(odp_init_t *param) +{ + memset(param, 0, sizeof(odp_init_t)); +} + int odp_init_global(odp_instance_t *instance, const odp_init_t *params, const odp_platform_init_t *platform_params ODP_UNUSED) From patchwork Mon Nov 6 20:00:06 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: 118093 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3149629qgn; Mon, 6 Nov 2017 12:01:23 -0800 (PST) X-Google-Smtp-Source: ABhQp+RqmLIwc46Zxz4U7Rl+K241SBlPho5+8FzwKPjD7LfbaE1knR1MD9sMzDstkIwu86SXRfke X-Received: by 10.107.150.20 with SMTP id y20mr21580680iod.212.1509998483076; Mon, 06 Nov 2017 12:01:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509998483; cv=none; d=google.com; s=arc-20160816; b=c1vsnMolfgeGzMsj94MLU7rHbd0sRZ1ca+ROInebfU1Y7nhjYrLSeU7oaLCoqUEf5V vcETo9Bx+Jzj60Pr3lU/n0+JKpEwCdMLs43OCdjNx/IH3N0f7s4ud/SFQwIHDAAp1Xjt pB3f1X9WZ2MizZN/ygOGE1Slnhn2k0u4IVtzDgHtzp4F81KGh/CgrNuaZIQpf718TzHW B/p3ZnfxhQshhP7VO3er41S6DiSZjz3IdExe0FAKvzHSbjBP0NSSV77RzIWVFQotWAXJ Mgi75a+LunmYpio+eu+XPHb0bvo7Jv0Jd1TNp6U+viDlq6iXgD6pRxBtTKi1NLw8VIB8 dKhA== 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=4nXBBKkf++f5LTruaXyGsrfeNeXd1xW3rGdZAQdL0uc=; b=VkTJvUU72ledwRKOZaTpeatT7/Sbq4NIz685BDX4pRgn1cRm4LCit8cjfAng3JlLoH WAxlF40OewGIl5poGje4uzbwb8ECQHKavCL1eXrRqOf7TGQTb6p4ixH6Rw5MV3TDKPqv /SLMsKsn62gQ/ZWFfDPVFBBdihe+gOUJfnbkuva8XizMZ5Tog8AyHLhI/NKQhTtyBfr+ H+BJOK2gp7Ree0jjUX2TsuahFr0gCBROSjsyOZWF5n5z4hcm7pyqJygg0Rja09VgRAGd 7faOYdy17jIRq0rf4TxPetQbX7YuX2YN5AQrreVJHNQHF7Iyinu9FLGmdriFA6CYnnGl 5FEQ== 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 i13si8361452ita.48.2017.11.06.12.01.22; Mon, 06 Nov 2017 12:01:23 -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 A3FE760C12; Mon, 6 Nov 2017 20:01:22 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 CA43160C16; Mon, 6 Nov 2017 20:00:21 +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 0A15E606B3; Mon, 6 Nov 2017 20:00:14 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 3F79360718 for ; Mon, 6 Nov 2017 20:00:11 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward101p.mail.yandex.net (Yandex) with ESMTP id D52AB6A86F01 for ; Mon, 6 Nov 2017 23:00:09 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id xcvXVnTplE-09bi6FFR; Mon, 06 Nov 2017 23:00:09 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kjmdnsAqIW-09F0I7EW; Mon, 06 Nov 2017 23:00:09 +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: Mon, 6 Nov 2017 23:00:06 +0300 Message-Id: <1509998406-12706-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> References: <1509998406-12706-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 Subject: [lng-odp] [PATCH v3 4/4] validation: init: use odp_init_param_init() in init tests 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 Provide test coverage for odp_init_param_init() API. Signed-off-by: Bill Fischofer Reviewed-by: Petri Savolainen Signed-off-by: Maxim Uvarov --- /** Email created from pull request 278 (muvarov:next2) ** https://github.com/Linaro/odp/pull/278 ** Patch: https://github.com/Linaro/odp/pull/278.patch ** Base sha: f318c88f26b15140dda243e6a1d27e3c8f9d275b ** Merge commit sha: 7b1bdbd556cad7a42550ae18152f2f9281b6930e **/ test/validation/api/init/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/validation/api/init/init.c b/test/validation/api/init/init.c index d44ff2347..3dc40ea5f 100644 --- a/test/validation/api/init/init.c +++ b/test/validation/api/init/init.c @@ -26,10 +26,10 @@ static int odp_init_log(odp_log_level_t level, const char *fmt, ...); void init_test_odp_init_global_replace_abort(void) { int status; - struct odp_init_t init_data; + odp_init_t init_data; odp_instance_t instance; - memset(&init_data, 0, sizeof(init_data)); + odp_init_param_init(&init_data); init_data.abort_fn = &odp_init_abort; status = odp_init_global(&instance, &init_data, NULL); @@ -79,10 +79,10 @@ int init_main_abort(int argc, char *argv[]) void init_test_odp_init_global_replace_log(void) { int status; - struct odp_init_t init_data; + odp_init_t init_data; odp_instance_t instance; - memset(&init_data, 0, sizeof(init_data)); + odp_init_param_init(&init_data); init_data.log_fn = &odp_init_log; replacement_logging_used = 0;