aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api
diff options
context:
space:
mode:
authorBalakrishna Garapati <balakrishna.garapati@linaro.org>2017-07-26 11:22:25 +0200
committerBalakrishna Garapati <balakrishna.garapati@linaro.org>2017-07-26 11:22:25 +0200
commitd8533b4e575d62c9f6f2caedd38d98a1a56fb8d3 (patch)
treecdbfedf7f9abaab651f1130b5bbeea0bc7a0ab09 /include/odp/api
parent716fed6776977db67a0c498b0c3990887903f08d (diff)
parent107b9411e85aad0a48d759fbf0572a631e189a02 (diff)
Sync odp-dpdk with v1.15 release from odpv1.15.0.0_DPDK_17.02
Diffstat (limited to 'include/odp/api')
-rw-r--r--include/odp/api/spec/.gitignore1
-rw-r--r--include/odp/api/spec/classification.h4
-rw-r--r--include/odp/api/spec/crypto.h82
-rw-r--r--include/odp/api/spec/deprecated.h.in50
-rw-r--r--include/odp/api/spec/hints.h6
-rw-r--r--include/odp/api/spec/packet.h12
-rw-r--r--include/odp/api/spec/packet_io.h36
-rw-r--r--include/odp/api/spec/pool.h6
-rw-r--r--include/odp/api/spec/queue.h39
-rw-r--r--include/odp/api/spec/system_info.h9
-rw-r--r--include/odp/api/spec/time.h13
-rw-r--r--include/odp/api/spec/traffic_mngr.h5
12 files changed, 218 insertions, 45 deletions
diff --git a/include/odp/api/spec/.gitignore b/include/odp/api/spec/.gitignore
index 67020331b..df9c87d90 100644
--- a/include/odp/api/spec/.gitignore
+++ b/include/odp/api/spec/.gitignore
@@ -1 +1,2 @@
+deprecated.h
version.h
diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h
index 0e1addd6e..39831b240 100644
--- a/include/odp/api/spec/classification.h
+++ b/include/odp/api/spec/classification.h
@@ -366,7 +366,9 @@ typedef struct odp_pmr_param_t {
/** True if the value is range and false if match */
odp_bool_t range_term;
+ /** Variant mappings for types of matches */
union {
+ /** Parameters for single-valued matches */
struct {
/** Value to be matched */
const void *value;
@@ -374,6 +376,8 @@ typedef struct odp_pmr_param_t {
/** Masked set of bits to be matched */
const void *mask;
} match;
+
+ /** Parameter for range value matches */
struct {
/** Start and End values are included in the range */
/** start value of range */
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index 9855bf989..470cba050 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -15,10 +15,14 @@
#define ODP_API_CRYPTO_H_
#include <odp/visibility_begin.h>
+#include <odp/api/deprecated.h>
+
#ifdef __cplusplus
extern "C" {
#endif
+#include <odp/api/packet.h>
+
/** @defgroup odp_crypto ODP CRYPTO
* Macros, enums, types and operations to utilise crypto.
* @{
@@ -82,10 +86,10 @@ typedef enum {
ODP_CIPHER_ALG_AES_GCM,
/** @deprecated Use ODP_CIPHER_ALG_AES_CBC instead */
- ODP_CIPHER_ALG_AES128_CBC,
+ ODP_DEPRECATE(ODP_CIPHER_ALG_AES128_CBC),
/** @deprecated Use ODP_CIPHER_ALG_AES_GCM instead */
- ODP_CIPHER_ALG_AES128_GCM
+ ODP_DEPRECATE(ODP_CIPHER_ALG_AES128_GCM)
} odp_cipher_alg_t;
@@ -102,12 +106,24 @@ typedef enum {
*/
ODP_AUTH_ALG_MD5_HMAC,
+ /** HMAC-SHA-1
+ *
+ * SHA-1 algorithm in HMAC mode
+ */
+ ODP_AUTH_ALG_SHA1_HMAC,
+
/** HMAC-SHA-256
*
* SHA-256 algorithm in HMAC mode
*/
ODP_AUTH_ALG_SHA256_HMAC,
+ /** HMAC-SHA-512
+ *
+ * SHA-512 algorithm in HMAC mode
+ */
+ ODP_AUTH_ALG_SHA512_HMAC,
+
/** AES in Galois/Counter Mode
*
* @note Must be paired with cipher ODP_CIPHER_ALG_AES_GCM
@@ -115,13 +131,14 @@ typedef enum {
ODP_AUTH_ALG_AES_GCM,
/** @deprecated Use ODP_AUTH_ALG_MD5_HMAC instead */
- ODP_AUTH_ALG_MD5_96,
+ ODP_DEPRECATE(ODP_AUTH_ALG_MD5_96),
/** @deprecated Use ODP_AUTH_ALG_SHA256_HMAC instead */
- ODP_AUTH_ALG_SHA256_128,
+ ODP_DEPRECATE(ODP_AUTH_ALG_SHA256_128),
/** @deprecated Use ODP_AUTH_ALG_AES_GCM instead */
- ODP_AUTH_ALG_AES128_GCM
+ ODP_DEPRECATE(ODP_AUTH_ALG_AES128_GCM)
+
} odp_auth_alg_t;
/**
@@ -146,10 +163,11 @@ typedef union odp_crypto_cipher_algos_t {
uint32_t aes_gcm : 1;
/** @deprecated Use aes_cbc instead */
- uint32_t aes128_cbc : 1;
+ uint32_t ODP_DEPRECATE(aes128_cbc) : 1;
/** @deprecated Use aes_gcm instead */
- uint32_t aes128_gcm : 1;
+ uint32_t ODP_DEPRECATE(aes128_gcm) : 1;
+
} bit;
/** All bits of the bit field structure
@@ -171,20 +189,27 @@ typedef union odp_crypto_auth_algos_t {
/** ODP_AUTH_ALG_MD5_HMAC */
uint32_t md5_hmac : 1;
+ /** ODP_AUTH_ALG_SHA1_HMAC */
+ uint32_t sha1_hmac : 1;
+
/** ODP_AUTH_ALG_SHA256_HMAC */
uint32_t sha256_hmac : 1;
+ /** ODP_AUTH_ALG_SHA512_HMAC */
+ uint32_t sha512_hmac : 1;
+
/** ODP_AUTH_ALG_AES_GCM */
uint32_t aes_gcm : 1;
/** @deprecated Use md5_hmac instead */
- uint32_t md5_96 : 1;
+ uint32_t ODP_DEPRECATE(md5_96) : 1;
/** @deprecated Use sha256_hmac instead */
- uint32_t sha256_128 : 1;
+ uint32_t ODP_DEPRECATE(sha256_128) : 1;
/** @deprecated Use aes_gcm instead */
- uint32_t aes128_gcm : 1;
+ uint32_t ODP_DEPRECATE(aes128_gcm) : 1;
+
} bit;
/** All bits of the bit field structure
@@ -220,15 +245,10 @@ typedef struct odp_crypto_iv {
/**
* Crypto API data range specifier
+ *
+ * @deprecated Use odp_packet_data_range_t instead
*/
-typedef struct odp_crypto_data_range {
- /** Offset from beginning of packet */
- uint32_t offset;
-
- /** Length of data to operate on */
- uint32_t length;
-
-} odp_crypto_data_range_t;
+typedef odp_packet_data_range_t ODP_DEPRECATE(odp_crypto_data_range_t);
/**
* Crypto API session creation parameters
@@ -276,10 +296,16 @@ typedef struct odp_crypto_session_param_t {
/** Authentication key
*
- * Use odp_crypto_auth_capa() for supported digest and key lengths.
+ * Use odp_crypto_auth_capability() for supported key lengths.
*/
odp_crypto_key_t auth_key;
+ /** Authentication digest length in bytes
+ *
+ * Use odp_crypto_auth_capability() for supported digest lengths.
+ */
+ uint32_t auth_digest_len;
+
/** Async mode completion event queue
*
* When odp_crypto_operation() is asynchronous, the completion queue is
@@ -299,7 +325,7 @@ typedef struct odp_crypto_session_param_t {
} odp_crypto_session_param_t;
/** @deprecated Use odp_crypto_session_param_t instead */
-typedef odp_crypto_session_param_t odp_crypto_session_params_t;
+typedef odp_crypto_session_param_t ODP_DEPRECATE(odp_crypto_session_params_t);
/**
* Crypto API per packet operation parameters
@@ -346,16 +372,26 @@ typedef struct odp_crypto_op_param_t {
*/
uint32_t hash_result_offset;
+ /** Additional Authenticated Data (AAD) */
+ struct {
+ /** Pointer to ADD */
+ uint8_t *ptr;
+
+ /** AAD length in bytes. Use odp_crypto_auth_capability() for
+ * supported AAD lengths. */
+ uint32_t length;
+ } aad;
+
/** Data range to apply cipher */
- odp_crypto_data_range_t cipher_range;
+ odp_packet_data_range_t cipher_range;
/** Data range to authenticate */
- odp_crypto_data_range_t auth_range;
+ odp_packet_data_range_t auth_range;
} odp_crypto_op_param_t;
/** @deprecated Use odp_crypto_op_param_t instead */
-typedef odp_crypto_op_param_t odp_crypto_op_params_t;
+typedef odp_crypto_op_param_t ODP_DEPRECATE(odp_crypto_op_params_t);
/**
* Crypto API session creation return code
diff --git a/include/odp/api/spec/deprecated.h.in b/include/odp/api/spec/deprecated.h.in
new file mode 100644
index 000000000..224f60ff3
--- /dev/null
+++ b/include/odp/api/spec/deprecated.h.in
@@ -0,0 +1,50 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Macro for deprecated API definitions
+ */
+
+#ifndef ODP_API_DEPRECATED_H_
+#define ODP_API_DEPRECATED_H_
+#include <odp/visibility_begin.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Deprecated API definitions
+ *
+ * Some API definitions may be deprecated by this or a previous API version.
+ * This macro controls if those are enabled (and visible to the application)
+ * or disabled.
+ *
+ * * 0: Deprecated API definitions are disabled (default)
+ * * 1: Deprecated API definitions are enabled
+ */
+#define ODP_DEPRECATED_API @ODP_DEPRECATED_API@
+
+/**
+ * @def ODP_DEPRECATE
+ *
+ * Macro to deprecate API definitions
+ */
+
+#if ODP_DEPRECATED_API
+#define ODP_DEPRECATE(x) x
+#else
+#define ODP_DEPRECATE(x) _deprecated_ ## x
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <odp/visibility_end.h>
+#endif
diff --git a/include/odp/api/spec/hints.h b/include/odp/api/spec/hints.h
index 82400f073..7434c6a5c 100644
--- a/include/odp/api/spec/hints.h
+++ b/include/odp/api/spec/hints.h
@@ -52,11 +52,6 @@ extern "C" {
#define ODP_PRINTF_FORMAT(x, y) __attribute__((format(printf, (x), (y))))
/**
- * Indicate deprecated variables, functions or types
- */
-#define ODP_DEPRECATED __attribute__((__deprecated__))
-
-/**
* Intentionally unused variables of functions
*/
#define ODP_UNUSED __attribute__((__unused__))
@@ -96,7 +91,6 @@ extern "C" {
#define ODP_WEAK_SYMBOL
#define ODP_HOT_CODE
#define ODP_COLD_CODE
-#define ODP_DEPRECATED
#define ODP_UNUSED
#define odp_likely(x)
#define odp_unlikely(x)
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
index 92c35ae6d..79d8773e9 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -71,6 +71,18 @@ extern "C" {
* Packet is red
*/
+/**
+ * Packet API data range specifier
+ */
+typedef struct odp_packet_data_range {
+ /** Offset from beginning of packet */
+ uint32_t offset;
+
+ /** Length of data to operate on */
+ uint32_t length;
+
+} odp_packet_data_range_t;
+
/*
*
* Alloc and free
diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index 85cd6d184..cec1f22af 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -346,6 +346,39 @@ typedef union odp_pktout_config_opt_t {
} odp_pktout_config_opt_t;
/**
+ * Parser layers
+ */
+typedef enum odp_pktio_parser_layer_t {
+ /** No layers */
+ ODP_PKTIO_PARSER_LAYER_NONE = 0,
+
+ /** Layer L2 protocols (Ethernet, VLAN, ARP, etc) */
+ ODP_PKTIO_PARSER_LAYER_L2,
+
+ /** Layer L3 protocols (IPv4, IPv6, ICMP, IPsec, etc) */
+ ODP_PKTIO_PARSER_LAYER_L3,
+
+ /** Layer L4 protocols (UDP, TCP, SCTP) */
+ ODP_PKTIO_PARSER_LAYER_L4,
+
+ /** All layers */
+ ODP_PKTIO_PARSER_LAYER_ALL
+
+} odp_pktio_parser_layer_t;
+
+/**
+ * Parser configuration
+ */
+typedef struct odp_pktio_parser_config_t {
+ /** Protocol parsing level in packet input
+ *
+ * Parse protocol layers in minimum up to this level during packet
+ * input. The default value is ODP_PKTIO_PARSER_LAYER_ALL. */
+ odp_pktio_parser_layer_t layer;
+
+} odp_pktio_parser_config_t;
+
+/**
* Packet IO configuration options
*
* Packet IO interface level configuration options. Use odp_pktio_capability()
@@ -363,6 +396,9 @@ typedef struct odp_pktio_config_t {
* Default value for all bits is zero. */
odp_pktout_config_opt_t pktout;
+ /** Packet input parser configuration */
+ odp_pktio_parser_config_t parser;
+
/** Interface loopback mode
*
* In this mode the packets sent out through the interface is
diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h
index c0de195a7..6fc5b6b4a 100644
--- a/include/odp/api/spec/pool.h
+++ b/include/odp/api/spec/pool.h
@@ -166,7 +166,9 @@ typedef struct odp_pool_param_t {
/** Pool type */
int type;
+ /** Variant parameters for different pool types */
union {
+ /** Parameters for buffer pools */
struct {
/** Number of buffers in the pool */
uint32_t num;
@@ -180,6 +182,8 @@ typedef struct odp_pool_param_t {
Default will always be a multiple of 8. */
uint32_t align;
} buf;
+
+ /** Parameters for packet pools */
struct {
/** The number of packets that the pool must provide
that are packet length 'len' bytes or smaller.
@@ -211,6 +215,8 @@ typedef struct odp_pool_param_t {
Specify as 0 if no user area is needed. */
uint32_t uarea_size;
} pkt;
+
+ /** Parameters for timeout pools */
struct {
/** Number of timeouts in the pool */
uint32_t num;
diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h
index 7972feacb..9dd0a5618 100644
--- a/include/odp/api/spec/queue.h
+++ b/include/odp/api/spec/queue.h
@@ -100,7 +100,9 @@ typedef enum odp_queue_op_mode_t {
* Queue capabilities
*/
typedef struct odp_queue_capability_t {
- /** Maximum number of event queues */
+ /** Maximum number of event queues of any type (default size). Use
+ * this in addition to queue type specific 'max_num', if both queue
+ * types are used simultaneously. */
uint32_t max_queues;
/** Maximum number of ordered locks per queue */
@@ -112,6 +114,32 @@ typedef struct odp_queue_capability_t {
/** Number of scheduling priorities */
unsigned sched_prios;
+ /** Plain queue capabilities */
+ struct {
+ /** Maximum number of plain queues of the default size. */
+ uint32_t max_num;
+
+ /** Maximum number of events a plain queue can store
+ * simultaneously. The value of zero means that plain
+ * queues do not have a size limit, but a single queue can
+ * store all available events. */
+ uint32_t max_size;
+
+ } plain;
+
+ /** Scheduled queue capabilities */
+ struct {
+ /** Maximum number of scheduled queues of the default size. */
+ uint32_t max_num;
+
+ /** Maximum number of events a scheduled queue can store
+ * simultaneously. The value of zero means that scheduled
+ * queues do not have a size limit, but a single queue can
+ * store all available events. */
+ uint32_t max_size;
+
+ } sched;
+
} odp_queue_capability_t;
/**
@@ -165,6 +193,15 @@ typedef struct odp_queue_param_t {
* The implementation may use this value as a hint for the number of
* context data bytes to prefetch. Default value is zero (no hint). */
uint32_t context_len;
+
+ /** Queue size
+ *
+ * The queue must be able to store at minimum this many events
+ * simultaneously. The value must not exceed 'max_size' queue
+ * capability. The value of zero means implementation specific
+ * default size. */
+ uint32_t size;
+
} odp_queue_param_t;
/**
diff --git a/include/odp/api/spec/system_info.h b/include/odp/api/spec/system_info.h
index 0bb4f1f12..ca4dcdc7a 100644
--- a/include/odp/api/spec/system_info.h
+++ b/include/odp/api/spec/system_info.h
@@ -45,6 +45,15 @@ uint64_t odp_sys_page_size(void);
int odp_sys_cache_line_size(void);
/**
+ * Print system info
+ *
+ * Print out implementation defined information about the system. This
+ * information is intended for debugging purposes and may contain e.g.
+ * information about CPUs, memory and other HW configuration.
+ */
+void odp_sys_info_print(void);
+
+/**
* @}
*/
diff --git a/include/odp/api/spec/time.h b/include/odp/api/spec/time.h
index fcc94c98e..29175eb5a 100644
--- a/include/odp/api/spec/time.h
+++ b/include/odp/api/spec/time.h
@@ -158,19 +158,6 @@ void odp_time_wait_until(odp_time_t time);
void odp_time_wait_ns(uint64_t ns);
/**
- * Get printable value for an odp_time_t
- *
- * @param time time to be printed
- *
- * @return uint64_t value that can be used to print/display this time
- *
- * @note This routine is intended to be used for diagnostic purposes
- * to enable applications to generate a printable value that represents
- * an odp_time_t time.
- */
-uint64_t odp_time_to_u64(odp_time_t time);
-
-/**
* @}
*/
diff --git a/include/odp/api/spec/traffic_mngr.h b/include/odp/api/spec/traffic_mngr.h
index 71198bbdd..3a748cef7 100644
--- a/include/odp/api/spec/traffic_mngr.h
+++ b/include/odp/api/spec/traffic_mngr.h
@@ -471,9 +471,10 @@ typedef enum {
typedef struct {
odp_tm_egress_kind_t egress_kind; /**< Union discriminator */
+ /** Variant parameters for different TM outputs */
union {
- odp_pktio_t pktio;
- odp_tm_egress_fcn_t egress_fcn;
+ odp_pktio_t pktio; /**< Output to PktIO */
+ odp_tm_egress_fcn_t egress_fcn; /**< Output to user func */
};
} odp_tm_egress_t;