[API-NEXT,PATCHv3,3/3] api: dev: activate device id support

Message ID 1477344567-2561-3-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Oct. 24, 2016, 9:29 p.m.
Make device id support active and add relevant device id extensions to
crypto, pool, and timer parameter structs.

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

---
Changes for v2:
- Split out into separate API patch

 include/odp/api/spec/crypto.h | 3 +++
 include/odp/api/spec/pool.h   | 7 +++++++
 include/odp/api/spec/timer.h  | 3 +++
 include/odp_api.h             | 1 +
 4 files changed, 14 insertions(+)

-- 
2.7.4

Patch

diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index 0cb8814..67d723b 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -19,6 +19,8 @@ 
 extern "C" {
 #endif
 
+#include <odp/api/dev.h>
+
 /** @defgroup odp_crypto ODP CRYPTO
  *  Macros, enums, types and operations to utilise crypto.
  *  @{
@@ -182,6 +184,7 @@  typedef struct odp_crypto_session_params {
 	odp_crypto_key_t auth_key;         /**< Authentication key */
 	odp_queue_t compl_queue;           /**< Async mode completion event queue */
 	odp_pool_t output_pool;            /**< Output buffer pool */
+	odp_dev_t dev_id;                  /**< Device id of this crypto dev */
 } odp_crypto_session_params_t;
 
 /**
diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h
index c80c98a..a1cc65d 100644
--- a/include/odp/api/spec/pool.h
+++ b/include/odp/api/spec/pool.h
@@ -20,6 +20,7 @@  extern "C" {
 #endif
 
 #include <odp/api/std_types.h>
+#include <odp/api/dev.h>
 
 /** @defgroup odp_pool ODP POOL
  *  Operations on a pool.
@@ -164,6 +165,12 @@  typedef struct odp_pool_param_t {
 	/** Pool type */
 	int type;
 
+	/** Device id for this pool */
+	odp_dev_t pool_id;
+
+	/** Device id for memory used for this pool */
+	odp_dev_t mem_id;
+
 	union {
 		struct {
 			/** Number of buffers in the pool */
diff --git a/include/odp/api/spec/timer.h b/include/odp/api/spec/timer.h
index df37189..8913755 100644
--- a/include/odp/api/spec/timer.h
+++ b/include/odp/api/spec/timer.h
@@ -19,6 +19,8 @@ 
 extern "C" {
 #endif
 
+#include <odp/api/dev.h>
+
 /** @defgroup odp_timer ODP TIMER
  *  @{
  */
@@ -103,6 +105,7 @@  typedef struct {
 	uint32_t num_timers; /**< (Minimum) number of supported timers */
 	int priv; /**< Shared (false) or private (true) timer pool */
 	odp_timer_clk_src_t clk_src; /**< Clock source for timers */
+	odp_dev_t dev_id; /**< Device id of this timer resource */
 } odp_timer_pool_param_t;
 
 /**
diff --git a/include/odp_api.h b/include/odp_api.h
index ec7fcd2..89a99ae 100644
--- a/include/odp_api.h
+++ b/include/odp_api.h
@@ -25,6 +25,7 @@  extern "C" {
 #include <odp/api/hash.h>
 #include <odp/api/hints.h>
 #include <odp/api/debug.h>
+#include <odp/api/dev.h>
 #include <odp/api/byteorder.h>
 #include <odp/api/cpu.h>
 #include <odp/api/cpumask.h>