From patchwork Mon Nov 6 11: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: 118014 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2628165qgn; Mon, 6 Nov 2017 03:00:35 -0800 (PST) X-Google-Smtp-Source: ABhQp+T9D7dx9w+9yfuPr3gkqVL55/1CpT/DUds70SzzPXO58XiBS7VM+BcAcy8W+NjFz1E34caE X-Received: by 10.200.41.164 with SMTP id 33mr22330621qts.318.1509966035869; Mon, 06 Nov 2017 03:00:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509966035; cv=none; d=google.com; s=arc-20160816; b=vMbtaZAx0QlVAhfM5+vLiuwuGsLafOVZft+zAkD7MNXFGuVOQ89G7x+zh9sEVRrjKM JdPGb5WYo+KvwTDCinE5DnZap3lxqDFT+PcVJAsdjU706u92hitoGspJqSAKirJsw88l PUOrnho/2R2+inyIVYrYZI4u4bg7TZGBjWwP5w6/1LykCVhbYlAW0dunnaglv7UdTUym YE9a84bEHuU9enjsF5D3L6wEeXV0Y+tOANoAk/bSl2kVXBlJO7P+KELDhKg2XsAKK0x7 Esbszef6rN5ddDTXKht+DXz6FRB+4wH4GaLmMlkAvhQusfUslt0hgmk6zSdc0/HwMWxU Angw== 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=SJsb6o4cF4cP166eLluQIDD6Sb4LVyVwVMi0uu+D9eA=; b=RWa1JREKDSDs4Ke+2jXZWkj56XhRwYKB1Twj2FpTkdQQsoz+iHwR5M763XT6pcpDHK +04ks4AeshrTqnBSMHzbETdVYGtQb59alZCFVlQvUHT3iWJ1zjXRjZktbBdG1jWWxpDS 7D+fPEpm3z3FNrfbUFgE5KeRFuxzuZUCVcUNd8CIVIqJUxDcxBOjaJrKMeNww4S9+IGw Di77rPczHo5J7nOBHecvtKRaFM9gz31+Sm3k3/LLxQnb7IpsGOtOr831O2rleE09oqf+ M4M8bTV1LiQJkYET2JPVTGIS0bWyVogPMO5LiM04OsgwecZIpkK1L16ggKgbpaDvs+eN DAug== 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 c84si1084665qkg.379.2017.11.06.03.00.34; Mon, 06 Nov 2017 03:00:35 -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 8E38D60B69; Mon, 6 Nov 2017 11:00:34 +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 D1CBB60455; Mon, 6 Nov 2017 11: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 6B05360641; Mon, 6 Nov 2017 11:00:13 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id C951360455 for ; Mon, 6 Nov 2017 11:00:11 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 2D8C5124177B for ; Mon, 6 Nov 2017 14:00:10 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id NXIcCqPkgy-0Aq4xkwP; Mon, 06 Nov 2017 14:00:10 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iHi0qYvJl4-080ejkIN; Mon, 06 Nov 2017 14: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 14:00:03 +0300 Message-Id: <1509966006-16692-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> References: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v2 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: 40eee55053ce892b452dc5e7033bbbdb030792f4 **/ 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 ++++++++++++ 4 files changed, 105 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/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 11: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: 118016 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2629747qgn; Mon, 6 Nov 2017 03:01:58 -0800 (PST) X-Google-Smtp-Source: ABhQp+RAubNg2aRjAdolFJ4U2//FLtM7h76mi//88Tu+RUsQbKhNagAtqWwLsO9g27C7nT9khm+R X-Received: by 10.237.59.249 with SMTP id s54mr21936195qte.34.1509966118306; Mon, 06 Nov 2017 03:01:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509966118; cv=none; d=google.com; s=arc-20160816; b=fi79v1Rcih5FU+LhRsZagt7FXn8yIuIThCEVV/T0qQ7Og0ZF/uALqC+eddFMkFjARi ky5UQGhIkWqRisVQB8L3ck8TmiMHzRM14ONn1Ls+ahstHWXqfnmd6e3jWCNz7ciwfH2G cb+sa/KR6R+H5we2ntk7aSjJ7CKghoB/EodD+TlRRyY9dEZTtVsVnML/dxcn2p2X67mm bQXXnP5u+2PwX0Rdbe70WCPJSe/eqWINXmMIl5j3iHbFrH0HToqehnYogGk9F/3d8fSo wW9djTjB0vB6eQkykilFWsPP7M2q2Bsb5p9SFIgviwxS2UDWGZDo0yXYKYj1ENeklgvq zhxQ== 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=6/iDLJAeGNYNwsLI1oyyAHWHvOYhbarNGYmChCabQmI=; b=LfkC6qio9JpFMLCQt+LMoDIkASZkvEMoC1KVtnrSsfAnLnsc1r0fD+aBIFEfjgs/Yu 7HaxNoGEuIHVH6RmjlUxHpHZKMmfKIqK6l/H+2BHSjSbbyPc2jZJj+evG6i2H8z+rwx9 6YPDY5ur0s3NRRlvcrhkP5whneYpTpMBvlkGoMIF2fjJqsTv4JX0p1mXbtUyaqryZoxf wW8XvTOrHpY6Lu+ZZmHtYEIMPHsgo69BGbRY4PulOcpOk81GquCeMnB3RhxQZ2JbXOhO P8VeuK9lP8ac0KAIvXsLxcx1edN8tp1n9ApdsbHxPrpIBG63YoLDy+YAc2C7TnbJnoVV 1JAw== 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 d29si3884537qtc.94.2017.11.06.03.01.57; Mon, 06 Nov 2017 03:01:58 -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 D4D7F60C12; Mon, 6 Nov 2017 11:01:57 +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, 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 A9A85609EA; Mon, 6 Nov 2017 11:00:27 +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 1763760609; Mon, 6 Nov 2017 11:00:18 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 4780D6050D for ; Mon, 6 Nov 2017 11:00:12 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward106j.mail.yandex.net (Yandex) with ESMTP id E5CCE1801BCF for ; Mon, 6 Nov 2017 14:00:10 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IYgXaau6ta-0AIi4V8v; Mon, 06 Nov 2017 14:00:10 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iHi0qYvJl4-0A0ebqHH; Mon, 06 Nov 2017 14: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 14:00:04 +0300 Message-Id: <1509966006-16692-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> References: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v2 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: 40eee55053ce892b452dc5e7033bbbdb030792f4 **/ 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 11: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: 118015 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2628986qgn; Mon, 6 Nov 2017 03:01:20 -0800 (PST) X-Google-Smtp-Source: ABhQp+QnpgvPB744MmjQX/qDrU2ruaeJdT04oKv6sry1aoiPs5x6eBK9p5b3ZXGlxvbJSwvoBC0Y X-Received: by 10.55.27.88 with SMTP id b85mr4521531qkb.144.1509966080848; Mon, 06 Nov 2017 03:01:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509966080; cv=none; d=google.com; s=arc-20160816; b=t+IfScrpmvs7dRkt5OkuonroquLBlAOpyLgVotk55PzMJhWEcOGspW5mz5+6idl+lJ QYQEGWXjYUnxRmuNlQQWLiPutZLInziaRhqVt1mL9I8tLPy6E9XQhkSK43Bzk58lbNN6 QvitKEIZMxtzgZxQd1JOl/wX1JchAtBvyWZdEk1O8BtdD/pIthYfrCgjGk7gN5nVEhhS 2Fw9rCJ8IKEnAwqL85V4OLerQZX8oPeFwn33OgQR0DfLHxpHQ1enxgdstBWxiFJykRt2 RnllW1AAYe14OlW/19UDRK7HuN9j/ZVe0vdcyzyAxJiTh3TlsWp3XL1eCCzy3iU/NIrO Op2Q== 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=ZPSB3UH50uR1MfsEjtR6NnoObH45SOZYK3wwFk8I3os=; b=z19sTpeZk/UvCsqpf1DGk6iX5VUJkl4PSNrx7+irPPvaDqyj9UpyIKR+K+RYmATIMO 4Fhri4jOGCBqSIf6KKHL+TB6eoiIwWrXimbiKIZAG9uKe+SN/wQOpEf2HBhwzgKCBmfE WH03sI5ncnPNGiec4LSFp36Cdg/21Z3U/xCO7yVfGUC+QeP5c+LJ64YIkzX2JMUeHe0s M6EfpIkIEmUZDSDgs79te6EMh6ZnIerJ037OCS6g8WjsfWdZuId10O0mFLrlDchC3YZI AsRDBxJDVIuocKzaXv93GCNxYkrR82oAavtMgcfg1b9XJYRNKpZ5hqy7wzDXvymPMYFo Pwjg== 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 v135si1929802qkb.14.2017.11.06.03.01.20; Mon, 06 Nov 2017 03:01:20 -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 8ECBA6072E; Mon, 6 Nov 2017 11:01:20 +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 468EB6072E; Mon, 6 Nov 2017 11: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 6A5816072E; Mon, 6 Nov 2017 11:00:15 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 171A860593 for ; Mon, 6 Nov 2017 11:00:13 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 67D76781F19 for ; Mon, 6 Nov 2017 14:00:11 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id srOxtBG9xd-0BqGn5uI; Mon, 06 Nov 2017 14:00:11 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iHi0qYvJl4-0A0eitlU; Mon, 06 Nov 2017 14:00:11 +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 14:00:05 +0300 Message-Id: <1509966006-16692-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> References: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v2 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: 40eee55053ce892b452dc5e7033bbbdb030792f4 **/ 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 11: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: 118017 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2630670qgn; Mon, 6 Nov 2017 03:02:44 -0800 (PST) X-Google-Smtp-Source: ABhQp+SCPzI6OIEHFOdu3+ira6X8o1isSyt0nEB9x8vbz51Sys373r8XLruBfGVmMbRZQkGo4M6s X-Received: by 10.55.204.77 with SMTP id r74mr22125142qki.25.1509966164287; Mon, 06 Nov 2017 03:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509966164; cv=none; d=google.com; s=arc-20160816; b=mi5wnDqGRv398yftxdfySwjbaxs1l9ZliXLWjqixP22YegEAjr7VqjaMPsGik3IiMo G5AdvbWPq/FnT05wEJJmsz5hQsVZzx8IZNVVzwiox+rVWFSEjueLIyuPKMKnf0HdLJqb oOfJrkqjbiosAbfeJLEGhthTar9UmO0x62R6EGpvK2JexSP5xuSDqp9vQu9dXQrBvfa+ U0j+dhlPK6yzDpYrIeIw7cN3ozPwL6S/bO/OhgBBhXu7jnA/0bSUWi8JUcFQ7yeuhG3T T2NST0r+LgLD/J5WVFijtai2SrmXivGOPBDCuZzfJNl5IUXe+WDNkMofiZF3l+UzMdnD SuZg== 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=Y6Q2JkyK0qvY7rGCE8Z6vcn/MlYJt8f1Fu9PEV8EjQI=; b=wnJoTQiWB0mhIbZ3PoBEzdQ0ut2ArEq44knzbCLpBoikWcSqMzY8j/zPo6VpmIwF63 PFOIqV8S4uzpYL0XZmhMvjwBaH+aPv/myCxQd6KIChbhMWemhY3nVU2BtITuerluifGN 77NgQ/TfS4lh0r5FwKDu558uLZDAdUOdfFxtT6yDl744sOvQLWQvXP+lAgSw41BvpNI9 6gP+2Zs4AtGmu9NiRpGzPwh1C6jB1iOtZ1V6kIGqqYky4umD6ncWBrTE4QGY25jNH+LD ZXepJnKg+FqZOEVadVmpSPrYi2SX1n3Q8UKhULaZIl3zejsyYy+JiA/ml2WtdPNR7dJU Iyew== 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 z132si5495900qka.0.2017.11.06.03.02.43; Mon, 06 Nov 2017 03:02:44 -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 B64D760C0F; Mon, 6 Nov 2017 11:02: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 EDF7060B65; Mon, 6 Nov 2017 11:00:34 +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 2933660609; Mon, 6 Nov 2017 11:00:20 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id 9592660455 for ; Mon, 6 Nov 2017 11:00:13 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward100j.mail.yandex.net (Yandex) with ESMTP id CD1935D81F61 for ; Mon, 6 Nov 2017 14:00:11 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id WmLKQx9teZ-0BTSnBwJ; Mon, 06 Nov 2017 14:00:11 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iHi0qYvJl4-0B0euJ65; Mon, 06 Nov 2017 14:00:11 +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 14:00:06 +0300 Message-Id: <1509966006-16692-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> References: <1509966006-16692-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v2 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: 40eee55053ce892b452dc5e7033bbbdb030792f4 **/ 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;