From patchwork Mon Nov 6 15: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: 118061 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2858770qgn; Mon, 6 Nov 2017 07:00:30 -0800 (PST) X-Google-Smtp-Source: ABhQp+QNcC0dIfAyMcGSlLGUmHEWzHFt6MAsVfkdAaBpWPJYanLRXAOuHEkYaHPwpf1qPY73vk2O X-Received: by 10.107.104.16 with SMTP id d16mr18960888ioc.128.1509980430203; Mon, 06 Nov 2017 07:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509980430; cv=none; d=google.com; s=arc-20160816; b=N8Qqh01Q8WhccZ624pqO46Hc4gfsZz4q/G8E3R89g6m7iBsZX7Y2QOP9+syPpjskjK /yJY6Occ2dPqWGTPFe7gag48IH4SP85DvkrVUcsVgqk+EAOggFjanG9wHKwiK+eMAq77 6hVR4Khg+iROuAAZ4D70Pg/FIFdb7FMIovNIQFu1EeeEDKJKzk2OFj1z4WfgQJlmv1Kq +9pxD/Ryk6Nbu0obJ8rZE4eP/Va2nyyfvZqRQDz2LHZnBGj2Bpsh71adJcbbIM93yJqc 8eyTGEhawssExqzB9B9fWdXtB3X3jNXv2Q/3AibgXXwbv66f3Ov/dSss9Idn7m6+0YmM b6Fg== 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=u6SwwdRB/nuI1IwKexKSNNV7Kwfw8sxBG5Okv6HAiMc=; b=I4r0ZENGmi+NY92VFufNYOILiIodugqJv5Z0CY0Qk/j5hXtFzVYro+4Ggz3Ad/Eo+l 2K6ccLjb5Ik7mN0wgMg0yZtvzzew2+HrnApP112FPiDJFSd8QyB9S60Pd281SpO3kCVI PPl/4ZeskrIisIlTzWYsDWItO7XLjbVP2SEEzA/dxHb2XRvg3sZwNp+p06zIYTCQXw7x QSUUn6tR5VOart+WE1yfX5cpG/MS1LIJnGDI4lbj48bzj6/5kGLvYGsoWmFy0Awq/Nhh fNVU6BACGYKfg7a2mCUtXzPakUwGZVgzdeUK9d9S6GhqAOOeU+cl/obc8AAD8u5s9iUm 5hmA== 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 78si7803268ita.74.2017.11.06.07.00.29; Mon, 06 Nov 2017 07:00:30 -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 373E860C0C; Mon, 6 Nov 2017 15:00:29 +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 CBE1B60678; Mon, 6 Nov 2017 15:00:18 +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 128C6607F9; Mon, 6 Nov 2017 15:00:16 +0000 (UTC) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) by lists.linaro.org (Postfix) with ESMTPS id 349C1607F9 for ; Mon, 6 Nov 2017 15:00:12 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward103o.mail.yandex.net (Yandex) with ESMTP id AB15158862BC for ; Mon, 6 Nov 2017 18:00:09 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ZvdibYWSiC-09gKknqD; Mon, 06 Nov 2017 18:00:09 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id T0MgOkT6Js-09r0bprh; Mon, 06 Nov 2017 18: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 18:00:04 +0300 Message-Id: <1509980407-6367-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> References: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 Subject: [lng-odp] [PATCH v1 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: c83975d85777ff167e18764bf9fd8f310a65e206 **/ 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 15: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: 118063 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2862057qgn; Mon, 6 Nov 2017 07:02:52 -0800 (PST) X-Google-Smtp-Source: ABhQp+QL7QRamcHw2C9ROnBPm2yVQTXsyreXChJ6PqOaDzP73tTpu0+g4MLgkMXnOzp1A1zisvZH X-Received: by 10.36.203.194 with SMTP id u185mr9406392itg.120.1509980572195; Mon, 06 Nov 2017 07:02:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509980572; cv=none; d=google.com; s=arc-20160816; b=gxQDpT2E1hk9XAMhz2ptm6+TWNWw0jVTXSuepXVKANrdzREeinamMJbubu7zx4qr68 B86KKb9CSCWFz4aAaj/cPR8xWaPkjxAYiXPmKidzfr4om+qXQIb3iFSGGTAlRNu0Prty 9wlbOA/jA6cv0ZehVDRSzC2d2LXQRWz1AfUx+DMM1X/MxbdDjgc29Po7iEQeOQeP3kh3 ugZPE+x6I1/JeRzDPJkVi1z6BgD6MKCMyRe/sdIp/mu/SQYD/ptmweNMnWROp6+aNpt3 AtsvkyhT+IDMRv2cRf8ZnuCxbDmeQzPSVaVcA/KLQ6yTA10nfQw5hTiq4i4sXXRFmTPC PgCQ== 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=W9MbtGEdiFdUv6I8BxyIshETMk5bIJAVdGYz0qk/qFA=; b=vxUYV6+Lla09BJr/PDKaBkDc6kY95Hl18II+J2TzPM0NbdfAgO57OEB1Hw6kCUxSnz 9FQMuC2pz4rJU7rvFN3s+R9JF1RHhQWlnnvs0PEivjJ41YdFZ7ZlZ6xXZ24Mz725tsQZ oa0pFpS9k6nZ4kflUf5Vea6lSLqOhpkZhxchIn5AJmdrdca3fdC3sGdzzxt6m/CrmzzM SFQgDUBx562izyY87b1gab6Y/4o7Ytgm3KFEpGMukgw5WUpXygRATB7l2ZjnkGV6tQgw Yha3SPhLSFyKbYF3/0Cc4DqAGZdj36nQcG4/aP2MGhNQ6FKLdIS20HorV+4dgDg38JQb 103w== 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 q78si8383081itq.35.2017.11.06.07.02.49; Mon, 06 Nov 2017 07:02:52 -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 59FB060C4B; Mon, 6 Nov 2017 15:02:49 +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 E98D060C0C; Mon, 6 Nov 2017 15:00:31 +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 2849960BFE; Mon, 6 Nov 2017 15:00:23 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 118C7607EC for ; Mon, 6 Nov 2017 15:00:12 +0000 (UTC) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 607FF4447445 for ; Mon, 6 Nov 2017 18:00:10 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6TnWqxABKW-0A3OoLso; Mon, 06 Nov 2017 18:00:10 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id T0MgOkT6Js-09rapa2K; Mon, 06 Nov 2017 18: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 18:00:05 +0300 Message-Id: <1509980407-6367-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> References: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 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 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: c83975d85777ff167e18764bf9fd8f310a65e206 **/ 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 15: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: 118062 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2860901qgn; Mon, 6 Nov 2017 07:02:04 -0800 (PST) X-Google-Smtp-Source: ABhQp+Su3Y06/Ulb7hG5xeBEFzcJtUxekmNkP9HL3yQ0xQBaqNG4mHAQoq7z0ioDm905ytxXQbU4 X-Received: by 10.36.17.193 with SMTP id 184mr9690873itf.68.1509980524725; Mon, 06 Nov 2017 07:02:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509980524; cv=none; d=google.com; s=arc-20160816; b=oCP9zFsm5dhKIegTl4NDjkQT8UXidJnKYmxQ7oK/K+5irKA9X1o8x+iBzKmc/KTh1D VSnFisiYiqJMMDjOlhJUuSzHaaMMNuJSiuS73DwZsv2kK2muNK/ReGFp6M1hwLknh+Fw tnv4+RbL2hGpUG7OQld9G5TlFF0lMB6Jms6Se8zN6RUYsLEahu8+FsSPsdcOpr88VEm4 ZvF2AZOLu1DtiCao27gk9WVb/ibgbMJ8HLYgOMLXxp4aWAvgEZyLxMHY8hODgA4Ic4MD PhuSGnVQnIfmQlUB6sGR382CVLZy/xgoD97xPNBEgrJt56DqQkG+qZp5SOn7jDi1r6WT uBhw== 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=jwmLeB+QXEavB4wffvUy4LiEMbjwn/vlPrwJAuK/Z5s=; b=S75Lk/yQPINg4l1W8+lwsYfiyT3I8WbCCZXKC6zrXBdt6IXYfHSm6BkN/F2VniGLc6 3AYYnNqubF0Ps2KgRGhtgo3zw1smDyvb8smu1CIcp/YeDoGD4TMnPI2dlh5n6mBON+gD iTMeuTtQtT5xvTct8dDHnQsOlB0ZPX3VPdiezkHNOnF/QvigUgd/lz5JAwD+xMlHjxP9 HFxzyjDQCWcpVEsnuYjBOd/mLmhTVJbNPExHOxy/eRpxJSh4LLVVv8J/XRetjN2WGPGg HW/Fa4mIBHNEUxntpNoEBenyU6c0tMC44OLGhOdAd90kDGC0eC77vGJx/czPWB480LGd +AqA== 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 r197si8059913ita.113.2017.11.06.07.02.00; Mon, 06 Nov 2017 07:02:04 -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 A9C7360C35; Mon, 6 Nov 2017 15: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,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 9DDFD60BFE; Mon, 6 Nov 2017 15:00:25 +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 D795560678; Mon, 6 Nov 2017 15:00:16 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 9C68F60999 for ; Mon, 6 Nov 2017 15:00:12 +0000 (UTC) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward102j.mail.yandex.net (Yandex) with ESMTP id DDF875607678 for ; Mon, 6 Nov 2017 18:00:10 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id qn61fWZl26-0ACSaCOe; Mon, 06 Nov 2017 18:00:10 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id T0MgOkT6Js-0ArOpnFd; Mon, 06 Nov 2017 18: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 18:00:06 +0300 Message-Id: <1509980407-6367-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> References: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 Subject: [lng-odp] [PATCH v1 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: c83975d85777ff167e18764bf9fd8f310a65e206 **/ 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 15: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: 118064 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2863032qgn; Mon, 6 Nov 2017 07:03:37 -0800 (PST) X-Google-Smtp-Source: ABhQp+T4zVHtCnofX69CblFuU6W1dZjeMGrXZrAMf5SQBDmfmvNhXPnhkhUZ0h6y444wkDDfkDep X-Received: by 10.36.105.65 with SMTP id e62mr9525801itc.16.1509980616976; Mon, 06 Nov 2017 07:03:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509980616; cv=none; d=google.com; s=arc-20160816; b=AZtbQNdyfmK2DlPc4qEg2Ft7oeKZFc/uywfWGv2VFHx0wB+2Aebfg2J5kR94bW8ec3 z4aOGYGdVlbkBX5fMXXLmSNn0llKweexJeXlee40yBOSi5oin2JPclZVqP+r0mqqB+zj f501t5p7sI6IBMjaAf5AkOosokjEcKBEEcSdXvLNvdRdqWF3/O0R/QzPOMT6B1bxFXqa wMxnVfkkK7zddNHRINmwCa+08Dq2stwpXgem4AoH1fLqiu0VdkGw6+LMbn/ouC4G56MU TNjhhOEXTs65s+FfLqOwr3tuDHrhJMKME/LE/++bB45YqGZguKi9ltNZsOafXoi+iVeS K6/A== 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=bTwTLP6gc7h89Ic8wstYnUNFDNntbfil+/m1L3S37oE=; b=DD4LtF3Oi4Gd4xd7wYFcVUeXokNSl2BwV25JTK55d6YJPKKluStmosZA6Vy+/gnSw5 n280TpXkRRRboe5C7q3jzh0MBtBX8MTp/XBcRKahXEh7HGtIQDpwfVoWratkXiagov/U eBcmtSjrgK4bTHGk3WVNNtJY6necdKRaBZbYqQUg0lbTq4XDyy0cISAG9+IGZSSyxfUs zj+RqrYqWk+wexz6mtcymgTOm7IyEnmsClYw1hWcG9I1Ny9Fqa6ui9zxEjIqF6V1xIer dopMdALjopJkMkDLDh+tAI1QwRU/GSHSfUUf9yprv6JrnPmmU1hEuHHCQdXmob9nwiD+ iTsA== 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 z195si8451145itz.87.2017.11.06.07.03.36; Mon, 06 Nov 2017 07:03:36 -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 6CE6360C0C; Mon, 6 Nov 2017 15:03:36 +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 53B2C60C18; Mon, 6 Nov 2017 15:01:13 +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 AEAA660C2F; Mon, 6 Nov 2017 15:01:00 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id 2967760BDC for ; Mon, 6 Nov 2017 15:00:19 +0000 (UTC) Received: from mxback7g.mail.yandex.net (mxback7g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:168]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 771225D87CAD for ; Mon, 6 Nov 2017 18:00:17 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback7g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id HFkaZZEjPW-0BLC0rh8; Mon, 06 Nov 2017 18:00:11 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id T0MgOkT6Js-0Arqe7pc; Mon, 06 Nov 2017 18: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 18:00:07 +0300 Message-Id: <1509980407-6367-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> References: <1509980407-6367-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 278 Subject: [lng-odp] [PATCH v1 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: c83975d85777ff167e18764bf9fd8f310a65e206 **/ 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;