aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/spec/std_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/odp/api/spec/std_types.h')
-rw-r--r--include/odp/api/spec/std_types.h62
1 files changed, 61 insertions, 1 deletions
diff --git a/include/odp/api/spec/std_types.h b/include/odp/api/spec/std_types.h
index 5dc350a24..41f436065 100644
--- a/include/odp/api/spec/std_types.h
+++ b/include/odp/api/spec/std_types.h
@@ -9,7 +9,7 @@
/**
* @file
*
- * Standard C language types and definitions for ODP.
+ * Common types and definitions for ODP API files.
*
*/
@@ -96,6 +96,66 @@ typedef struct odp_fract_u64_t {
} odp_fract_u64_t;
/**
+ * ODP support
+ *
+ * Support levels are specified in the relative order, where ODP_SUPPORT_NO is
+ * the lowest level. E.g. if the examined support level is greater than
+ * ODP_SUPPORT_NO, the feature is supported in some form.
+ */
+typedef enum odp_support_t {
+ /**
+ * Feature is not supported
+ */
+ ODP_SUPPORT_NO = 0,
+ /**
+ * Feature is supported
+ */
+ ODP_SUPPORT_YES,
+ /**
+ * Feature is supported and preferred
+ */
+ ODP_SUPPORT_PREFERRED
+
+} odp_support_t;
+
+/** 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;
+
+ /** Compression APIs, e.g., odp_comp_xxx() */
+ uint32_t compress: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;
+
+ /** Stash APIs, e.g., odp_stash_xxx() */
+ uint32_t stash:1;
+
+ /** Time APIs, 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;
+
+/**
* @}
*/