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 23e46735f93fa6dfc02b3fe78000b137f3c2d983 (commit)
from df97183dd71b214df6da679bbaf795a66bae4fdc (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 23e46735f93fa6dfc02b3fe78000b137f3c2d983
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Thu Jan 12 16:45:35 2017 +0200
api: ipsec: packet transformation follows RFCs
Add explicit requirement that IPSEC in-/outbound operations
transform packet headers according to the standards (RFCs).
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Nikhil Agarwal <Nikhil.agarwal(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 255bb79..66222d8 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -726,9 +726,6 @@ typedef struct odp_ipsec_op_result_t {
* @see odp_packet_l3_offset(), odp_packet_l4_offset(),
* odp_packet_has_ipv4(), odp_packet_has_ipv6(),
* odp_packet_has_ipfrag(), odp_packet_has_ipsec()
- *
- * @note The amount and content of packet data before the IP header is
- * implementation specific.
*/
odp_packet_t *pkt;
@@ -770,6 +767,14 @@ typedef struct odp_ipsec_op_result_t {
* input 'pkt' array to output 'pkt' array. Packet order is not guaranteed
* between calling threads.
*
+ * Input packets must not be IP fragments.
+ *
+ * The operation does packet transformation according to IPSEC standards (see
+ * e.g. RFC 4302 and 4303). Resulting packets are well formed, reconstructed
+ * original IP packets, with IPSEC headers removed and valid header field values
+ * restored. The amount and content of packet data before the IP header is
+ * undefined.
+ *
* @param input Operation input parameters
* @param[out] output Operation results
*
@@ -804,6 +809,11 @@ int odp_ipsec_in(const odp_ipsec_op_param_t *input,
* input 'pkt' array to output 'pkt' array. Packet order is not guaranteed
* between calling threads.
*
+ * The operation does packet transformation according to IPSEC standards (see
+ * e.g. RFC 4302 and 4303). Resulting packets are well formed IP packets
+ * with IPSEC, etc headers constructed according to the standards. The amount
+ * and content of packet data before the IP header is undefined.
+ *
* @param input Operation input parameters
* @param[out] output Operation results
*
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/ipsec.h | 16 +++++++++++++---
1 file changed, 13 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, next has been updated
via f53fda91d2919eee33b5a177ef818be1092c890b (commit)
via 46e088c2f56d1463a598b4ac23308e19bf2b9031 (commit)
from 0b1dc8a9a69252ce56d13521284683faff0e3e35 (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 f53fda91d2919eee33b5a177ef818be1092c890b
Author: Christophe Milard <christophe.milard(a)linaro.org>
Date: Mon Jan 2 10:41:42 2017 +0100
linux-gen: init: avoiding segfault if cleaning files
The call the the cleanup_files() function (which cleans up possible
remaining file(s) from a defunc OPD with same pid) may use ODP_DBG and
ODP_ERR functions, but is (before this patch) placed before these ODP_*
functions are initialized.
This would surely sigfault.
The call the the cleanup_files() function is hence placed after ODP_DBG and
ODP_ERR function initialization to avoid this situation.
Signed-off-by: Christophe Milard <christophe.milard(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/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index 1b0d8f8..06c6143 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -73,7 +73,6 @@ int odp_init_global(odp_instance_t *instance,
memset(&odp_global_data, 0, sizeof(struct odp_global_data_s));
odp_global_data.main_pid = getpid();
- cleanup_files(_ODP_TMPDIR, odp_global_data.main_pid);
enum init_stage stage = NO_INIT;
odp_global_data.log_fn = odp_override_log;
@@ -86,6 +85,8 @@ int odp_init_global(odp_instance_t *instance,
odp_global_data.abort_fn = params->abort_fn;
}
+ cleanup_files(_ODP_TMPDIR, odp_global_data.main_pid);
+
if (odp_cpumask_init_global(params)) {
ODP_ERR("ODP cpumask init failed.\n");
goto init_failed;
commit 46e088c2f56d1463a598b4ac23308e19bf2b9031
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Mon Jan 9 09:24:02 2017 -0600
linux-generic: crypto: add openssl locking support for thread safety
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2798 by adding
OpenSSL callbacks for locking that use ticketlocks to provide
thread-safety for OpenSSL calls made by ODP components such as random
number generation.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Christophe Milard <christophe.milard(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 5808d16..4f17fd6 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -64,6 +64,7 @@ typedef struct odp_crypto_global_s odp_crypto_global_t;
struct odp_crypto_global_s {
odp_spinlock_t lock;
+ odp_ticketlock_t **openssl_lock;
odp_crypto_generic_session_t *free;
odp_crypto_generic_session_t sessions[0];
};
@@ -948,16 +949,35 @@ odp_crypto_operation(odp_crypto_op_param_t *param,
return 0;
}
+static unsigned long openssl_thread_id(void)
+{
+ return (unsigned long)odp_thread_id();
+}
+
+static void openssl_lock(int mode, int n,
+ const char *file ODP_UNUSED,
+ int line ODP_UNUSED)
+{
+ if (mode & CRYPTO_LOCK)
+ odp_ticketlock_lock((odp_ticketlock_t *)
+ &global->openssl_lock[n]);
+ else
+ odp_ticketlock_unlock((odp_ticketlock_t *)
+ &global->openssl_lock[n]);
+}
+
int
odp_crypto_init_global(void)
{
size_t mem_size;
odp_shm_t shm;
int idx;
+ int nlocks = CRYPTO_num_locks();
/* Calculate the memory size we need */
mem_size = sizeof(*global);
mem_size += (MAX_SESSIONS * sizeof(odp_crypto_generic_session_t));
+ mem_size += nlocks * sizeof(odp_ticketlock_t);
/* Allocate our globally shared memory */
shm = odp_shm_reserve("crypto_pool", mem_size,
@@ -975,6 +995,18 @@ odp_crypto_init_global(void)
}
odp_spinlock_init(&global->lock);
+ if (nlocks > 0) {
+ global->openssl_lock =
+ (odp_ticketlock_t **)&global->sessions[MAX_SESSIONS];
+
+ for (idx = 0; idx < nlocks; idx++)
+ odp_ticketlock_init((odp_ticketlock_t *)
+ &global->openssl_lock[idx]);
+
+ CRYPTO_set_id_callback(openssl_thread_id);
+ CRYPTO_set_locking_callback(openssl_lock);
+ }
+
return 0;
}
@@ -992,6 +1024,9 @@ int odp_crypto_term_global(void)
rc = -1;
}
+ CRYPTO_set_locking_callback(NULL);
+ CRYPTO_set_id_callback(NULL);
+
ret = odp_shm_free(odp_shm_lookup("crypto_pool"));
if (ret < 0) {
ODP_ERR("shm free failed for crypto_pool\n");
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_crypto.c | 35 +++++++++++++++++++++++++++++++++++
platform/linux-generic/odp_init.c | 3 ++-
2 files changed, 37 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 df97183dd71b214df6da679bbaf795a66bae4fdc (commit)
via b7da911ca3a7d3ed172f4e4010912ef920ddcf1f (commit)
from 9d65090ebcf45deb5677ffeb4aa2a26a96235dc5 (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 df97183dd71b214df6da679bbaf795a66bae4fdc
Author: Christophe Milard <christophe.milard(a)linaro.org>
Date: Mon Jan 2 10:41:42 2017 +0100
linux-gen: init: avoiding segfault if cleaning files
The call the the cleanup_files() function (which cleans up possible
remaining file(s) from a defunc OPD with same pid) may use ODP_DBG and
ODP_ERR functions, but is (before this patch) placed before these ODP_*
functions are initialized.
This would surely sigfault.
The call the the cleanup_files() function is hence placed after ODP_DBG and
ODP_ERR function initialization to avoid this situation.
Signed-off-by: Christophe Milard <christophe.milard(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/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index 1b0d8f8..06c6143 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -73,7 +73,6 @@ int odp_init_global(odp_instance_t *instance,
memset(&odp_global_data, 0, sizeof(struct odp_global_data_s));
odp_global_data.main_pid = getpid();
- cleanup_files(_ODP_TMPDIR, odp_global_data.main_pid);
enum init_stage stage = NO_INIT;
odp_global_data.log_fn = odp_override_log;
@@ -86,6 +85,8 @@ int odp_init_global(odp_instance_t *instance,
odp_global_data.abort_fn = params->abort_fn;
}
+ cleanup_files(_ODP_TMPDIR, odp_global_data.main_pid);
+
if (odp_cpumask_init_global(params)) {
ODP_ERR("ODP cpumask init failed.\n");
goto init_failed;
commit b7da911ca3a7d3ed172f4e4010912ef920ddcf1f
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Mon Jan 9 09:24:02 2017 -0600
linux-generic: crypto: add openssl locking support for thread safety
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2798 by adding
OpenSSL callbacks for locking that use ticketlocks to provide
thread-safety for OpenSSL calls made by ODP components such as random
number generation.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Christophe Milard <christophe.milard(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 5808d16..4f17fd6 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -64,6 +64,7 @@ typedef struct odp_crypto_global_s odp_crypto_global_t;
struct odp_crypto_global_s {
odp_spinlock_t lock;
+ odp_ticketlock_t **openssl_lock;
odp_crypto_generic_session_t *free;
odp_crypto_generic_session_t sessions[0];
};
@@ -948,16 +949,35 @@ odp_crypto_operation(odp_crypto_op_param_t *param,
return 0;
}
+static unsigned long openssl_thread_id(void)
+{
+ return (unsigned long)odp_thread_id();
+}
+
+static void openssl_lock(int mode, int n,
+ const char *file ODP_UNUSED,
+ int line ODP_UNUSED)
+{
+ if (mode & CRYPTO_LOCK)
+ odp_ticketlock_lock((odp_ticketlock_t *)
+ &global->openssl_lock[n]);
+ else
+ odp_ticketlock_unlock((odp_ticketlock_t *)
+ &global->openssl_lock[n]);
+}
+
int
odp_crypto_init_global(void)
{
size_t mem_size;
odp_shm_t shm;
int idx;
+ int nlocks = CRYPTO_num_locks();
/* Calculate the memory size we need */
mem_size = sizeof(*global);
mem_size += (MAX_SESSIONS * sizeof(odp_crypto_generic_session_t));
+ mem_size += nlocks * sizeof(odp_ticketlock_t);
/* Allocate our globally shared memory */
shm = odp_shm_reserve("crypto_pool", mem_size,
@@ -975,6 +995,18 @@ odp_crypto_init_global(void)
}
odp_spinlock_init(&global->lock);
+ if (nlocks > 0) {
+ global->openssl_lock =
+ (odp_ticketlock_t **)&global->sessions[MAX_SESSIONS];
+
+ for (idx = 0; idx < nlocks; idx++)
+ odp_ticketlock_init((odp_ticketlock_t *)
+ &global->openssl_lock[idx]);
+
+ CRYPTO_set_id_callback(openssl_thread_id);
+ CRYPTO_set_locking_callback(openssl_lock);
+ }
+
return 0;
}
@@ -992,6 +1024,9 @@ int odp_crypto_term_global(void)
rc = -1;
}
+ CRYPTO_set_locking_callback(NULL);
+ CRYPTO_set_id_callback(NULL);
+
ret = odp_shm_free(odp_shm_lookup("crypto_pool"));
if (ret < 0) {
ODP_ERR("shm free failed for crypto_pool\n");
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_crypto.c | 35 +++++++++++++++++++++++++++++++++++
platform/linux-generic/odp_init.c | 3 ++-
2 files changed, 37 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 c28c81745896d433262cc964d341f6e2d448c12f (commit)
from c10a2195b23c5ad230dad2ee252a96d1e418b5c7 (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 c28c81745896d433262cc964d341f6e2d448c12f
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Thu Jan 12 06:14:19 2017 -0600
linux-generic: packet: remove erroneous assert
odp_packet_set_len() is only called from the classifier on paths for
which a dummy header may be used. Rather than setting a dummy reference
count to validate, it's simpler to just delete the assert. This resolves
Bug https://bugs.linaro.org/show_bug.cgi?id=2814
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Christophe Milard <christophe.milard(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 607560d..c5dc989 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -324,8 +324,6 @@ static inline void packet_ref_count_set(odp_packet_hdr_t *pkt_hdr, uint32_t n)
static inline void packet_set_len(odp_packet_hdr_t *pkt_hdr, uint32_t len)
{
- ODP_ASSERT(packet_ref_count(pkt_hdr) == 1);
-
pkt_hdr->frame_len = len;
pkt_hdr->unshared_len = len;
}
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/include/odp_packet_internal.h | 2 --
1 file changed, 2 deletions(-)
hooks/post-receive
--