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 26e0820a7bc833239a8a66bc15d2eab5fd3edb87 (commit) via 22c01aac0d2ff868a02a20d394e4c763b1093ec1 (commit) via cbe195a283c703d84eceaa38e81bc305627074c1 (commit) via 6f7d32d9fa1ff48f3907f8ae9c9d61d02c1e5eee (commit) via 66e87bb0ae69813a7d69a0a357347ebe60f99aba (commit) from 4f87885fe0d7301cc8ff7da6d925c18a09e7e6be (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 26e0820a7bc833239a8a66bc15d2eab5fd3edb87 Author: Christophe Milard christophe.milard@linaro.org Date: Wed Dec 21 12:11:33 2016 +0100
test: shm: checking exported vs imported block length
Checking that the block size returned by odp_shm_info() matches the exported block length.
Signed-off-by: Christophe Milard christophe.milard@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/linux-generic/validation/api/shmem/shmem_odp2.c b/test/linux-generic/validation/api/shmem/shmem_odp2.c index e39dc76..7d8c682 100644 --- a/test/linux-generic/validation/api/shmem/shmem_odp2.c +++ b/test/linux-generic/validation/api/shmem/shmem_odp2.c @@ -28,6 +28,7 @@ int main(int argc, char *argv[]) odp_instance_t odp1; odp_instance_t odp2; odp_shm_t shm; + odp_shm_info_t info; test_shared_data_t *test_shared_data;
/* odp init: */ @@ -59,6 +60,13 @@ int main(int argc, char *argv[]) return 1; }
+ /* check that the read size matches the allocated size (in other ODP):*/ + if ((odp_shm_info(shm, &info)) || + (info.size != sizeof(*test_shared_data))) { + fprintf(stderr, "error: odp_shm_info failed.\n"); + return 1; + } + test_shared_data = odp_shm_addr(shm); if (test_shared_data == NULL) { fprintf(stderr, "error: odp_shm_addr failed.\n");
commit 22c01aac0d2ff868a02a20d394e4c763b1093ec1 Author: Christophe Milard christophe.milard@linaro.org Date: Wed Dec 21 12:11:32 2016 +0100
linux-gen: _ishm: exporting/importing user len and flags
The size of the shared memory and its user flag set, as given at reserve time, are exported and imported so that odp_shm_info() return proper values on imported blocks
Signed-off-by: Christophe Milard christophe.milard@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index 33ef731..8b54be2 100644 --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@ -125,7 +125,9 @@ #define EXPORT_FILE_LINE3_FMT "file: %s" #define EXPORT_FILE_LINE4_FMT "length: %" PRIu64 #define EXPORT_FILE_LINE5_FMT "flags: %" PRIu32 -#define EXPORT_FILE_LINE6_FMT "align: %" PRIu32 +#define EXPORT_FILE_LINE6_FMT "user_length: %" PRIu64 +#define EXPORT_FILE_LINE7_FMT "user_flags: %" PRIu32 +#define EXPORT_FILE_LINE8_FMT "align: %" PRIu32 /* * A fragment describes a piece of the shared virtual address space, * and is allocated only when allocation is done with the _ODP_ISHM_SINGLE_VA @@ -481,7 +483,11 @@ static int create_file(int block_index, huge_flag_t huge, uint64_t len, new_block->filename); fprintf(export_file, EXPORT_FILE_LINE4_FMT "\n", len); fprintf(export_file, EXPORT_FILE_LINE5_FMT "\n", flags); - fprintf(export_file, EXPORT_FILE_LINE6_FMT "\n", align); + fprintf(export_file, EXPORT_FILE_LINE6_FMT "\n", + new_block->user_len); + fprintf(export_file, EXPORT_FILE_LINE7_FMT "\n", + new_block->user_flags); + fprintf(export_file, EXPORT_FILE_LINE8_FMT "\n", align);
fclose(export_file); } @@ -806,6 +812,10 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd, else new_block->name[0] = 0;
+ /* save user data: */ + new_block->user_flags = user_flags; + new_block->user_len = size; + /* If a file descriptor is provided, get the real size and map: */ if (fd >= 0) { fstat(fd, &statbuf); @@ -921,9 +931,11 @@ int _odp_ishm_find_exported(const char *remote_name, pid_t external_odp_pid, FILE *export_file; uint64_t len; uint32_t flags; + uint64_t user_len; + uint32_t user_flags; uint32_t align; int fd; - int ret; + int block_index;
/* try to read the block description file: */ snprintf(export_filename, ISHM_FILENAME_MAXLEN, @@ -953,7 +965,13 @@ int _odp_ishm_find_exported(const char *remote_name, pid_t external_odp_pid, if (fscanf(export_file, EXPORT_FILE_LINE5_FMT " ", &flags) != 1) goto error_exp_file;
- if (fscanf(export_file, EXPORT_FILE_LINE6_FMT " ", &align) != 1) + if (fscanf(export_file, EXPORT_FILE_LINE6_FMT " ", &user_len) != 1) + goto error_exp_file; + + if (fscanf(export_file, EXPORT_FILE_LINE7_FMT " ", &user_flags) != 1) + goto error_exp_file; + + if (fscanf(export_file, EXPORT_FILE_LINE8_FMT " ", &align) != 1) goto error_exp_file;
fclose(export_file); @@ -970,13 +988,17 @@ int _odp_ishm_find_exported(const char *remote_name, pid_t external_odp_pid, flags &= ~(uint32_t)_ODP_ISHM_EXPORT;
/* reserve the memory, providing the opened file descriptor: */ - ret = _odp_ishm_reserve(local_name, 0, fd, align, flags, 0); - if (ret < 0) { + block_index = _odp_ishm_reserve(local_name, 0, fd, align, flags, 0); + if (block_index < 0) { close(fd); - return ret; + return block_index; }
- return ret; + /* set inherited info: */ + ishm_tbl->block[block_index].user_flags = user_flags; + ishm_tbl->block[block_index].user_len = user_len; + + return block_index;
error_exp_file: fclose(export_file); diff --git a/test/linux-generic/validation/api/shmem/shmem_linux.c b/test/linux-generic/validation/api/shmem/shmem_linux.c index 39473f3..2f4c762 100644 --- a/test/linux-generic/validation/api/shmem/shmem_linux.c +++ b/test/linux-generic/validation/api/shmem/shmem_linux.c @@ -102,7 +102,8 @@ */ static int read_shmem_attribues(uint64_t ext_odp_pid, const char *blockname, char *filename, uint64_t *len, - uint32_t *flags, uint32_t *align) + uint32_t *flags, uint64_t *user_len, + uint32_t *user_flags, uint32_t *align) { char shm_attr_filename[PATH_MAX]; FILE *export_file; @@ -130,6 +131,12 @@ static int read_shmem_attribues(uint64_t ext_odp_pid, const char *blockname, if (fscanf(export_file, "flags: %" PRIu32 " ", flags) != 1) goto export_file_read_err;
+ if (fscanf(export_file, "user_length: %" PRIu64 " ", user_len) != 1) + goto export_file_read_err; + + if (fscanf(export_file, "user_flags: %" PRIu32 " ", user_flags) != 1) + goto export_file_read_err; + if (fscanf(export_file, "align: %" PRIu32 " ", align) != 1) goto export_file_read_err;
@@ -192,6 +199,8 @@ int main(int argc __attribute__((unused)), char *argv[]) char shm_filename[PATH_MAX];/* shared mem device name, under /dev/shm */ uint64_t len; uint32_t flags; + uint64_t user_len; + uint32_t user_flags; uint32_t align; int shm_fd; test_shared_linux_data_t *addr; @@ -231,7 +240,8 @@ int main(int argc __attribute__((unused)), char *argv[])
/* read the shared memory attributes (includes the shm filename): */ if (read_shmem_attribues(odp_app1, ODP_SHM_NAME, - shm_filename, &len, &flags, &align) != 0) + shm_filename, &len, &flags, + &user_len, &user_flags, &align) != 0) test_failure(fifo_name, fifo_fd, odp_app1);
/* open the shm filename (which is either on /tmp or on hugetlbfs)
commit cbe195a283c703d84eceaa38e81bc305627074c1 Author: Matias Elo matias.elo@nokia.com Date: Wed Dec 21 13:27:22 2016 +0200
validation: test creating pool and timer pool with no name
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/common_plat/validation/api/pool/pool.c b/test/common_plat/validation/api/pool/pool.c index d48ac2a..8687941 100644 --- a/test/common_plat/validation/api/pool/pool.c +++ b/test/common_plat/validation/api/pool/pool.c @@ -8,19 +8,14 @@ #include "odp_cunit_common.h" #include "pool.h"
-static int pool_name_number = 1; static const int default_buffer_size = 1500; static const int default_buffer_num = 1000;
static void pool_create_destroy(odp_pool_param_t *params) { odp_pool_t pool; - char pool_name[ODP_POOL_NAME_LEN];
- snprintf(pool_name, sizeof(pool_name), - "test_pool-%d", pool_name_number++); - - pool = odp_pool_create(pool_name, params); + pool = odp_pool_create(NULL, params); CU_ASSERT_FATAL(pool != ODP_POOL_INVALID); CU_ASSERT(odp_pool_to_u64(pool) != odp_pool_to_u64(ODP_POOL_INVALID)); diff --git a/test/common_plat/validation/api/timer/timer.c b/test/common_plat/validation/api/timer/timer.c index 0007639..1945afa 100644 --- a/test/common_plat/validation/api/timer/timer.c +++ b/test/common_plat/validation/api/timer/timer.c @@ -156,7 +156,7 @@ void timer_test_odp_timer_cancel(void) tparam.num_timers = 1; tparam.priv = 0; tparam.clk_src = ODP_CLOCK_CPU; - tp = odp_timer_pool_create("timer_pool0", &tparam); + tp = odp_timer_pool_create(NULL, &tparam); if (tp == ODP_TIMER_POOL_INVALID) CU_FAIL_FATAL("Timer pool create failed");
commit 6f7d32d9fa1ff48f3907f8ae9c9d61d02c1e5eee Author: Matias Elo matias.elo@nokia.com Date: Wed Dec 21 13:27:23 2016 +0200
api: move ODP_*_NAME_LEN definitions from API to implementation
Enables the implementations to choose the define values.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h index af2829b..c0de195 100644 --- a/include/odp/api/spec/pool.h +++ b/include/odp/api/spec/pool.h @@ -36,8 +36,10 @@ extern "C" { * Invalid pool */
-/** Maximum pool name length in chars including null char */ -#define ODP_POOL_NAME_LEN 32 +/** + * @def ODP_POOL_NAME_LEN + * Maximum pool name length in chars including null char + */
/** * Pool capabilities diff --git a/include/odp/api/spec/shared_memory.h b/include/odp/api/spec/shared_memory.h index 074c883..1a9c129 100644 --- a/include/odp/api/spec/shared_memory.h +++ b/include/odp/api/spec/shared_memory.h @@ -40,8 +40,10 @@ extern "C" { * Synonym for buffer pool use */
-/** Maximum shared memory block name length in chars including null char */ -#define ODP_SHM_NAME_LEN 32 +/** + * @def ODP_SHM_NAME_LEN + * Maximum shared memory block name length in chars including null char + */
/* * Shared memory flags: diff --git a/include/odp/api/spec/timer.h b/include/odp/api/spec/timer.h index 46a4369..75f9db9 100644 --- a/include/odp/api/spec/timer.h +++ b/include/odp/api/spec/timer.h @@ -90,8 +90,10 @@ typedef enum { ODP_TIMER_NOEVENT = -3 } odp_timer_set_t;
-/** Maximum timer pool name length in chars including null char */ -#define ODP_TIMER_POOL_NAME_LEN 32 +/** + * @def ODP_TIMER_POOL_NAME_LEN + * Maximum timer pool name length in chars including null char + */
/** Timer pool parameters * Timer pool parameters are used when creating and querying timer pools. diff --git a/platform/linux-generic/include/odp/api/plat/pool_types.h b/platform/linux-generic/include/odp/api/plat/pool_types.h index 4e39de5..6baff09 100644 --- a/platform/linux-generic/include/odp/api/plat/pool_types.h +++ b/platform/linux-generic/include/odp/api/plat/pool_types.h @@ -30,6 +30,8 @@ typedef ODP_HANDLE_T(odp_pool_t);
#define ODP_POOL_INVALID _odp_cast_scalar(odp_pool_t, 0xffffffff)
+#define ODP_POOL_NAME_LEN 32 + /** * Pool type */ diff --git a/platform/linux-generic/include/odp/api/plat/shared_memory_types.h b/platform/linux-generic/include/odp/api/plat/shared_memory_types.h index 4d8bbcc..afa0bf9 100644 --- a/platform/linux-generic/include/odp/api/plat/shared_memory_types.h +++ b/platform/linux-generic/include/odp/api/plat/shared_memory_types.h @@ -31,6 +31,8 @@ typedef ODP_HANDLE_T(odp_shm_t); #define ODP_SHM_INVALID _odp_cast_scalar(odp_shm_t, 0) #define ODP_SHM_NULL ODP_SHM_INVALID
+#define ODP_SHM_NAME_LEN 32 + /** Get printable format of odp_shm_t */ static inline uint64_t odp_shm_to_u64(odp_shm_t hdl) { diff --git a/platform/linux-generic/include/odp/api/plat/timer_types.h b/platform/linux-generic/include/odp/api/plat/timer_types.h index 68d6f6f..8821bed 100644 --- a/platform/linux-generic/include/odp/api/plat/timer_types.h +++ b/platform/linux-generic/include/odp/api/plat/timer_types.h @@ -30,6 +30,8 @@ typedef struct odp_timer_pool_s *odp_timer_pool_t;
#define ODP_TIMER_POOL_INVALID NULL
+#define ODP_TIMER_POOL_NAME_LEN 32 + typedef ODP_HANDLE_T(odp_timer_t);
#define ODP_TIMER_INVALID _odp_cast_scalar(odp_timer_t, 0xffffffff)
commit 66e87bb0ae69813a7d69a0a357347ebe60f99aba Author: Matias Elo matias.elo@nokia.com Date: Wed Dec 21 13:27:21 2016 +0200
api: unify ODP_*_NAME_LEN specifications
Unify name length definitions to always include terminating null character.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h index 0e442c7..0e1addd 100644 --- a/include/odp/api/spec/classification.h +++ b/include/odp/api/spec/classification.h @@ -44,7 +44,7 @@ extern "C" {
/** * @def ODP_COS_NAME_LEN - * Maximum ClassOfService name length in chars + * Maximum ClassOfService name length in chars including null char */
/** diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h index 041f4af..af2829b 100644 --- a/include/odp/api/spec/pool.h +++ b/include/odp/api/spec/pool.h @@ -36,7 +36,7 @@ extern "C" { * Invalid pool */
-/** Maximum queue name length in chars */ +/** Maximum pool name length in chars including null char */ #define ODP_POOL_NAME_LEN 32
/** diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index b0c5e31..7972fea 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -44,7 +44,7 @@ extern "C" {
/** * @def ODP_QUEUE_NAME_LEN - * Maximum queue name length in chars + * Maximum queue name length in chars including null char */
/** diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index f976a4c..8244746 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -42,7 +42,7 @@ extern "C" {
/** * @def ODP_SCHED_GROUP_NAME_LEN - * Maximum schedule group name length in chars + * Maximum schedule group name length in chars including null char */
/** diff --git a/include/odp/api/spec/shared_memory.h b/include/odp/api/spec/shared_memory.h index 885751d..074c883 100644 --- a/include/odp/api/spec/shared_memory.h +++ b/include/odp/api/spec/shared_memory.h @@ -40,7 +40,7 @@ extern "C" { * Synonym for buffer pool use */
-/** Maximum shared memory block name length in chars */ +/** Maximum shared memory block name length in chars including null char */ #define ODP_SHM_NAME_LEN 32
/* diff --git a/include/odp/api/spec/timer.h b/include/odp/api/spec/timer.h index 49221c4..46a4369 100644 --- a/include/odp/api/spec/timer.h +++ b/include/odp/api/spec/timer.h @@ -90,7 +90,7 @@ typedef enum { ODP_TIMER_NOEVENT = -3 } odp_timer_set_t;
-/** Maximum timer pool name length in chars (including null char) */ +/** Maximum timer pool name length in chars including null char */ #define ODP_TIMER_POOL_NAME_LEN 32
/** Timer pool parameters
-----------------------------------------------------------------------
Summary of changes: include/odp/api/spec/classification.h | 2 +- include/odp/api/spec/pool.h | 6 ++-- include/odp/api/spec/queue.h | 2 +- include/odp/api/spec/schedule.h | 2 +- include/odp/api/spec/shared_memory.h | 6 ++-- include/odp/api/spec/timer.h | 6 ++-- platform/linux-generic/_ishm.c | 38 +++++++++++++++++----- .../include/odp/api/plat/pool_types.h | 2 ++ .../include/odp/api/plat/shared_memory_types.h | 2 ++ .../include/odp/api/plat/timer_types.h | 2 ++ test/common_plat/validation/api/pool/pool.c | 7 +--- test/common_plat/validation/api/timer/timer.c | 2 +- .../validation/api/shmem/shmem_linux.c | 14 ++++++-- .../validation/api/shmem/shmem_odp2.c | 8 +++++ 14 files changed, 73 insertions(+), 26 deletions(-)
hooks/post-receive