From patchwork Sun Jun 11 23:59:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103570 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp710761qgd; Sun, 11 Jun 2017 16:59:34 -0700 (PDT) X-Received: by 10.237.55.106 with SMTP id i97mr66414227qtb.68.1497225574043; Sun, 11 Jun 2017 16:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497225574; cv=none; d=google.com; s=arc-20160816; b=ZRqWla+D3M7xRKtVYX6zYncl4Xj1a/IUNiGzJxngRXdVoIVPdRH8OFnRnZdysif3tm jK8AGKr5OqDWE4nMNNiNzi+V+X9tL6Biovy3hb/wJr6eTk1cZb2cxwQA/ryoPgP42HMs XscabU4EmlDznwbzENrN1U26oXQAD2CLl5VkJF9WrPjH4UlqeOqGNnBWe2bAbTnLB9nq 7VQxxeStVH8iBRAEsSWKpb/MITLjBghnnLdfr510gtUVIZVvYVk5OyJvzeU5DxiqlJpO oFizSf7pOCRNrOygcIv9tvVxNVkJMmkEayymK9F0u+perVCoOgRvfosoWmWOgu9n0ETW Rzcw== 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:message-id:date:to:from :delivered-to:arc-authentication-results; bh=CIFTbtC3l7hEuWKnJQ+/+ff90B2Avq8StNiz8WdZqRY=; b=zFF21YRSxpHRFWqPDcU2eI7Y2XHyCOVZgzVxkboBB7lhAeJEwRxM6sGjyfewqWfBvG w0mzjiXBxVpdCQLU9KsbCojNdxQUOYjt5Fdq03xPGO2RjubYUXRyaNST46BXYTKs6NRs bJJghqmidkUi1hTxaQKuCop1bsFEiccnJF9KIaIukkMbKZqWJQ9dXHQkSaJS7Ir6qR2r Yc8JysWtKTtqeRCWYsRos6OxFTpg80d6XBPe/pb9O0XUhUcIlz1nZ9STWyQUvz7Hu19M exyp5MhxShuXiyf5YZZzWhvCkZSeNRqpAM5viHqvBJef4cAr5y6QMpj+eSJxiSL48otZ FOSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c20si4264682qkh.38.2017.06.11.16.59.33; Sun, 11 Jun 2017 16:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 70AD260B49; Sun, 11 Jun 2017 23:59:33 +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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 CC24C60B22; Sun, 11 Jun 2017 23:59: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 0881460B25; Sun, 11 Jun 2017 23:59:26 +0000 (UTC) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) by lists.linaro.org (Postfix) with ESMTPS id E0E1360ACD for ; Sun, 11 Jun 2017 23:59:24 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id s64so4403997oif.1 for ; Sun, 11 Jun 2017 16:59:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CIFTbtC3l7hEuWKnJQ+/+ff90B2Avq8StNiz8WdZqRY=; b=PXZl+b5AA51FTCivs+i6fem4OIl1z1+dgxlwUEpKa+Nq/Eswn83jHJ47RHAmyP7Gwl Y2IwTHrJ3nVF6FZa59RkHfUUx8efhJHgkYEcyQfm0vHgc+2YOFHHAkJOXXXqbGkN1u7E 74xBDM/j8AbaPTPHW+EU8tsrWs0cVkvIVjMKSIJHueTkI/1iMlrea01MYgLcJE3BB5y8 7prFrm0FWfrcduWixUX4z6DnArqDEzqNI3yyvJ8nYAzeQlAnpve6ffDPKwhI6qmbfGQi +jwTqGSNejMJTkM3v8xC7s5zIQ2ktSUpHTj7yncx5OvJ4KCEVqGxnkvaTxaR63X73+mk qpDQ== X-Gm-Message-State: AODbwcA7zW3NjGQqYFiXo0WOc4nyh83jXMSGrln44K068nXJsHvZ0/FK eOand6lLB/JEdvvoZJK45291 X-Received: by 10.202.72.212 with SMTP id v203mr12279387oia.118.1497225563863; Sun, 11 Jun 2017 16:59:23 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id o70sm4128058oik.30.2017.06.11.16.59.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 16:59:22 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 11 Jun 2017 18:59:16 -0500 Message-Id: <20170611235919.10052-1-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [lng-odp] [API-NEXT PATCHv3 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" Add new odp_feature_t bits that permit other APIs/components to refer to various ODP features. Signed-off-by: Bill Fischofer --- include/odp/api/spec/feature.h | 60 ++++++++++++++++++++++++ include/odp_api.h | 1 + platform/Makefile.inc | 1 + platform/linux-generic/Makefile.am | 3 +- platform/linux-generic/include/odp/api/feature.h | 34 ++++++++++++++ 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 include/odp/api/spec/feature.h create mode 100644 platform/linux-generic/include/odp/api/feature.h -- 2.11.0 diff --git a/include/odp/api/spec/feature.h b/include/odp/api/spec/feature.h new file mode 100644 index 00000000..a1cf4505 --- /dev/null +++ b/include/odp/api/spec/feature.h @@ -0,0 +1,60 @@ +/* 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 +#include +#include +#include + +/** @defgroup odp_features ODP_FEATURES + * ODP feature definitions + * @{ + */ + +/** Definition of ODP features */ +typedef union odp_feature_t { + /** All features */ + uint32_t all_feat; + + /** Individual feature bits */ + struct { + uint32_t classification:1; + uint32_t crypto:1; + uint32_t ipsec:1; + uint32_t schedule:1; + uint32_t time:1; + uint32_t timer:1; + uint32_t traffic_mngr:1; + } feat; +} odp_feature_t; + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#include +#endif diff --git a/include/odp_api.h b/include/odp_api.h index 8146e024..86232ee1 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/Makefile.inc b/platform/Makefile.inc index 3d609aa7..9f856a15 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -32,6 +32,7 @@ odpapispecinclude_HEADERS = \ $(top_srcdir)/include/odp/api/spec/deprecated.h \ $(top_srcdir)/include/odp/api/spec/errno.h \ $(top_srcdir)/include/odp/api/spec/event.h \ + $(top_srcdir)/include/odp/api/spec/feature.h \ $(top_srcdir)/include/odp/api/spec/support.h \ $(top_srcdir)/include/odp/api/spec/hash.h \ $(top_srcdir)/include/odp/api/spec/hints.h \ diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 58c73767..b4bbd07e 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -38,7 +38,7 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/deprecated.h \ $(srcdir)/include/odp/api/errno.h \ $(srcdir)/include/odp/api/event.h \ - $(srcdir)/include/odp/api/support.h \ + $(srcdir)/include/odp/api/feature.h \ $(srcdir)/include/odp/api/hash.h \ $(srcdir)/include/odp/api/hints.h \ $(srcdir)/include/odp/api/init.h \ @@ -59,6 +59,7 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/spinlock_recursive.h \ $(srcdir)/include/odp/api/std_clib.h \ $(srcdir)/include/odp/api/std_types.h \ + $(srcdir)/include/odp/api/support.h \ $(srcdir)/include/odp/api/sync.h \ $(srcdir)/include/odp/api/system_info.h \ $(srcdir)/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 00000000..55a86a83 --- /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 Jun 11 23:59:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103571 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp710883qgd; Sun, 11 Jun 2017 17:00:08 -0700 (PDT) X-Received: by 10.55.48.76 with SMTP id w73mr10193039qkw.103.1497225608103; Sun, 11 Jun 2017 17:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497225608; cv=none; d=google.com; s=arc-20160816; b=SaNo+lkLHynKMBrCHYEvmCOd68b7ACmAWnCFn9pqq4JTlxW+5YNBU3k2sd6CSTTd6F dzwdXeEAzliMRyhTCM2IMeiE6UHdeWvstTRV9FjEkyqO7RIhAB7cbYuW9yxC2VDbzXIJ A2PpNXLOMKXrm4pLUB5nKeIJBaCtqp9oHxNoMhcCr7//Z1V/l+bNj+q9ZvSnBXwANRyB xEzjoUzqR3kxbUTiXNn9Ieu7H3Rbr0/S34TJcsFdOkF5zJ9KJm2/X1bwLpHh1Nh0YAvv z/eQ43PfbXCENYh/9fh0TQHp445z/Vof5+hiWbZKB7g1zn4JInK/ixhEyzR0Bog0TsVg IZmw== 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:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=lLVmjZKwMRjg60y5kCuHz9jPqw/+PsXr6rEBSu8fsMc=; b=zwpK1+hPutVQgqBqEIUXVc+stnOISCqsXtlgI2T7TZuO24q9kWR2tbeQf2P/mGPTa1 pJRD28i4qS8CBWct7y697fqSUzMdUAh7v8FkjNw2fxfOOk/ENrz2zPlMB9PAbuE43QJI XK0w0lNI8YgZoGzG5OWx6C3w5yseue+2E39d7fcNEGmNiW5GDY4hBt7MaxL/Sj1DIl5L SEQd1LQYhUovkgsClbsNWPZWOemqTmvAkI2+jdavafOxqZyQNdRVApb4KVNlYkAet6yx 4w1PjjAJVNNPP6F9YGybXffdTG0MLbA5V4XL77CQzFy4i+TTUVqArRL/zS2fT7ndB0DT We4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n34si7213746qtb.25.2017.06.11.17.00.07; Sun, 11 Jun 2017 17:00:08 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B32F460BDF; Mon, 12 Jun 2017 00:00:07 +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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 41F6760B11; Sun, 11 Jun 2017 23:59: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 4469F60B11; Sun, 11 Jun 2017 23:59:26 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by lists.linaro.org (Postfix) with ESMTPS id 5193B60B11 for ; Sun, 11 Jun 2017 23:59:25 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id s64so4404027oif.1 for ; Sun, 11 Jun 2017 16:59:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lLVmjZKwMRjg60y5kCuHz9jPqw/+PsXr6rEBSu8fsMc=; b=joZZbs3P6GLPUk67Zq964iUFJk5J4leHJxHZYhs+ceW4MKQQ7L0U4oN/3AT/GhUJt8 q7Qlh7ozyhShnk7vwo7MlRRDEKWLFBD3vhoeX5kkLo0W4sKbnrZJ94qL+l7NZTNv/J0V 8xavnv4hKnOQkvh4yy2D8SJ/TFyAXsNXCwLn8KJe6HFQZUxNHUjPngT9l/UQz+5XX0aC awi0ZSo2mPoE32gyjNrj6Tpz5Xa8eLyB6EvChLHfsvtwnrdnjytmvpYU3bFJg/1pjIrE zj9Yws09K3tC4FMPy3lZo0jWzSzmn+KGTW2gPli57YwR8e8RQHn0IGD8MrBjMAqxPjNU V+SA== X-Gm-Message-State: AODbwcDq1VxPS91HLF3rUveo3JjCq69MDku2ilPcLftvOZLLt1sswmjW mXMzWMIq3wI2X0fh5ljG+Kub X-Received: by 10.202.7.129 with SMTP id 123mr30169885oih.178.1497225564613; Sun, 11 Jun 2017 16:59:24 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id o70sm4128058oik.30.2017.06.11.16.59.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 16:59:24 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 11 Jun 2017 18:59:17 -0500 Message-Id: <20170611235919.10052-2-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170611235919.10052-1-bill.fischofer@linaro.org> References: <20170611235919.10052-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv3 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" 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 --- include/odp/api/spec/init.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.11.0 diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h index 154cdf8f..e8ec4113 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 Jun 11 23:59:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103572 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp711048qgd; Sun, 11 Jun 2017 17:00:30 -0700 (PDT) X-Received: by 10.237.53.102 with SMTP id b35mr58154704qte.83.1497225630867; Sun, 11 Jun 2017 17:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497225630; cv=none; d=google.com; s=arc-20160816; b=FCjOyF23doyWt6KeZ6EzPpqj7V+j05+6a2qRlCl3SBz/bUUMmPAaIJKmCktVhPpjd0 yBN4J52E8/nTCm56DDPRFGstGw248GhQSiqPBVEPM8x8YWnGGLHyG5XTcI8mKVKOE0R9 QSbkyO3IF62DuIDW/cs2uUlJrQkq3c4GabtZbz6YPvWBXryCpEeAgdCeAd4AAmv2rmjw 5hveZdvOiBaHbA21pE9EroY1oBnVOegKiHlulmRpDPytJI+Kd3vXqGhSNGYqktUKMPDp XmVMSWqNnQ/JgQg9S6tUY3bSbTc6ZQvAzhAaAdu7wGvXid2woA65bOf94e3UEFMpfjXi SEsg== 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:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=gpHEvZeqc4YTZqGiStLm9ZDaUW9tSYvVtFT+sQHpXQ4=; b=vzK079iV9nZLg8fEVwy9m7Xckt6QYVP764mPSYVNhFkcJrCzFrSNv/oPkT/G+sJua2 7qViCAImHtl+TcROtQsdqIaMxr5yDNK14l0oLCuCzliYty8RvBPvXUBwnyiwnt9bMtVA qSpUN27akR7vpbPM/iT0FhdxmCDCrM5ZDfOsVdJEyNB3s4Axe00gscAoY4NwOqv3tS2Q bLTCH1+h+seyZeVcfuMiDetYXMiiHD78YXVkVRyYmPGZRUqaC38gFW4gmbse1Ybu3UF6 5fLQaMbs+b0FIAVME0SPQ1+oIFSubHCtmANb9QuM3z5tKxajcqA+/DpP+GPHLyStxZzq AS9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q18si6840503qtg.286.2017.06.11.17.00.30; Sun, 11 Jun 2017 17:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 8CBCE60B41; Mon, 12 Jun 2017 00:00:30 +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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 9064860B49; Sun, 11 Jun 2017 23:59: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 6998E60ACD; Sun, 11 Jun 2017 23:59:27 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by lists.linaro.org (Postfix) with ESMTPS id 36E8160ACD for ; Sun, 11 Jun 2017 23:59:26 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id e11so7490993oia.2 for ; Sun, 11 Jun 2017 16:59:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gpHEvZeqc4YTZqGiStLm9ZDaUW9tSYvVtFT+sQHpXQ4=; b=MEy8xi0YL29uGj5Sn97pyC54I0SpVXIB3+nnnjnGMgSZ3Va8tBMKZmRowMDI8qRZ2U ry3KESWctOjsXX/a68zjev2BlC5Tw+4gQc6skEPNEtfcQygkvte9cnPTyWm7mpE4d39Z FU5KvP4QUAMYFPp58m5nNrVVzJqlHQmQ9zz8ZZJOHQwu4nk0dvdxqIW5T0/eWGsfwHva TMpP3idGA4Xhpb2Ab78LBabvU5rvv5LC//0/8tQpmxE6pyueLOG3vCLSIbq8FHEKIZEv 7cO+OmOICRVnHN7rfKTui/MO3Ex1N880FUfcI7t+Sql81Twnqq0vkFkr+mebTSFMAztO cCeQ== X-Gm-Message-State: AODbwcBz5Rux5Ok3c25zB8HIsQn//e2w+YWu+bsCUrXoOFO6UeCoqit8 f5d+5zjyqS6pyhI6NeyWb0vB X-Received: by 10.202.216.3 with SMTP id p3mr22926973oig.183.1497225565463; Sun, 11 Jun 2017 16:59:25 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id o70sm4128058oik.30.2017.06.11.16.59.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 16:59:24 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 11 Jun 2017 18:59:18 -0500 Message-Id: <20170611235919.10052-3-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170611235919.10052-1-bill.fischofer@linaro.org> References: <20170611235919.10052-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv3 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" Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_init.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.11.0 diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 31bd7c73..62a1fbc2 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -147,6 +147,11 @@ static int read_configfile(void) return 0; } +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 Jun 11 23:59:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 103573 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp711188qgd; Sun, 11 Jun 2017 17:00:53 -0700 (PDT) X-Received: by 10.200.10.129 with SMTP id d1mr5492714qti.227.1497225653611; Sun, 11 Jun 2017 17:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497225653; cv=none; d=google.com; s=arc-20160816; b=J7h/gBZlBej89ugOZB/Zan+z0aUZCdRt1KNAbM7Z68nOwbY8qj/nSn4KnqN9wV1FPO M1nF2Tt0QdvfxxKAl/3mymewakgha9ESUsxX3oIdi1TED6WfyvpGqlHPMEwuqDxDP5Vy lq2PwQvyqr4VM4jU/f8GwE+Nn1FI3npcst9Tyqb723GV3eccNX9OdMgMN0BnE/RHCHfR BqpJWXR3ytHM6o876/4cBLnmfC4Yk9KakC6YCafQKbr+16+EEjKA3BLV9TjsRaKN6T4i yeLDJPJPJUYAsWZisYU/nwN52eWlTfvjVR27D257vhzYIepZZPGFvkcDJry02dM3ePvv 7Zyw== 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:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=LmNxT3Pg+LDeOg8Q5pmdwIYAflUaZ1hTS0cVH39Ttr4=; b=kUhtaYH7IfW+6yrp0Ijz9PmiGpN8iwWG2IBLepTMzi9IqYqxlgCKnJh+lyi3lzz8Rs DS507pFCOqoTaGV+rM9ULrHW2M9jmAnblUKJkruZ6VsFkEkZmbJjsq9Us3w0iawfQ5z7 ljZUsZZ08QK00HfB+IdFaHKxssaUh3I2/AjNPwkq/v72S1pD3w36YcOOcZFGDMvaUMsT ONYNvd1mRsOQdKogAJw1ZdOU65LMoSqq68RV8Mrlcp/fJjD5vnIhYMqXybd4ijvJJH47 fict3or9VtuixOJZqvdnKrQS7UCerjwTug4apOe70l7tlyVZ6g7k4zmgI/+0+O6B0V7h p7WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j4si7304136qtj.173.2017.06.11.17.00.53; Sun, 11 Jun 2017 17:00:53 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 39C7C60B4B; Mon, 12 Jun 2017 00:00:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 DB7F560B5E; Sun, 11 Jun 2017 23:59:37 +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 77BC860B3F; Sun, 11 Jun 2017 23:59:29 +0000 (UTC) Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by lists.linaro.org (Postfix) with ESMTPS id 6E05C60B11 for ; Sun, 11 Jun 2017 23:59:27 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id e11so7491065oia.2 for ; Sun, 11 Jun 2017 16:59:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LmNxT3Pg+LDeOg8Q5pmdwIYAflUaZ1hTS0cVH39Ttr4=; b=WFcKkFCYzh1nYaxeDPFNQjhxSKRc7jeRaAv8AidQKcowTueKuJn/mNpVNiLqixJ8w8 0oC9X+c7sMh7IkfY23bXXEEFhUfTDXKzAgGlDEuPccz+0nxRqmnGvXaC6z5VbkUo+eGe s8TrpHs5V9CIvR9yJp/2HbTK9vg5f7DyjU77MCgZ8QQHrYZtnY/Qa/pIHWsbE9FxqMCe LfCWv+1GkKp5LVIbjMKHq78TTm947sj0U2QXRvl8KsCk0iLnz44Gv06dawu4k7aJRXxa /L3gVK8c0Qh0wcyX8SZpmEQMm+FXTqMr66SumfH0uphgaUyuCkrKxXJKqQ6Inv7JOaJJ /JNA== X-Gm-Message-State: AODbwcDEar70E0JZjbg0CPj1if+arSus3XAsymqBTXVhZRVwdxHTLGXj twUd07gb8x0tt61kdYar9Ml6 X-Received: by 10.202.171.145 with SMTP id u139mr9745146oie.15.1497225566701; Sun, 11 Jun 2017 16:59:26 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id o70sm4128058oik.30.2017.06.11.16.59.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 16:59:25 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 11 Jun 2017 18:59:19 -0500 Message-Id: <20170611235919.10052-4-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170611235919.10052-1-bill.fischofer@linaro.org> References: <20170611235919.10052-1-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv3 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" Provide test coverage for odp_init_param_init() API. Signed-off-by: Bill Fischofer --- test/common_plat/validation/api/init/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.11.0 diff --git a/test/common_plat/validation/api/init/init.c b/test/common_plat/validation/api/init/init.c index 61055fad..6f9556d7 100644 --- a/test/common_plat/validation/api/init/init.c +++ b/test/common_plat/validation/api/init/init.c @@ -24,10 +24,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); @@ -77,10 +77,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;