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