From patchwork Mon Nov 6 12: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: 118023 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp2541588edm; Mon, 6 Nov 2017 04:03:43 -0800 (PST) X-Google-Smtp-Source: ABhQp+SDpuZW564nP8Fpu5kwXrrZdC8kxA/rv5MtL5D9dv+Lq9wPbgEgLgRBmvcU049YchZI31CN X-Received: by 10.233.230.1 with SMTP id z1mr14834432qkf.206.1509969823792; Mon, 06 Nov 2017 04:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509969823; cv=none; d=google.com; s=arc-20160816; b=klgUWcdIqPSWrFLoFapgm6ee3lVM0vgXy1gMXRcTguOnPiaSzFOZTayC0QENVX771o +fvP6I1trYgR7h74+RSU6HqKuWCruvVRGGdtNP8FoGH2zWzlKwy2nPwqpyzl1qS71vJG 3EhmFbDmCvdB4RSJ0xia9G8aqLfIB/xjYH12tdIbBRuMOebX+hb1Tn86RYxVeUad9UOo DP2TxQ0CrkhAQcc2KGLkvJ7X82d4XhMNcd2666KeKwz83HXB0XsmEvqo8QMkf013q8aS DoxvhUe+GI1/+Ugww25awZ53rWV/8Pkw7ktjyjggKfZYDEAC98UIEkoz/IFYICEF5KKQ r9Tw== 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=aUAFRhq2ATs6eotQ/mE+HjY0vcJgRD/0m5w4M7u6wKo=; b=rQ77WqNIjBCxXW5XrHjednS+s+m67LEb9sbLOisSG24TpkkdmkTlvrwi50r9y+l8+q Q7mUx6M2kTL8Qr28gIl7d9DuYkIqLKIq3DMBJPzZszbacy6rOUkh+dW7Lo773f2+CR1P 9XMdQGioJbxpqa01fxIlL5/633K3FcHD0baZAPi8UPGy8wDgiwqFy9k4XFr+xzMOjzFX M5RHB3UqFoPREuYcYUACplDWuBhyr27IWgKf/ap5njbLua8/RUGBTcnvzq6ZJ2z+8YgC 0TrwI4QC60e3uy+Jsa9MJBy27sUj1MBcv+DdqjZysSqjMNBjqY+VjRtl+NciUILC6brV XDwQ== 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 d72si2124650qkj.472.2017.11.06.04.03.43; Mon, 06 Nov 2017 04:03:43 -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 6679A607F9; Mon, 6 Nov 2017 12:03: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 25C64607FE; Mon, 6 Nov 2017 12:02:06 +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 47ABA6069C; Mon, 6 Nov 2017 12:01:52 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 2806D606A0 for ; Mon, 6 Nov 2017 12:00:11 +0000 (UTC) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 892EC1242ADD for ; Mon, 6 Nov 2017 15:00:09 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KsWVQoUZFy-09YWbGoH; Mon, 06 Nov 2017 15:00:09 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3HBJbpFqMH-08eK6o7T; Mon, 06 Nov 2017 15: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: Mon, 6 Nov 2017 15:00:04 +0300 Message-Id: <1509969607-32198-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> References: <1509969607-32198-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 276 Subject: [lng-odp] [PATCH v3 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: bb644389b2bb70dd349aed079e00a2fea7c90eea **/ include/Makefile.am | 1 + 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 ++++++++++++ 5 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/Makefile.am b/include/Makefile.am index a3a7e1658..746b5975f 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -17,6 +17,7 @@ odpapispecinclude_HEADERS = \ odp/api/spec/debug.h \ odp/api/spec/errno.h \ odp/api/spec/event.h \ + odp/api/spec/feature.h \ odp/api/spec/hash.h \ odp/api/spec/hints.h \ odp/api/spec/init.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