> -----Original Message-----
> From: lng-odp [mailto:[email protected]] On Behalf Of Bill
> Fischofer
> Sent: Monday, June 12, 2017 2:59 AM
> To: [email protected]
> Subject: [lng-odp] [API-NEXT PATCHv3 1/4] api: feature: add odp feature
> bits
>
> Add new odp_feature_t bits that permit other APIs/components to
> refer to various ODP features.
>
> Signed-off-by: Bill Fischofer <[email protected]>
> ---
> 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
>
> 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 <odp/visibility_begin.h>
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <odp/api/std_types.h>
> +#include <odp/api/hints.h>
> +#include <odp/api/thread.h>
> +#include <odp/api/cpumask.h>
These three includes above are not needed.
> +
> +/** @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;
"classifier" or "cls" instead of classification. Packet IO API has
"classifier_enable" parameter. IPSEC API has "ODP_IPSEC_PIPELINE_CLS"
enumeration.
> + 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;
Each feature bit would need some documentation about it. Application does not
include spec directory header files, but odp_api.h. So, a "feature" needs to be
defined other means than with file names. For example, what feature "cls" means
... calls to odp_cls_xxx() / odp_cos_xxx() functions.
-Petri