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 bd583923b29e5dddc4d1b9c6d0e0a513edb69496 (commit)
from 79ba737a404d2833ad33d8f84ed6ce82c9a8c18e (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 bd583923b29e5dddc4d1b9c6d0e0a513edb69496
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Fri May 5 15:49:56 2017 +0300
helper: tables: avoid invalid odp_shm_addr() calls
odp_shm_lookup() return value can be used to detect name conflicts.
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/helper/hashtable.c b/helper/hashtable.c
index 9d411444..f26b18b2 100644
--- a/helper/hashtable.c
+++ b/helper/hashtable.c
@@ -76,8 +76,7 @@ odph_table_t odph_hash_table_create(const char *name, uint32_t capacity,
ODPH_DBG("create para input error!\n");
return NULL;
}
- tbl = (odph_hash_table_imp *)odp_shm_addr(odp_shm_lookup(name));
- if (tbl != NULL) {
+ if (odp_shm_lookup(name) != ODP_SHM_INVALID) {
ODPH_DBG("name already exist\n");
return NULL;
}
diff --git a/helper/lineartable.c b/helper/lineartable.c
index 32c4956e..dd4a5995 100644
--- a/helper/lineartable.c
+++ b/helper/lineartable.c
@@ -55,8 +55,7 @@ odph_table_t odph_linear_table_create(const char *name, uint32_t capacity,
return NULL;
}
/* check name confict in shm*/
- tbl = (odph_linear_table_imp *)odp_shm_addr(odp_shm_lookup(name));
- if (tbl != NULL) {
+ if (odp_shm_lookup(name) != ODP_SHM_INVALID) {
ODPH_DBG("name already exist\n");
return NULL;
}
-----------------------------------------------------------------------
Summary of changes:
helper/hashtable.c | 3 +--
helper/lineartable.c | 3 +--
2 files changed, 2 insertions(+), 4 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 900dd9e2d3d2ae751ab2bc4e11dbd48ea7ed7030 (commit)
via 15ba8d1e557073921f8fa2cf5eb1e7673052526f (commit)
from 1d01a8cb56618aa062740a2e9ad13898c7aa5a38 (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 900dd9e2d3d2ae751ab2bc4e11dbd48ea7ed7030
Author: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Date: Thu May 11 00:00:05 2017 +0300
api: ipsec: split INLINE capability into in and out pair
Unlike SYNC/ASYNC operation modes, it well might be that the
implementation provides only INLINE support only for inbound or outbound
packets. Let's split the capability into two new caps.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index f55afe93..9a7404c9 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -241,8 +241,17 @@ typedef struct odp_ipsec_capability_t {
*/
odp_support_t op_mode_async;
- /** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support */
- odp_support_t op_mode_inline;
+ /**
+ * Inline inbound IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE)
+ * support
+ */
+ odp_support_t op_mode_inline_in;
+
+ /**
+ * Inline outgoing IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE)
+ * support
+ */
+ odp_support_t op_mode_inline_out;
/** IP Authenticated Header (ODP_IPSEC_AH) support */
odp_support_t proto_ah;
commit 15ba8d1e557073921f8fa2cf5eb1e7673052526f
Author: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Date: Thu May 11 00:00:04 2017 +0300
api: ipsec: add AH capability
RFC4301 marks AH support as MAY instead of MUST. Some platforms might
skip implementing AH. Thus we should provide capability to allow
applications to check if AH is actually implemented or not.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 59737e63..f55afe93 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -244,6 +244,9 @@ typedef struct odp_ipsec_capability_t {
/** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support */
odp_support_t op_mode_inline;
+ /** IP Authenticated Header (ODP_IPSEC_AH) support */
+ odp_support_t proto_ah;
+
/**
* Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of
* resulting inbound packets
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/ipsec.h | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 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 1d01a8cb56618aa062740a2e9ad13898c7aa5a38 (commit)
from 3ea9c1dac34e0fb4785b0d643056c731daa55e85 (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 1d01a8cb56618aa062740a2e9ad13898c7aa5a38
Author: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Date: Thu May 11 01:00:10 2017 +0300
api: ipsec: mark odp_ipsec_sa_create argument as constant
odp_ipsec_sa_create() should not change its argument. Thus mark it as a
constant.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index e83494d3..59737e63 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -773,7 +773,7 @@ void odp_ipsec_sa_param_init(odp_ipsec_sa_param_t *param);
*
* @see odp_ipsec_sa_param_init()
*/
-odp_ipsec_sa_t odp_ipsec_sa_create(odp_ipsec_sa_param_t *param);
+odp_ipsec_sa_t odp_ipsec_sa_create(const odp_ipsec_sa_param_t *param);
/**
* Disable IPSEC SA
diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c
index 5eb1be30..10918dfb 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -52,7 +52,7 @@ void odp_ipsec_sa_param_init(odp_ipsec_sa_param_t *param)
memset(param, 0, sizeof(odp_ipsec_sa_param_t));
}
-odp_ipsec_sa_t odp_ipsec_sa_create(odp_ipsec_sa_param_t *param)
+odp_ipsec_sa_t odp_ipsec_sa_create(const odp_ipsec_sa_param_t *param)
{
(void)param;
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/ipsec.h | 2 +-
platform/linux-generic/odp_ipsec.c | 2 +-
2 files changed, 2 insertions(+), 2 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 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
--