This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, api-next has been updated
via 540490ddf3a1b3da4b80ed15fc874ccdfc49b60c (commit)
via 56fd0a5135769bee1b7b841e7b8d1e391fba377f (commit)
from 0707c974ed19c859fb92778c35a2f92bf7cd9fc6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 540490ddf3a1b3da4b80ed15fc874ccdfc49b60c
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu May 4 15:55:57 2017 +0300
api: crypto: add AAD operation parameters
Authentication capabilities list supported AAD lengths
per algorithm, but application did not have means to select which
length is used. Also pointer to AAD is added, since it may be
constructed also outside of packet data.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index 76977204..1f83e819 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -375,6 +375,16 @@ 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_capa() for
+ * supported AAD lengths. */
+ uint32_t length;
+ } aad;
+
/** Data range to apply cipher */
odp_crypto_data_range_t cipher_range;
commit 56fd0a5135769bee1b7b841e7b8d1e391fba377f
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu May 4 15:55:56 2017 +0300
api: crypto: add digest length session parameter
Authentication capabilities list supported digest lengths
per algorithm, but application did not have means to select which
length is used.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index 181c0cc4..76977204 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -299,10 +299,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_capa() for supported key lengths.
*/
odp_crypto_key_t auth_key;
+ /** Authentication digest length in bytes
+ *
+ * Use odp_crypto_auth_capa() for supported digest lengths.
+ */
+ uint32_t auth_digest_len;
+
/** Async mode completion event queue
*
* When odp_crypto_operation() is asynchronous, the completion queue is
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/crypto.h | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, api-next has been updated
via 0707c974ed19c859fb92778c35a2f92bf7cd9fc6 (commit)
via 8e3a2c996b3bc212b82ddb779a1ea27ae5b13d83 (commit)
via a4a49d582128e0be434c3dbd99688708396396ad (commit)
via e4b3ebcfddacc605cca78fe123a985e478262d11 (commit)
from 467285f59991e0f28d22a50c99e56f07a4380b8d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0707c974ed19c859fb92778c35a2f92bf7cd9fc6
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Mar 30 16:58:56 2017 +0300
api: crypto: enforce deprecated API status
Used ODP_DEPRECATE() to control if deprecated API
definitions are visible in the API or not.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index d30f050f..181c0cc4 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -15,6 +15,8 @@
#define ODP_API_CRYPTO_H_
#include <odp/visibility_begin.h>
+#include <odp/api/deprecated.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -82,10 +84,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;
@@ -127,13 +129,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;
/**
@@ -158,10 +161,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
@@ -196,13 +200,14 @@ typedef union odp_crypto_auth_algos_t {
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
@@ -317,7 +322,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
@@ -373,7 +378,7 @@ typedef struct odp_crypto_op_param_t {
} 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/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 06707555..a0f3f7e2 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -566,12 +566,13 @@ int odp_crypto_capability(odp_crypto_capability_t *capa)
capa->auths.bit.sha512_hmac = 0;
capa->auths.bit.aes_gcm = 1;
- /* Deprecated */
+#if ODP_DEPRECATED_API
capa->ciphers.bit.aes128_cbc = 1;
capa->ciphers.bit.aes128_gcm = 1;
capa->auths.bit.md5_96 = 1;
capa->auths.bit.sha256_128 = 1;
capa->auths.bit.aes128_gcm = 1;
+#endif
capa->max_sessions = MAX_SESSIONS;
@@ -662,6 +663,7 @@ odp_crypto_session_create(odp_crypto_session_param_t *param,
{
int rc;
odp_crypto_generic_session_t *session;
+ int aes_gcm = 0;
/* Default to successful result */
*status = ODP_CRYPTO_SES_CREATE_ERR_NONE;
@@ -704,17 +706,21 @@ odp_crypto_session_create(odp_crypto_session_param_t *param,
rc = process_des_param(session);
break;
case ODP_CIPHER_ALG_AES_CBC:
- /* deprecated */
+#if ODP_DEPRECATED_API
case ODP_CIPHER_ALG_AES128_CBC:
+#endif
rc = process_aes_param(session);
break;
- case ODP_CIPHER_ALG_AES_GCM:
- /* deprecated */
+#if ODP_DEPRECATED_API
case ODP_CIPHER_ALG_AES128_GCM:
+ if (param->auth_alg == ODP_AUTH_ALG_AES128_GCM)
+ aes_gcm = 1;
+ /* Fallthrough */
+#endif
+ case ODP_CIPHER_ALG_AES_GCM:
/* AES-GCM requires to do both auth and
* cipher at the same time */
- if (param->auth_alg == ODP_AUTH_ALG_AES_GCM ||
- param->auth_alg == ODP_AUTH_ALG_AES128_GCM)
+ if (param->auth_alg == ODP_AUTH_ALG_AES_GCM || aes_gcm)
rc = process_aes_gcm_param(session);
else
rc = -1;
@@ -729,6 +735,8 @@ odp_crypto_session_create(odp_crypto_session_param_t *param,
return -1;
}
+ aes_gcm = 0;
+
/* Process based on auth */
switch (param->auth_alg) {
case ODP_AUTH_ALG_NULL:
@@ -736,22 +744,27 @@ odp_crypto_session_create(odp_crypto_session_param_t *param,
rc = 0;
break;
case ODP_AUTH_ALG_MD5_HMAC:
- /* deprecated */
+#if ODP_DEPRECATED_API
case ODP_AUTH_ALG_MD5_96:
+#endif
rc = process_auth_param(session, 96, 16, EVP_md5());
break;
case ODP_AUTH_ALG_SHA256_HMAC:
- /* deprecated */
+#if ODP_DEPRECATED_API
case ODP_AUTH_ALG_SHA256_128:
+#endif
rc = process_auth_param(session, 128, 32, EVP_sha256());
break;
- case ODP_AUTH_ALG_AES_GCM:
- /* deprecated */
+#if ODP_DEPRECATED_API
case ODP_AUTH_ALG_AES128_GCM:
+ if (param->cipher_alg == ODP_CIPHER_ALG_AES128_GCM)
+ aes_gcm = 1;
+ /* Fallthrough */
+#endif
+ case ODP_AUTH_ALG_AES_GCM:
/* AES-GCM requires to do both auth and
* cipher at the same time */
- if (param->cipher_alg == ODP_CIPHER_ALG_AES_GCM ||
- param->cipher_alg == ODP_CIPHER_ALG_AES128_GCM) {
+ if (param->cipher_alg == ODP_CIPHER_ALG_AES_GCM || aes_gcm) {
session->auth.func = null_crypto_routine;
rc = 0;
} else {
@@ -776,10 +789,14 @@ odp_crypto_session_create(odp_crypto_session_param_t *param,
int odp_crypto_session_destroy(odp_crypto_session_t session)
{
odp_crypto_generic_session_t *generic;
+ int aes_gcm = 0;
generic = (odp_crypto_generic_session_t *)(intptr_t)session;
- if (generic->p.cipher_alg == ODP_CIPHER_ALG_AES128_GCM ||
- generic->p.cipher_alg == ODP_CIPHER_ALG_AES_GCM)
+#if ODP_DEPRECATED_API
+ if (generic->p.cipher_alg == ODP_CIPHER_ALG_AES128_GCM)
+ aes_gcm = 1;
+#endif
+ if (generic->p.cipher_alg == ODP_CIPHER_ALG_AES_GCM || aes_gcm)
EVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx);
memset(generic, 0, sizeof(*generic));
free_session(generic);
commit 8e3a2c996b3bc212b82ddb779a1ea27ae5b13d83
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Mar 30 16:58:55 2017 +0300
test: crypto: remove references to deprecated crypto apis
Remove last remaining references to deprecated API definitions.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/example/ipsec/odp_ipsec_misc.h b/example/ipsec/odp_ipsec_misc.h
index e0320eb4..45cb022e 100644
--- a/example/ipsec/odp_ipsec_misc.h
+++ b/example/ipsec/odp_ipsec_misc.h
@@ -98,10 +98,10 @@ int parse_key_string(char *keystring,
key->length = key_bits_in / 8;
} else {
- if ((alg->u.auth == ODP_AUTH_ALG_MD5_96) &&
+ if ((alg->u.auth == ODP_AUTH_ALG_MD5_HMAC) &&
(KEY_BITS_MD5_96 == key_bits_in))
key->length = key_bits_in / 8;
- else if ((alg->u.auth == ODP_AUTH_ALG_SHA256_128) &&
+ else if ((alg->u.auth == ODP_AUTH_ALG_SHA256_HMAC) &&
(KEY_BITS_SHA256_128 == key_bits_in))
key->length = key_bits_in / 8;
}
diff --git a/example/ipsec/odp_ipsec_sa_db.c b/example/ipsec/odp_ipsec_sa_db.c
index 28215b5b..10bbcb8f 100644
--- a/example/ipsec/odp_ipsec_sa_db.c
+++ b/example/ipsec/odp_ipsec_sa_db.c
@@ -111,11 +111,11 @@ int create_sa_db_entry(char *input, odp_bool_t cipher)
} else {
if (0 == strcmp(token, "md5")) {
entry->alg.u.auth =
- ODP_AUTH_ALG_MD5_96;
+ ODP_AUTH_ALG_MD5_HMAC;
entry->icv_len = 12;
} else if (!strcmp(token, "sha256")) {
entry->alg.u.auth =
- ODP_AUTH_ALG_SHA256_128;
+ ODP_AUTH_ALG_SHA256_HMAC;
entry->icv_len = 16;
} else {
entry->alg.u.auth = ODP_AUTH_ALG_NULL;
diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c
index b9576ae2..e37fbee2 100644
--- a/example/ipsec/odp_ipsec_stream.c
+++ b/example/ipsec/odp_ipsec_stream.c
@@ -227,8 +227,8 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
/* AH (if specified) */
if (entry && (entry == stream->input.entry) &&
(ODP_AUTH_ALG_NULL != entry->ah.alg)) {
- if (entry->ah.alg != ODP_AUTH_ALG_MD5_96 &&
- entry->ah.alg != ODP_AUTH_ALG_SHA256_128)
+ if (entry->ah.alg != ODP_AUTH_ALG_MD5_HMAC &&
+ entry->ah.alg != ODP_AUTH_ALG_SHA256_HMAC)
abort();
ah = (odph_ahhdr_t *)data;
@@ -424,7 +424,7 @@ odp_bool_t verify_ipv4_packet(stream_db_entry_t *stream,
return FALSE;
if (odp_be_to_cpu_32(ah->spi) != entry->ah.spi)
return FALSE;
- if (ODP_AUTH_ALG_MD5_96 != entry->ah.alg)
+ if (ODP_AUTH_ALG_MD5_HMAC != entry->ah.alg)
abort();
} else {
if (entry && (ODP_AUTH_ALG_NULL != entry->ah.alg))
diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c
index 954bdb79..b3857973 100644
--- a/test/common_plat/performance/odp_crypto.c
+++ b/test/common_plat/performance/odp_crypto.c
@@ -205,7 +205,7 @@ static crypto_alg_config_t algs_config[] = {
.data = test_iv,
.length = 8,
},
- .auth_alg = ODP_AUTH_ALG_MD5_96,
+ .auth_alg = ODP_AUTH_ALG_MD5_HMAC,
.auth_key = {
.data = test_key16,
.length = sizeof(test_key16)
@@ -217,7 +217,7 @@ static crypto_alg_config_t algs_config[] = {
.name = "null-hmac-md5-96",
.session = {
.cipher_alg = ODP_CIPHER_ALG_NULL,
- .auth_alg = ODP_AUTH_ALG_MD5_96,
+ .auth_alg = ODP_AUTH_ALG_MD5_HMAC,
.auth_key = {
.data = test_key16,
.length = sizeof(test_key16)
commit a4a49d582128e0be434c3dbd99688708396396ad
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Mar 30 16:58:54 2017 +0300
api: deprecated: add configure option and macros
Added configuration option --enable-deprecated to control if
deprecated APIs are enabled or disabled.
Added ODP_DEPRECATED_API macro into the API. Its value can be
used to check if deprecated API definitions are enabled or
disabled. Deprecated APIs are disabled by default. Deprecated
APIs are meant to be removed completely in a later API version.
Added ODP_DEPRECATE() macro to enforce deprecation of API
definitions. When deprecated APIs are disabled, the macro renames
API definitions so that application cannot use those any more,
but a single implementation library can serve applications built
with both options.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/configure.ac b/configure.ac
index 38129030..63e72713 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,8 @@ ODP_VERSION_API_MAJOR=odpapi_major_version
AC_SUBST(ODP_VERSION_API_MAJOR)
ODP_VERSION_API_MINOR=odpapi_minor_version
AC_SUBST(ODP_VERSION_API_MINOR)
-AC_CONFIG_FILES([include/odp/api/spec/version.h])
+AC_CONFIG_FILES([include/odp/api/spec/version.h
+ include/odp/api/spec/deprecated.h])
AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects])
AC_CONFIG_SRCDIR([helper/config.h.in])
@@ -284,7 +285,7 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
ODP_ABI_COMPAT=1
abi_compat=yes
AC_ARG_ENABLE([abi-compat],
- [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files],
+ [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files],
[if test "x$enableval" = "xno"; then
ODP_ABI_COMPAT=0
abi_compat=no
@@ -294,6 +295,19 @@ AC_ARG_ENABLE([abi-compat],
AC_SUBST(ODP_ABI_COMPAT)
##########################################################################
+# Enable/disable deprecated API definitions
+##########################################################################
+ODP_DEPRECATED_API=0
+deprecated=no
+AC_ARG_ENABLE([deprecated],
+ [ --enable-deprecated enable deprecated API definitions],
+ [if test "x$enableval" = "xyes"; then
+ ODP_DEPRECATED_API=1
+ deprecated=yes
+ fi])
+AC_SUBST(ODP_DEPRECATED_API)
+
+##########################################################################
# Default warning setup
##########################################################################
ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes"
@@ -381,6 +395,7 @@ AC_MSG_RESULT([
static libraries: ${enable_static}
shared libraries: ${enable_shared}
ABI compatible: ${abi_compat}
+ Deprecated APIs: ${deprecated}
cunit: ${cunit_support}
test_vald: ${test_vald}
test_perf: ${test_perf}
diff --git a/doc/application-api-guide/api_guide_lines.dox b/doc/application-api-guide/api_guide_lines.dox
index 394e9582..a6488c32 100644
--- a/doc/application-api-guide/api_guide_lines.dox
+++ b/doc/application-api-guide/api_guide_lines.dox
@@ -75,7 +75,7 @@ The former is a compile-time assertion and hence adds no additional path length.
The latter is controlled by the ODP_NO_DEBUG compile-time switch and so is suitable for use in development/debug builds that can be compiled out for production use.
Other mechanisms available to the implementer are:
- ODP_ABORT() is provided for situations where further execution of the code must not occur and a level of tracing information should be left in the log.
- - ODP_DEPRECATED() is used to signify that a call is planned for obsolescence.
+ - ODP_DEPRECATE() is used to signify that a call is planned for obsolescence.
- ODP_LOG() is used to direct implementation messages to the application.
@@ -197,8 +197,8 @@ This is one of the reasons why some features MAY be defined as OPTIONAL.
While allowed, the proliferation of OPTIONAL features SHOULD be avoided to enable broad application portability across many implementations.
At the same time, a "least common denominator" approach MUST NOT be taken as that defeats the purpose of providing higher-level abstractions in APIs.
-@subsection odp_deprecated ODP DEPRECATED
-A deprecated API will remain marked as such in the public API using #ODP_DEPRECATED for two release cycles for the #ODP_VERSION_API_MAJOR number.
+@subsection odp_deprecate ODP DEPRECATE
+A deprecated API will remain marked as such in the public API using #ODP_DEPRECATE() for two release cycles for the #ODP_VERSION_API_MAJOR number.
For example an API marked as deprecated in 1.1.0 will still be present in 1.2.0 and removed in 1.3.0.
A deprecated API will contain the doxygen tag \@deprecated with a description of the reason for the change.
diff --git a/doc/platform-api-guide/Doxyfile b/doc/platform-api-guide/Doxyfile
index fbe7c936..1f2d49a4 100644
--- a/doc/platform-api-guide/Doxyfile
+++ b/doc/platform-api-guide/Doxyfile
@@ -17,4 +17,5 @@ PREDEFINED = __GNUC__ \
__LITTLE_ENDIAN_BITFIELD \
__x86_64__ \
ODP_PACKED \
+ ODP_DEPRECATE(x)=x \
"ODP_HANDLE_T(type)=odp_handle_t type"
diff --git a/doc/process-guide/release-guide.adoc b/doc/process-guide/release-guide.adoc
index 8ea147af..595af91a 100644
--- a/doc/process-guide/release-guide.adoc
+++ b/doc/process-guide/release-guide.adoc
@@ -251,7 +251,7 @@ Deleting or changing the published API follows the normal <<anchor-1,process>>,
* A deprecated indication is applied to the old API using the @deprecated
doxygen syntax.
* For a function change the old API it is additionally marked using the
-ODP_DEPRECATED preprocessor macro.
+ODP_DEPRECATE() preprocessor macro.
* The CHANGELOG will have an entry in the API change section.
* The Release Manager will resolve the duration for which the deprecated API.
will be supported, and determine which future release it will be applied to. +
@@ -275,7 +275,7 @@ The new API must have comparable coverage to the old API.
*
* @param name ...
*/
-odp_foo_t odp_foo_create(const char *name) ODP_DEPRECATED;
+odp_foo_t ODP_DEPRECATE(odp_foo_create)(const char *name);
/**
* Create a bar
@@ -298,7 +298,7 @@ compiler warning.
*
* @param name ...
*/
-odp_foo_t odp_foo_create(const char *name) ODP_DEPRECATED;
+odp_foo_t ODP_DEPRECATE(odp_foo_create)(const char *name);
----
=== Changing a struct member
diff --git a/include/odp/api/spec/.gitignore b/include/odp/api/spec/.gitignore
index 67020331..df9c87d9 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/deprecated.h.in b/include/odp/api/spec/deprecated.h.in
new file mode 100644
index 00000000..224f60ff
--- /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.h b/include/odp_api.h
index e3ffcb1e..8146e024 100644
--- a/include/odp_api.h
+++ b/include/odp_api.h
@@ -18,6 +18,7 @@
extern "C" {
#endif
+#include <odp/api/deprecated.h>
#include <odp/api/version.h>
#include <odp/api/std_types.h>
#include <odp/api/compiler.h>
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index c5b17b57..3d609aa7 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -29,6 +29,7 @@ odpapispecinclude_HEADERS = \
$(top_srcdir)/include/odp/api/spec/cpumask.h \
$(top_srcdir)/include/odp/api/spec/crypto.h \
$(top_srcdir)/include/odp/api/spec/debug.h \
+ $(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/support.h \
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 834a58e6..79f0e70c 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -35,6 +35,7 @@ odpapiinclude_HEADERS = \
$(srcdir)/include/odp/api/cpumask.h \
$(srcdir)/include/odp/api/crypto.h \
$(srcdir)/include/odp/api/debug.h \
+ $(srcdir)/include/odp/api/deprecated.h \
$(srcdir)/include/odp/api/errno.h \
$(srcdir)/include/odp/api/event.h \
$(srcdir)/include/odp/api/support.h \
diff --git a/platform/linux-generic/include/odp/api/deprecated.h b/platform/linux-generic/include/odp/api/deprecated.h
new file mode 100644
index 00000000..82797ebc
--- /dev/null
+++ b/platform/linux-generic/include/odp/api/deprecated.h
@@ -0,0 +1,26 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Control deprecated API definitions
+ */
+
+#ifndef ODP_PLAT_DEPRECATED_H_
+#define ODP_PLAT_DEPRECATED_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/spec/deprecated.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
commit e4b3ebcfddacc605cca78fe123a985e478262d11
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Mar 30 16:58:53 2017 +0300
api: hints: remove ODP_DEPRECATED from API
Remove ODP_DEPRECATED macro as it depends on (GCC) compiler type
attribute, which may not be supported (the same way) by all
compilers. Also the attribute works only for types, but not e.g.
for fields of structure.
A new configuration option will be added to control deprecated
definitions.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/hints.h b/include/odp/api/spec/hints.h
index 82400f07..7434c6a5 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)
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 19 +++++++-
doc/application-api-guide/api_guide_lines.dox | 6 +--
doc/platform-api-guide/Doxyfile | 1 +
doc/process-guide/release-guide.adoc | 6 +--
example/ipsec/odp_ipsec_misc.h | 4 +-
example/ipsec/odp_ipsec_sa_db.c | 4 +-
example/ipsec/odp_ipsec_stream.c | 6 +--
include/odp/api/spec/.gitignore | 1 +
include/odp/api/spec/crypto.h | 29 +++++++------
include/odp/api/spec/deprecated.h.in | 50 ++++++++++++++++++++++
include/odp/api/spec/hints.h | 6 ---
include/odp_api.h | 1 +
platform/Makefile.inc | 1 +
platform/linux-generic/Makefile.am | 1 +
.../{odp_errno_define.h => odp/api/deprecated.h} | 8 ++--
platform/linux-generic/odp_crypto.c | 45 +++++++++++++------
test/common_plat/performance/odp_crypto.c | 4 +-
17 files changed, 139 insertions(+), 53 deletions(-)
create mode 100644 include/odp/api/spec/deprecated.h.in
copy platform/linux-generic/include/{odp_errno_define.h => odp/api/deprecated.h} (60%)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 79ba737a404d2833ad33d8f84ed6ce82c9a8c18e (commit)
from a6ce9a4b1c70506a9d178d53b9c5daff92477d46 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 79ba737a404d2833ad33d8f84ed6ce82c9a8c18e
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Wed Apr 12 14:41:14 2017 -0500
example: l3fwd: check rc from odph_eth_addr_parse()
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2779 by checking
the return code from odph_eth_addr_parse() and failing the call if
dst_mac is unparseable.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/example/l3fwd/odp_l3fwd_db.c b/example/l3fwd/odp_l3fwd_db.c
index 082b2c27..0670aa45 100644
--- a/example/l3fwd/odp_l3fwd_db.c
+++ b/example/l3fwd/odp_l3fwd_db.c
@@ -394,7 +394,10 @@ int create_fwd_db_entry(char *input, char **oif, uint8_t **dst_mac)
*oif = entry->oif;
break;
case 2:
- odph_eth_addr_parse(&entry->dst_mac, token);
+ if (odph_eth_addr_parse(&entry->dst_mac, token) < 0) {
+ free(local);
+ return -1;
+ }
*dst_mac = entry->dst_mac.addr;
break;
-----------------------------------------------------------------------
Summary of changes:
example/l3fwd/odp_l3fwd_db.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via a6ce9a4b1c70506a9d178d53b9c5daff92477d46 (commit)
from f05a0abd5386dc953b8a3eb30b6f6b8937be08cc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a6ce9a4b1c70506a9d178d53b9c5daff92477d46
Author: Brian Brooks <brian.brooks(a)arm.com>
Date: Fri Apr 21 13:52:41 2017 -0500
.gitignore: add perf.data
Signed-off-by: Brian Brooks <brian.brooks(a)arm.com>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/.gitignore b/.gitignore
index fbc0eab9..cce24282 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,6 +39,7 @@ libtool
ltmain.sh
m4/*.m4
missing
+perf.data*
pkgconfig/libodp*.pc
tags
test-driver
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
1 file changed, 1 insertion(+)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via f05a0abd5386dc953b8a3eb30b6f6b8937be08cc (commit)
from 2520efadae74322d9a61c7e306246518a8396b6f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f05a0abd5386dc953b8a3eb30b6f6b8937be08cc
Author: Janne Kajovuori <janne.kajovuori(a)nokia.com>
Date: Fri Apr 28 10:29:39 2017 +0300
linux-generic: makefile: fix staged install support
install-data-hook tries to create the symlink with incorrect paths
when a staged install is performed with "make DESTDIR=<path> install".
This issue can be fixed by prepending the paths with $(DESTDIR), which
provides correct path to the staging area.
Signed-off-by: Janne Kajovuori <janne.kajovuori(a)nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 54529151..69fdf8b9 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -226,9 +226,9 @@ endif
# Create symlink for ABI header files. Application does not need to use the arch
# specific include path for installed files.
install-data-hook:
- if [ -h $(prefix)/include/odp/api/abi ]; then \
+ if [ -h $(DESTDIR)$(prefix)/include/odp/api/abi ]; then \
: ; \
else \
- $(LN_S) -rf $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \
- $(prefix)/include/odp/api/abi; \
+ $(LN_S) -rf $(DESTDIR)$(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \
+ $(DESTDIR)$(prefix)/include/odp/api/abi; \
fi
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/Makefile.am | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, api-next has been updated
via 4702cbf3b3aaa62c7f5438526164a314c86e7d37 (commit)
from fce704f34f8af56d8c63b9e77c9a4f7a590655b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4702cbf3b3aaa62c7f5438526164a314c86e7d37
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Fri Apr 28 15:09:48 2017 +0300
api: time: remove odp_time_to_u64 from API
Debug function that converts odp_time_t to u64 is unnecessary
since odp_time_to_ns() returns time as a u64 (nsec) value.
Application can always use that as the 64 bit representation
of an odp_time_t value. Also validation tests for odp_time_to_u64()
were erroneous since those compared returned u64 values and
expected greater/lesser than relation.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/time.h b/include/odp/api/spec/time.h
index fcc94c98..29175eb5 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/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c
index 81e05224..0e5966c0 100644
--- a/platform/linux-generic/odp_time.c
+++ b/platform/linux-generic/odp_time.c
@@ -176,21 +176,6 @@ void odp_time_wait_until(odp_time_t time)
return time_wait_until(time);
}
-uint64_t odp_time_to_u64(odp_time_t time)
-{
- int ret;
- struct timespec tres;
- uint64_t resolution;
-
- ret = clock_getres(CLOCK_MONOTONIC_RAW, &tres);
- if (odp_unlikely(ret != 0))
- ODP_ABORT("clock_getres failed\n");
-
- resolution = (uint64_t)tres.tv_nsec;
-
- return time_to_ns(time) / resolution;
-}
-
int odp_time_init_global(void)
{
int ret;
diff --git a/test/common_plat/validation/api/time/time.c b/test/common_plat/validation/api/time/time.c
index 530d5c07..df65c719 100644
--- a/test/common_plat/validation/api/time/time.c
+++ b/test/common_plat/validation/api/time/time.c
@@ -398,41 +398,6 @@ void time_test_wait_ns(void)
}
}
-static void time_test_to_u64(time_cb time)
-{
- volatile int count = 0;
- uint64_t val1, val2;
- odp_time_t t1, t2;
-
- t1 = time();
-
- val1 = odp_time_to_u64(t1);
- CU_ASSERT(val1 > 0);
-
- while (count < BUSY_LOOP_CNT) {
- count++;
- };
-
- t2 = time();
- val2 = odp_time_to_u64(t2);
- CU_ASSERT(val2 > 0);
-
- CU_ASSERT(val2 > val1);
-
- val1 = odp_time_to_u64(ODP_TIME_NULL);
- CU_ASSERT(val1 == 0);
-}
-
-void time_test_local_to_u64(void)
-{
- time_test_to_u64(odp_time_local);
-}
-
-void time_test_global_to_u64(void)
-{
- time_test_to_u64(odp_time_global);
-}
-
odp_testinfo_t time_suite_time[] = {
ODP_TEST_INFO(time_test_constants),
ODP_TEST_INFO(time_test_local_res),
@@ -443,14 +408,12 @@ odp_testinfo_t time_suite_time[] = {
ODP_TEST_INFO(time_test_local_sum),
ODP_TEST_INFO(time_test_local_wait_until),
ODP_TEST_INFO(time_test_wait_ns),
- ODP_TEST_INFO(time_test_local_to_u64),
ODP_TEST_INFO(time_test_global_res),
ODP_TEST_INFO(time_test_global_conversion),
ODP_TEST_INFO(time_test_global_cmp),
ODP_TEST_INFO(time_test_global_diff),
ODP_TEST_INFO(time_test_global_sum),
ODP_TEST_INFO(time_test_global_wait_until),
- ODP_TEST_INFO(time_test_global_to_u64),
ODP_TEST_INFO_NULL
};
diff --git a/test/common_plat/validation/api/time/time.h b/test/common_plat/validation/api/time/time.h
index e5132a49..10956294 100644
--- a/test/common_plat/validation/api/time/time.h
+++ b/test/common_plat/validation/api/time/time.h
@@ -24,8 +24,6 @@ void time_test_global_sum(void);
void time_test_local_wait_until(void);
void time_test_global_wait_until(void);
void time_test_wait_ns(void);
-void time_test_local_to_u64(void);
-void time_test_global_to_u64(void);
void time_test_monotony(void);
/* test arrays: */
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/time.h | 13 ----------
platform/linux-generic/odp_time.c | 15 ------------
test/common_plat/validation/api/time/time.c | 37 -----------------------------
test/common_plat/validation/api/time/time.h | 2 --
4 files changed, 67 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 2520efadae74322d9a61c7e306246518a8396b6f (commit)
from b33b8ed7ca7c0f66f9c63155dd7e59ecaf7ea75e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2520efadae74322d9a61c7e306246518a8396b6f
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Thu Apr 27 14:29:54 2017 +0300
linux-gen: pktio: fix valgrind warnings
Fix valgrind warnings about syscall params pointing to uninitialised bytes.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/pktio/ethtool.c b/platform/linux-generic/pktio/ethtool.c
index 1b0f25b2..d8f9e12c 100644
--- a/platform/linux-generic/pktio/ethtool.c
+++ b/platform/linux-generic/pktio/ethtool.c
@@ -158,6 +158,7 @@ int ethtool_stats_get_fd(int fd, const char *name, odp_pktio_stats_t *stats)
{
struct ifreq ifr;
+ memset(&ifr, 0, sizeof(ifr));
snprintf(ifr.ifr_name, IF_NAMESIZE, "%s", name);
return ethtool_stats(fd, &ifr, stats);
diff --git a/platform/linux-generic/pktio/socket.c b/platform/linux-generic/pktio/socket.c
index 7d239686..a08b0104 100644
--- a/platform/linux-generic/pktio/socket.c
+++ b/platform/linux-generic/pktio/socket.c
@@ -234,6 +234,7 @@ static inline int get_rss_hash_options(int fd, const char *name,
struct ifreq ifr;
struct ethtool_rxnfc rsscmd;
+ memset(&ifr, 0, sizeof(ifr));
memset(&rsscmd, 0, sizeof(rsscmd));
*options = 0;
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/pktio/ethtool.c | 1 +
platform/linux-generic/pktio/socket.c | 1 +
2 files changed, 2 insertions(+)
hooks/post-receive
--