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