diff mbox series

[API-NEXT,PATCHv7,1/5] api: feature: add odp feature bits

Message ID 20170613125515.24874-1-bill.fischofer@linaro.org
State New
Headers show
Series [API-NEXT,PATCHv7,1/5] api: feature: add odp feature bits | expand

Commit Message

Bill Fischofer June 13, 2017, 12:55 p.m. UTC
Add new odp_feature_t bits that permit other APIs/components to
refer to various ODP features.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

---
 include/odp/api/spec/feature.h                   | 69 ++++++++++++++++++++++++
 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, 107 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

Comments

Savolainen, Petri (Nokia - FI/Espoo) June 13, 2017, 1:16 p.m. UTC | #1
For the entire patch set:

Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>



> -----Original Message-----

> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Bill

> Fischofer

> Sent: Tuesday, June 13, 2017 3:55 PM

> To: lng-odp@lists.linaro.org

> Subject: [lng-odp] [API-NEXT PATCHv7 1/5] 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 <bill.fischofer@linaro.org>

> ---

>  include/odp/api/spec/feature.h                   | 69

> ++++++++++++++++++++++++

>  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, 107 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..0cfc141d

> --- /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 <odp/visibility_begin.h>

> +

> +#ifdef __cplusplus

> +extern "C" {

> +#endif

> +

> +#include <odp/api/std_types.h>

> +

> +/** @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 <odp/visibility_end.h>

> +#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 <odp/api/barrier.h>

>  #include <odp/api/spinlock.h>

>  #include <odp/api/atomic.h>

> +#include <odp/api/feature.h>

>  #include <odp/api/init.h>

>  #include <odp/api/system_info.h>

>  #include <odp/api/thread.h>

> 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 <odp/api/spec/feature.h>

> +

> +#ifdef __cplusplus

> +}

> +#endif

> +

> +#endif

> --

> 2.11.0
Maxim Uvarov June 22, 2017, 5:02 p.m. UTC | #2
Merged.

On 06/13/17 16:16, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> For the entire patch set:

> 

> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>

> 

> 

>> -----Original Message-----

>> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Bill

>> Fischofer

>> Sent: Tuesday, June 13, 2017 3:55 PM

>> To: lng-odp@lists.linaro.org

>> Subject: [lng-odp] [API-NEXT PATCHv7 1/5] 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 <bill.fischofer@linaro.org>

>> ---

>>  include/odp/api/spec/feature.h                   | 69

>> ++++++++++++++++++++++++

>>  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, 107 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..0cfc141d

>> --- /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 <odp/visibility_begin.h>

>> +

>> +#ifdef __cplusplus

>> +extern "C" {

>> +#endif

>> +

>> +#include <odp/api/std_types.h>

>> +

>> +/** @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 <odp/visibility_end.h>

>> +#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 <odp/api/barrier.h>

>>  #include <odp/api/spinlock.h>

>>  #include <odp/api/atomic.h>

>> +#include <odp/api/feature.h>

>>  #include <odp/api/init.h>

>>  #include <odp/api/system_info.h>

>>  #include <odp/api/thread.h>

>> 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 <odp/api/spec/feature.h>

>> +

>> +#ifdef __cplusplus

>> +}

>> +#endif

>> +

>> +#endif

>> --

>> 2.11.0

>
diff mbox series

Patch

diff --git a/include/odp/api/spec/feature.h b/include/odp/api/spec/feature.h
new file mode 100644
index 00000000..0cfc141d
--- /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 <odp/visibility_begin.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/std_types.h>
+
+/** @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 <odp/visibility_end.h>
+#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 <odp/api/barrier.h>
 #include <odp/api/spinlock.h>
 #include <odp/api/atomic.h>
+#include <odp/api/feature.h>
 #include <odp/api/init.h>
 #include <odp/api/system_info.h>
 #include <odp/api/thread.h>
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 <odp/api/spec/feature.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif