From patchwork Mon Nov 6 12: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: 118023 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp2541588edm; Mon, 6 Nov 2017 04:03:43 -0800 (PST) X-Google-Smtp-Source: ABhQp+SDpuZW564nP8Fpu5kwXrrZdC8kxA/rv5MtL5D9dv+Lq9wPbgEgLgRBmvcU049YchZI31CN X-Received: by 10.233.230.1 with SMTP id z1mr14834432qkf.206.1509969823792; Mon, 06 Nov 2017 04:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509969823; cv=none; d=google.com; s=arc-20160816; b=klgUWcdIqPSWrFLoFapgm6ee3lVM0vgXy1gMXRcTguOnPiaSzFOZTayC0QENVX771o +fvP6I1trYgR7h74+RSU6HqKuWCruvVRGGdtNP8FoGH2zWzlKwy2nPwqpyzl1qS71vJG 3EhmFbDmCvdB4RSJ0xia9G8aqLfIB/xjYH12tdIbBRuMOebX+hb1Tn86RYxVeUad9UOo DP2TxQ0CrkhAQcc2KGLkvJ7X82d4XhMNcd2666KeKwz83HXB0XsmEvqo8QMkf013q8aS DoxvhUe+GI1/+Ugww25awZ53rWV/8Pkw7ktjyjggKfZYDEAC98UIEkoz/IFYICEF5KKQ r9Tw== 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=aUAFRhq2ATs6eotQ/mE+HjY0vcJgRD/0m5w4M7u6wKo=; b=rQ77WqNIjBCxXW5XrHjednS+s+m67LEb9sbLOisSG24TpkkdmkTlvrwi50r9y+l8+q Q7mUx6M2kTL8Qr28gIl7d9DuYkIqLKIq3DMBJPzZszbacy6rOUkh+dW7Lo773f2+CR1P 9XMdQGioJbxpqa01fxIlL5/633K3FcHD0baZAPi8UPGy8wDgiwqFy9k4XFr+xzMOjzFX M5RHB3UqFoPREuYcYUACplDWuBhyr27IWgKf/ap5njbLua8/RUGBTcnvzq6ZJ2z+8YgC 0TrwI4QC60e3uy+Jsa9MJBy27sUj1MBcv+DdqjZysSqjMNBjqY+VjRtl+NciUILC6brV XDwQ== 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 d72si2124650qkj.472.2017.11.06.04.03.43; Mon, 06 Nov 2017 04:03:43 -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 6679A607F9; Mon, 6 Nov 2017 12:03:43 +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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 25C64607FE; Mon, 6 Nov 2017 12:02:06 +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 47ABA6069C; Mon, 6 Nov 2017 12:01:52 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 2806D606A0 for ; Mon, 6 Nov 2017 12:00:11 +0000 (UTC) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 892EC1242ADD for ; Mon, 6 Nov 2017 15:00:09 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KsWVQoUZFy-09YWbGoH; Mon, 06 Nov 2017 15:00:09 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3HBJbpFqMH-08eK6o7T; Mon, 06 Nov 2017 15: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 15:00:04 +0300 Message-Id: <1509969607-32198-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> References: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 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 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: bb644389b2bb70dd349aed079e00a2fea7c90eea **/ 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 12: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: 118022 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp2539659edm; Mon, 6 Nov 2017 04:02:15 -0800 (PST) X-Google-Smtp-Source: ABhQp+Rzor84ep9P/S4tY0qRDT1UVLchjPfZCeTyuHZMLO0wkmmIj6w7yWsIgEgxd8cYjfUtFw56 X-Received: by 10.237.42.97 with SMTP id k30mr22855458qtf.184.1509969735789; Mon, 06 Nov 2017 04:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509969735; cv=none; d=google.com; s=arc-20160816; b=gtKlAtasTizrSxyYW795jiN0LeLb4jZyvs6viM9iLsUMoKBhP+E24/xdmcbJ8yVvrK Xt1RoMGzSl00PZhDhqXxBGmnbZddBrnhG8GZREP7ZHvbjDtY8bOy/5IQCNkb6GJdZe9m iRYmP2rlRDAqdagTlF41xkjd3OT5KiNUqRkCJbsvBuwFXKIuHVBEboy63Cljnb6Pbi1k 5oetAvDPiZwLaiWvsbUqvuasLK1OeACjweLNRR+kc8SuD6MTLv4TjXkj6LQ2ahzYKbI7 0doYXFkIbJyjbXH17MO9F/lysBKTPTM6lbbSEyHW7nm0Ag07DmGTUybcaX3z3w9Njjc3 Yrew== 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=5MGE1N0opLFDKHzEhqPu7rCRoMLY/lQnGxMbIdOR7fE=; b=HNgomX61Jnxt76io8ORFadW9WgPqYsyYPgKVhdkOFleccjTnvDzT70JPrOqLB9tcXS W9ab6Qz7i3q59P6W1tdhXu+v6dyaSX/MuNCZaop29RixYEhE7/Zfg0UlIgJTYm361UDY kZQkIdYAHEBoJM4zNHaiGEiqFymGMH3Fm8Hs8TxpU/G83unMcB0N/RKsbXuS/F6J1+aa D+G0ZwPngLlT/NxjQTRNWshByqMtUnxDtDe9OpHuST9sdv371xfOjqTKMhLD1ErikTZM lTx4/nFzoMXqrJQ188MI6dovbtHfPugDRadW8dfzhq64DZS8PP9hZHJQsV4Dy/Gz0/Xb MrpQ== 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 o39si8580933qta.471.2017.11.06.04.02.15; Mon, 06 Nov 2017 04:02:15 -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 DDDB0609D0; Mon, 6 Nov 2017 12:02:14 +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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, 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 1DDA160690; Mon, 6 Nov 2017 12:02:01 +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 0B78460C0C; Mon, 6 Nov 2017 12:01:51 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id D1F9D607A9 for ; Mon, 6 Nov 2017 12:00:11 +0000 (UTC) Received: from mxback5g.mail.yandex.net (mxback5g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:166]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 4860A2D81921 for ; Mon, 6 Nov 2017 15:00:10 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback5g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XKeqH3F66g-09sKsPim; Mon, 06 Nov 2017 15:00:10 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3HBJbpFqMH-09eGWcZE; Mon, 06 Nov 2017 15: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 15:00:05 +0300 Message-Id: <1509969607-32198-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> References: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 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 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: bb644389b2bb70dd349aed079e00a2fea7c90eea **/ 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 12: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: 118024 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp2542380edm; Mon, 6 Nov 2017 04:04:25 -0800 (PST) X-Google-Smtp-Source: ABhQp+SqHu+I/TvKgodj4hY7/0vIQcp1RMLm0JuRxcs5/9/aTY11rXa4YCShtw8hJlZ/tOd+JQ3J X-Received: by 10.55.33.85 with SMTP id h82mr8899398qkh.56.1509969865382; Mon, 06 Nov 2017 04:04:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509969865; cv=none; d=google.com; s=arc-20160816; b=SId98n5etfGzlsgsLvoGOPEPY2cy1VwM15WFyLYWlfccLG6+KaGtdF3NNdK7fQh223 xndsQd8NJwqJu+z1rRrP/bgmzDzkzxD28eGIw4XqkRoxLCx6v/LJoAgy1sR4eUhgK5aB L7X5qzOtEZoetnX9t0zObdjJm3rrR5fy8knDbGEZbEzpAI3+Fj+l3t07OZgKPr5S4jXF iDmy/Jm3Rz1MGVS+Dq3dkr9LSFVW0bzjLNs2jfKJlBfNa2wGok34uVehOIIDk/6kwUAK bjNpIWbFCFGAKkLzDxNNj96ZhfWJ/k4JNoiYEVwiGCnw53n0EMN7XWMLrjMKm9g4JJc3 YDTA== 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=k0/ZxPzZO0BrFDc2mFcxScSjEu/z2HdVgBvTSWnWx64=; b=ffo9N8Udj4fRURWwl0foMP4bDpfbdZOZ4Da/XItJCZOr3ROMZMLDPutS33K2hbryil uq6DNnP4dFrZaXXneXLLn265XLd8ayNQN3Gc98/7noQ220Xz4wsP9cIj0mWGjPCbo91s TB1cAbGHEfo3VT1y64K0gMDSpkEghtwu68SM4AWUPrZn8JMRnbIrjz3mCQL9ZerYztqQ MNtRKwQORkAl9iVYJKTpQQzy3NRJ3ANc7wHU3RkSXEmJcEWfF1L0AbQTcboUBKdtM841 2o1CWUIry3otT3Vo+duTpOJhPrgPgcqbrqDkXZQUZz+/7bqIudo600ef3Jy22/A6CK+0 k++g== 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 c12si6214068qtd.226.2017.11.06.04.04.25; Mon, 06 Nov 2017 04:04:25 -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 199A060C0C; Mon, 6 Nov 2017 12:04:25 +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,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 7A7BA60BEF; Mon, 6 Nov 2017 12:02:08 +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 2ED066069C; Mon, 6 Nov 2017 12:01:53 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 33798607B2 for ; Mon, 6 Nov 2017 12:00:12 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward103j.mail.yandex.net (Yandex) with ESMTP id D3DCC34C1229 for ; Mon, 6 Nov 2017 15:00:10 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KSyNDzjt1Z-0AIKFnTO; Mon, 06 Nov 2017 15:00:10 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3HBJbpFqMH-0AeSgJgZ; Mon, 06 Nov 2017 15:00:10 +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 15:00:06 +0300 Message-Id: <1509969607-32198-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> References: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 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 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: bb644389b2bb70dd349aed079e00a2fea7c90eea **/ 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..6a45f3986 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 12:00:07 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: 118025 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp2542515edm; Mon, 6 Nov 2017 04:04:32 -0800 (PST) X-Google-Smtp-Source: ABhQp+RQLMI+nsexHcLijWBoksnEOTRR0ELaR3HjzzX+gR8ERnlOieOMOVUXa8XKh79XdUYfpW8a X-Received: by 10.55.160.135 with SMTP id j129mr20345185qke.274.1509969872246; Mon, 06 Nov 2017 04:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509969872; cv=none; d=google.com; s=arc-20160816; b=GxFfSctVZxuuqa/tICbmrA2vVXv9mcZkZdTpFqFKNhyx/7m3+TiQqGdCaRsaoqSkCI 5LXir5aApx+dbZu0Mgrj9TvKsVLcod/j53h7CvUjJOyZddnfbxrrOG6P2VXqb4ZQZaex R8A8DmNr/l9mox09i8FsyBqH4ZTA/sJUuOp7nr5EBe72U34T/YuH2W4g4uSCg63bo/Zm VtKpjfp6JIvI3Wm63QYBIMnEQ6w+wF66/HZctY0rlZi14hHVA9KsVfSfToueSsLVoAf7 0/Y5iEQ5eIcqEGr7Kemyk1yuwsYkvVD5wz6uC8P7mAQArHP8R+qW0jSC9ZnjlmJbJp2V 8hVg== 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=I3BIkz9F3e0RJ/d8kd8EwB6gd/JOt68zUPph/IUa7A0=; b=MBlYsyOpSHkjhua7QpztAkeXL2hBQkwj763fDlTrtb3WSPTprSvUxBgn1pJ/rmsABs 5DxQiC51mvKrlM6Kc2rxC1o05YH/dQkyYACzqkDnWLri49ENND9STC1rZgNSldE+hsN6 +d3sfzlbgCYv5BhFTjN5WY1kjPEWp8hekBRE/6V6tCcQnoHcQdoORTSQrw+nbxOQfO7J wIj2KT+6DUmzRmskJib3DEPrYmKmkep4gyVghFJAXK0/NvCamDKXsaPQTtOxUEI8+H6K n7QsxSHD1wdmi+lF9YMmgsbk+TmhF2SW2WRuqUkOYdQ1ZZ/ZpC4SXrvmSHxv9B3UkPal 5Vqg== 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 o3si3213804qtd.109.2017.11.06.04.04.32; Mon, 06 Nov 2017 04:04:32 -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 EAC8160C2E; Mon, 6 Nov 2017 12:04:31 +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 E1BC7609D0; Mon, 6 Nov 2017 12:02:15 +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 98E1E60690; Mon, 6 Nov 2017 12:01:58 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id C8BA660C0B for ; Mon, 6 Nov 2017 12:00:12 +0000 (UTC) Received: from mxback1g.mail.yandex.net (mxback1g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:162]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 63BB5701C96 for ; Mon, 6 Nov 2017 15:00:11 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback1g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IFxh9lOTee-0Bm0h32u; Mon, 06 Nov 2017 15:00:11 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3HBJbpFqMH-0AeG1kp8; Mon, 06 Nov 2017 15:00:10 +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 15:00:07 +0300 Message-Id: <1509969607-32198-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> References: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 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 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: bb644389b2bb70dd349aed079e00a2fea7c90eea **/ 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;