From patchwork Sun Nov 5 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: 117993 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2040122qgn; Sun, 5 Nov 2017 12:01:53 -0800 (PST) X-Google-Smtp-Source: ABhQp+QS7UDJjRlecRvYfPPYZ8mxRwRqE/Nj5l6FbDySuriPlO+vIPixJUcBMaBodLXLmLGjOr89 X-Received: by 10.237.61.49 with SMTP id g46mr19992225qtf.233.1509912113329; Sun, 05 Nov 2017 12:01:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509912113; cv=none; d=google.com; s=arc-20160816; b=T+z4ZfedN0aibBljshYwLjnp5/QnXDtksgiT9iJL4lWaoM+jJaslbUGg4gymr/0QRu 2s0UrCsfk+MbS6FF1pMJNJC8FplwATPoL1bouf2lvsu1Tvod7aenap1GWNXZjfZlByOz aU6pZd5Wq7MujdJppilvltaZ1JMvkcNX/3JO0QCTu2LN9gbEJUdubhGvqme9XaRir3eA FFK5cdQBvYkzoebT0EvUVyAOZz+aJRaC4jjmT0D9jTs2ZRlrcsfbrmOXP9t/ouQ7zTKQ ROkZTOXpZe2kQex6/hGCFaCr+BEfIh8+N5PFeJY+5RVxTGqL0IyVgLHBwLjNWgRIyuZD Exyw== 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=75bo1OBvLgoZhA9s6SJn1B8Owr+FPbrPnpWEaHwa9Tw=; b=Q0zhLCNnnXGoYuxM0nFhK9Sp+GYP56i8QgDSc22Ak5Fng9eE7KJZQXT3BKo/NzkiEQ SGydaJoSmL7aYbEEx5XjfSTkY+qz69tdgksfRM60PAeBbeIHIzOcOFLKNupurd3djsuH i/egMmxrN3Sn5VOshBwRyUUXJtuvEZ3JX0xnXqmZS/ssn15K55UynrN0+uOZce1ZUAUT Cs7MWNjBrODGISULBmaJBk8U2ROSnCEgLysJGVRURhI1C61yUJkTPRNKCqnFaaO62xWT irmVi6vSuTX0AamErUhAH2wBBPIGC9HwmPFp+MUDzgChEfTvMN2UmIdV6uKTvHkPoOCP omkQ== 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 21si2061545qki.156.2017.11.05.12.01.53; Sun, 05 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 D217760809; Sun, 5 Nov 2017 20:01:52 +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 65E3560B65; Sun, 5 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 E75436074A; Sun, 5 Nov 2017 20:00:13 +0000 (UTC) Received: from forward105j.mail.yandex.net (forward105j.mail.yandex.net [5.45.198.248]) by lists.linaro.org (Postfix) with ESMTPS id 1FAA960654 for ; Sun, 5 Nov 2017 20:00:10 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward105j.mail.yandex.net (Yandex) with ESMTP id 0A9A1182395 for ; Sun, 5 Nov 2017 23:00:08 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id GlasHIC1dn-07EOpmWh; Sun, 05 Nov 2017 23:00:07 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AsckRko5Lx-07F4k4UT; Sun, 05 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: Sun, 5 Nov 2017 23:00:03 +0300 Message-Id: <1509912006-21983-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> References: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v1 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: a1aa17bb2964bcc180fc9b3b1568b36f8c235049 **/ include/odp/api/spec/feature.h | 69 ++++++++++++++++++++++++ include/odp_api.h | 1 + platform/linux-generic/Makefile.am | 2 + platform/linux-generic/include/odp/api/feature.h | 34 ++++++++++++ 4 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/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..a885ef618 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 \ @@ -54,6 +55,7 @@ odpapiinclude_HEADERS = \ include/odp/api/spinlock_recursive.h \ include/odp/api/std_clib.h \ include/odp/api/std_types.h \ + include/odp/api/support.h \ include/odp/api/sync.h \ include/odp/api/system_info.h \ include/odp/api/thread.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 Sun Nov 5 20:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 117991 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2039099qgn; Sun, 5 Nov 2017 12:00:48 -0800 (PST) X-Google-Smtp-Source: ABhQp+Sw5hJRVBWJh1aqUsmcZeYqp0bOgUfsyNO9+1FBxW5Lj7pLUJB/1j5AXOXdFqC2UdQ4CNs5 X-Received: by 10.200.37.61 with SMTP id 58mr20189772qtm.187.1509912048423; Sun, 05 Nov 2017 12:00:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509912048; cv=none; d=google.com; s=arc-20160816; b=kgIakPVLwqZlZgndFB9zsui/3N6TUfM+xx3ts5XlC3pRmPtBjCeh/igMQXNlgp+WWh WXBjyba6O2AuxI6wVC3IC8M6gKqxIQyVaRPQnNiKT31J98t+Ei4kkgeNFnlXBe1Q1yOv KbPz3Zppmmj7cIgeIqCmkJ7qV5kRfGKgpYEmzXhRPkPzw70Gv47UbrThm5KD6ZpacJKs mZ4rgfu1QwEtVP6AjisSev+ZFd5QxfRkrjtDvtSB++GUvm9sohJwkxMIAFx2Fzv/W6eT 3c32eghWhR7G77U4ff05C7jPW46+h8TKftBALVlnnhDITpSIdz+ksxFXv0WqropiDaXA /MnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=GL7cRGmgbhibk0E87oo4ZIUpnELXJLuIF6F7ug0FZkY=; b=OP194Kxn4+H4dcIGtkrpiDss01vZo/oIJm0lU4tLvr0uVgGZL+VkLXORW+yoVmnc+o pZYQFy03HwjOOzv8lJg/ebdyEQVKLgruv8CWoE/I4UOuxw0S8EC2HLL69aDio/scvX+E VJ31JV/yUdHASGdDnQLknBxxGy9v7v3DSNLvCPeP3Ybrdpt0JuD251fR4PZC9uUAUO4M cHqLd0rbb+31jHnF+KSo0jE6SDECc6ilLkoEqRC5Y1ijOEy/YDxRYJ273uacHtTejIvg Tc8f1Zj4x6Q0/zIE3OgUL35uW01aQkvHWsaNFA1Kij0Z372KC6tCZfiIaMxmW7htoybQ ktdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id r27si9900501qtj.352.2017.11.05.12.00.48; Sun, 05 Nov 2017 12:00:48 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 214A960B4C; Sun, 5 Nov 2017 20:00:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B697F6074A; Sun, 5 Nov 2017 20:00:17 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1DF256074A; Sun, 5 Nov 2017 20:00:13 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id A83D36074A for ; Sun, 5 Nov 2017 20:00:10 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward100o.mail.yandex.net (Yandex) with ESMTP id CDB102A21131 for ; Sun, 5 Nov 2017 23:00:08 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Un9RXBP5ZH-08b8i91d; Sun, 05 Nov 2017 23:00:08 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AsckRko5Lx-08F4JJt0; Sun, 05 Nov 2017 23:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 5 Nov 2017 23:00:04 +0300 Message-Id: <1509912006-21983-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> References: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v1 2/4] api: init: add support for unused features X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bill Fischofer Add the not_used field to odp_init_t to permit applications to specify that they will not use various ODP features. This may allow implementations to provide optimized behavior. Also add the odp_init_param_init() API to initialize odp_init_t to default values. Signed-off-by: Bill Fischofer Reviewed-by: Petri Savolainen Signed-off-by: Maxim Uvarov --- /** Email created from pull request 276 (muvarov:next) ** https://github.com/Linaro/odp/pull/276 ** Patch: https://github.com/Linaro/odp/pull/276.patch ** Base sha: f318c88f26b15140dda243e6a1d27e3c8f9d275b ** Merge commit sha: a1aa17bb2964bcc180fc9b3b1568b36f8c235049 **/ include/odp/api/spec/init.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h index 154cdf8f3..e8ec41136 100644 --- a/include/odp/api/spec/init.h +++ b/include/odp/api/spec/init.h @@ -29,6 +29,7 @@ extern "C" { #include #include +#include #include #include @@ -153,9 +154,23 @@ typedef struct odp_init_t { odp_log_func_t log_fn; /** Replacement for the default abort fn */ odp_abort_func_t abort_fn; + /** Unused features. These are hints to the ODP implementation that + * the application will not use any APIs associated with these + * features. Implementations may use this information to provide + * optimized behavior. Results are undefined if applications assert + * that a feature will not be used and it is used anyway. + */ + odp_feature_t not_used; } odp_init_t; /** + * Initialize the odp_init_t to default values for all fields + * + * @param[out] param Address of the odp_init_t to be initialized + */ +void odp_init_param_init(odp_init_t *param); + +/** * @typedef odp_platform_init_t * ODP platform initialization data * From patchwork Sun Nov 5 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: 117992 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2039529qgn; Sun, 5 Nov 2017 12:01:16 -0800 (PST) X-Google-Smtp-Source: ABhQp+TqUOzD1JRpmcZj2Hiu+S9rdUaRrkhFkomO5iDQ+UjhQNypao6+tDgvpbR+uNLP0r/JTFoM X-Received: by 10.55.1.8 with SMTP id 8mr19520569qkb.80.1509912076335; Sun, 05 Nov 2017 12:01:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509912076; cv=none; d=google.com; s=arc-20160816; b=KxM8zbcjHdje9H9Wxf9R5g3Db1fmsiS22Tcj1UvZumsi5v+3JltwbzMmN8Ng24FwEt 91z8nQPLEH2tghtYcFCRMIHMuBop6rIzKNqZ9z3I7/lcsF3ls3LDBV42HVb0yl+h6NSx Q+U7ahPoQJiRoF5I6PRkd8wFKX8VioLZP1gKhElukdNb9UCP/2Pe3wTyRAMDUNCIYZQj tILGQuHX5e0CZ6TBTliYT4DG19jmMliMUXHPviCH4AWN5cP2xkUGZaX9F622UKoVUmeO 2WHdFHjSZjwR4VwZ1o86lH+3XGTGP63JDhQMnBS2xff3hcPXxPqRmqUImbfcpH5MM4St CiHQ== 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=JHpuEMm0y4muyk8YLXdTjIqrUFtRWN5zEgtOFjvgnCQ=; b=fIdrOolsFvbFyNa3LZQT8qP6qSz4Wmgl8fZ5+OPkqDlrWuN+yDEcxBFnvD7bBmdDmB J0M31IbqD+eU3xQgLFU2i3Nfiyiug1T7Jl46m5S4HNmxAbswkKnwqQw7c9gAkhhEiv8c YyzFzfdOJ/Iy4QTxnHBOyvLX9cizkhHuRvnJ4pkp6170XVt8qLz/YCPSZescvh3F8dxQ vPIpHxtgZkBwVNNnhEPJf3cPXIQFYGqajiHptX0nOdfoX9VyYvoblP0zv9hEkqBewS1K R62/LlcIdQ3J1wA7iIdt2aMw+n8j9vDyzDoIZ42BBslPILqGnVsYLS9quMZ4aPztIxRe 5+7g== 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 p29si3249546qkp.219.2017.11.05.12.01.16; Sun, 05 Nov 2017 12:01:16 -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 0D00260B4D; Sun, 5 Nov 2017 20:01:16 +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 260DE60AD0; Sun, 5 Nov 2017 20:00:20 +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 5B4DF6018A; Sun, 5 Nov 2017 20:00:13 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 3D9646018A for ; Sun, 5 Nov 2017 20:00:11 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 9238321814D1 for ; Sun, 5 Nov 2017 23:00:09 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id HcYVovXvxq-09GeNXdk; Sun, 05 Nov 2017 23:00:09 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AsckRko5Lx-08FGf4QW; Sun, 05 Nov 2017 23:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 5 Nov 2017 23:00:05 +0300 Message-Id: <1509912006-21983-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> References: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v1 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: a1aa17bb2964bcc180fc9b3b1568b36f8c235049 **/ 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 Sun Nov 5 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: 117994 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2040271qgn; Sun, 5 Nov 2017 12:02:01 -0800 (PST) X-Google-Smtp-Source: ABhQp+R4uNTCXFqcV1HWzrJ10kiEDWC3P203llihrM4Sek8SUYSJHTSnLpCUUy2CfiHUtsSjtvQz X-Received: by 10.200.23.36 with SMTP id w33mr20181003qtj.50.1509912121741; Sun, 05 Nov 2017 12:02:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509912121; cv=none; d=google.com; s=arc-20160816; b=J2ZZNw2G6WZmIi15O8bFnZJ6eumj6UzGJSLMbKCvW5tZqddwCW22b1fh6FLDXxK4RM G9+OF3jDaX1wzeyxOjXYsaxC1K7lAZqjq/OrtuEsgr7wfCIYBYCwumhk/z/bpyo9mrhd O0NaF3eJWbB0qEj/79Tbpd83b3d/BdJu7IlrPjL6sQ+4BosAuvs7203xQ6gItnPkgDuF IuZMFQYm5dgcweRCDb2+0EBzz5KgRq+0/8MdjsRMwik4Zh+/IGPyljjM7kX/frwtHVLe Ki1EC+AYso7oR/PXi4dW1qL4g+9oilNNXVsD6y++NQiBerQ2RK+dxA1Mt8vSQZvwaQkd mFrQ== 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=tfSG4iN390GZKRhTv3kzN5+AaTsMBfv/K3R/rMGZ0Ls=; b=bRhxqbYMkaoiXg9bbO8Dyasua0knUBX5j+Gyolbv46XFFGVnUZ+HmIJdcPrwRMMFj+ zibtIOkb3wZSgbOz9d3Xop0DK+dpNbqwYyvb+MmrUrahhkpdJJADypAEKwpys6K5Bz74 TajYf+Vp0H0F+YrDGoBXe95fWwEFOD+NXG3dkZITDw6uolLOd/CS8YQW1SzgtKZNSHj/ wN+XEXSwdaX/NB+1u+zr3kTv6WEZmasAGNC0hx1yxk1tDRAOrAoKiQppXAAWBy9Z5+/5 9a02q6S5EkKDnEJpnP8rJYP/fEX3x+c95cVAtcgM8q501A/2CacuuztRGkm8qaFiiLGx v+2A== 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 k123si3766459qkc.302.2017.11.05.12.02.01; Sun, 05 Nov 2017 12:02:01 -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 6D28B607FE; Sun, 5 Nov 2017 20:02:01 +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 B67B460B59; Sun, 5 Nov 2017 20: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 F139C6038D; Sun, 5 Nov 2017 20:00:14 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 56C0A604C8 for ; Sun, 5 Nov 2017 20:00:12 +0000 (UTC) Received: from mxback6j.mail.yandex.net (mxback6j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10f]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 71809182712 for ; Sun, 5 Nov 2017 23:00:10 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback6j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id SuLOzMFS8g-0AMKUcTG; Sun, 05 Nov 2017 23:00:10 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id AsckRko5Lx-09Fe44Dv; Sun, 05 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: Sun, 5 Nov 2017 23:00:06 +0300 Message-Id: <1509912006-21983-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> References: <1509912006-21983-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v1 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: a1aa17bb2964bcc180fc9b3b1568b36f8c235049 **/ 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;