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 521c2ffc2116a1d2b15160e4546ff600b210c02d (commit) via 38c3db98e7aa2f7460e1c35a48ae744690c2c9da (commit) via 26c85617f0d325932a0487e12e36e2e2d624e641 (commit) via c45586b31cbada9f0c7ee9b894cecad85a056c7a (commit) via b64a3320751ebe0270f79ede2e9447ad49d28291 (commit) via 33c264a3959cd1f40623920575f0aa72e74cc245 (commit) via 9ac9778707a77ad908af955ca6ce94f4d706fbaa (commit) from 3d2977c972cb3ba13c544d8ef9174852a1613b86 (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 521c2ffc2116a1d2b15160e4546ff600b210c02d Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Jan 3 17:02:08 2020 +0200
api: increment version number to 1.23.2
Increment API version number to reflect addition of ODP_VERSION_API, ODP_VERSION_API_NUM and ODP_CACHE_LINE_ROUNDUP macros.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/configure.ac b/configure.ac index 030edb5e8..c715e4358 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_PREREQ([2.5]) ########################################################################## m4_define([odpapi_generation_version], [1]) m4_define([odpapi_major_version], [23]) -m4_define([odpapi_minor_version], [1]) +m4_define([odpapi_minor_version], [2]) m4_define([odpapi_point_version], [0]) m4_define([odpapi_version], [odpapi_generation_version.odpapi_major_version.odpapi_minor_version.odpapi_point_version])
commit 38c3db98e7aa2f7460e1c35a48ae744690c2c9da Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Jan 3 17:00:20 2020 +0200
validation: system: add test for ODP_CACHE_LINE_ROUNDUP
Added validation test for the new API macro.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/system/system.c b/test/validation/api/system/system.c index 0a2a656b0..ed5949ec3 100644 --- a/test/validation/api/system/system.c +++ b/test/validation/api/system/system.c @@ -206,6 +206,13 @@ static void system_test_odp_sys_cache_line_size(void) cache_size = odp_sys_cache_line_size(); CU_ASSERT(0 < cache_size); CU_ASSERT(ODP_CACHE_LINE_SIZE == cache_size); + + CU_ASSERT(ODP_CACHE_LINE_ROUNDUP(0) == 0); + CU_ASSERT(ODP_CACHE_LINE_ROUNDUP(1) == ODP_CACHE_LINE_SIZE); + CU_ASSERT(ODP_CACHE_LINE_ROUNDUP(ODP_CACHE_LINE_SIZE) == + ODP_CACHE_LINE_SIZE); + CU_ASSERT(ODP_CACHE_LINE_ROUNDUP(ODP_CACHE_LINE_SIZE + 1) == + 2 * ODP_CACHE_LINE_SIZE); }
static void system_test_odp_cpu_model_str(void)
commit 26c85617f0d325932a0487e12e36e2e2d624e641 Author: Petri Savolainen petri.savolainen@nokia.com Date: Tue Jan 7 15:54:31 2020 +0200
linux-gen: align: implement ODP_CACHE_LINE_ROUNDUP
Implement the new ODP_CACHE_LINE_ROUNDUP macro
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/include/odp/api/abi-default/align.h b/include/odp/api/abi-default/align.h index c1150febe..b3bbed199 100644 --- a/include/odp/api/abi-default/align.h +++ b/include/odp/api/abi-default/align.h @@ -45,6 +45,9 @@ extern "C" {
#define ODP_ALIGNED_PAGE ODP_ALIGNED(ODP_PAGE_SIZE)
+#define ODP_CACHE_LINE_ROUNDUP(x) \ +((ODP_CACHE_LINE_SIZE) * (((x) + (ODP_CACHE_LINE_SIZE) - 1) / (ODP_CACHE_LINE_SIZE))) + /** * @} */
commit c45586b31cbada9f0c7ee9b894cecad85a056c7a Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Jan 3 16:52:47 2020 +0200
api: align: add cache line size round up macro
Added macro for rounding up a value to the next multiple of cache line size. This round up is needed e.g. when selecting buffer sizes so that false sharing is avoided.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/include/odp/api/spec/align.h b/include/odp/api/spec/align.h index 6e4ef0cd2..99f8f1db0 100644 --- a/include/odp/api/spec/align.h +++ b/include/odp/api/spec/align.h @@ -48,12 +48,12 @@ extern "C" {
/** * @def ODP_CACHE_LINE_SIZE - * Cache line size + * Cache line size in bytes */
/** * @def ODP_PAGE_SIZE - * Page size + * Page size in bytes */
/** @@ -66,6 +66,15 @@ extern "C" { * Defines type/struct/variable to be page size aligned */
+/** + * @def ODP_CACHE_LINE_ROUNDUP + * Round up to cache line size + * + * Rounds up the passed value to the next multiple of cache line size + * (ODP_CACHE_LINE_SIZE). Returns the original value if it is already + * a multiple of cache line size or zero. + */ + /** * @} */
commit b64a3320751ebe0270f79ede2e9447ad49d28291 Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Jan 3 16:26:41 2020 +0200
validation: system: add version macro test
Added a test case for the new API version macros.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/system/system.c b/test/validation/api/system/system.c index 4183468d6..0a2a656b0 100644 --- a/test/validation/api/system/system.c +++ b/test/validation/api/system/system.c @@ -51,6 +51,28 @@ static void test_version_str(void) printf("%s\n\n", odp_version_impl_str()); }
+static void test_version_macro(void) +{ + CU_ASSERT(ODP_VERSION_API_NUM(0, 0, 0) < ODP_VERSION_API_NUM(0, 0, 1)); + CU_ASSERT(ODP_VERSION_API_NUM(0, 0, 1) < ODP_VERSION_API_NUM(0, 1, 0)); + CU_ASSERT(ODP_VERSION_API_NUM(0, 1, 0) < ODP_VERSION_API_NUM(1, 0, 0)); + CU_ASSERT(ODP_VERSION_API_NUM(1, 90, 0) < + ODP_VERSION_API_NUM(1, 90, 1)); + + CU_ASSERT(ODP_VERSION_API_NUM(ODP_VERSION_API_GENERATION, + ODP_VERSION_API_MAJOR, + ODP_VERSION_API_MINOR) == + ODP_VERSION_API); + + CU_ASSERT(ODP_VERSION_API_NUM(ODP_VERSION_API_GENERATION, + ODP_VERSION_API_MAJOR, 0) <= + ODP_VERSION_API); + + CU_ASSERT(ODP_VERSION_API_NUM(ODP_VERSION_API_GENERATION, + ODP_VERSION_API_MAJOR + 1, 0) > + ODP_VERSION_API); +} + static void system_test_odp_cpu_count(void) { int cpus; @@ -349,6 +371,7 @@ static void system_test_info_print(void) odp_testinfo_t system_suite[] = { ODP_TEST_INFO(test_version_api_str), ODP_TEST_INFO(test_version_str), + ODP_TEST_INFO(test_version_macro), ODP_TEST_INFO(system_test_odp_cpu_count), ODP_TEST_INFO(system_test_odp_sys_cache_line_size), ODP_TEST_INFO(system_test_odp_cpu_model_str),
commit 33c264a3959cd1f40623920575f0aa72e74cc245 Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Jan 3 15:43:06 2020 +0200
validation: system: call version string functions
Call version string functions and print strings to log.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/test/validation/api/system/system.c b/test/validation/api/system/system.c index 090999457..4183468d6 100644 --- a/test/validation/api/system/system.c +++ b/test/validation/api/system/system.c @@ -17,7 +17,7 @@ #define GIGA_HZ 1000000000ULL #define KILO_HZ 1000ULL
-static void system_test_odp_version_numbers(void) +static void test_version_api_str(void) { int char_ok = 0; char version_string[128]; @@ -39,6 +39,18 @@ static void system_test_odp_version_numbers(void) CU_ASSERT(char_ok); }
+static void test_version_str(void) +{ + printf("\nAPI version:\n"); + printf("%s\n\n", odp_version_api_str()); + + printf("Implementation name:\n"); + printf("%s\n\n", odp_version_impl_name()); + + printf("Implementation details:\n"); + printf("%s\n\n", odp_version_impl_str()); +} + static void system_test_odp_cpu_count(void) { int cpus; @@ -335,7 +347,8 @@ static void system_test_info_print(void) }
odp_testinfo_t system_suite[] = { - ODP_TEST_INFO(system_test_odp_version_numbers), + ODP_TEST_INFO(test_version_api_str), + ODP_TEST_INFO(test_version_str), ODP_TEST_INFO(system_test_odp_cpu_count), ODP_TEST_INFO(system_test_odp_sys_cache_line_size), ODP_TEST_INFO(system_test_odp_cpu_model_str),
commit 9ac9778707a77ad908af955ca6ce94f4d706fbaa Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Jan 3 15:21:29 2020 +0200
api: version: add API version comparison macro
Added macro and version number define for easier comparison of API version numbers.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Stanislaw Kardach skardach@marvell.com
diff --git a/include/odp/api/spec/version.h.in b/include/odp/api/spec/version.h.in index 4c3cbfee8..21a5f9a77 100644 --- a/include/odp/api/spec/version.h.in +++ b/include/odp/api/spec/version.h.in @@ -1,4 +1,5 @@ /* Copyright (c) 2013-2018, Linaro Limited + * Copyright (c) 2020, Nokia * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -55,6 +56,23 @@ extern "C" { */ #define ODP_VERSION_API_MINOR @ODP_VERSION_API_MINOR@
+/** + * ODP API version number macro + * + * Macro to build a version number for comparisons + */ +#define ODP_VERSION_API_NUM(gen, ma, mi) ((gen) << 24 | (ma) << 16 | (mi) << 8) + +/** + * ODP API version number + * + * API version number for comparisons against ODP_VERSION_API_NUM() + * macro output. + */ +#define ODP_VERSION_API ODP_VERSION_API_NUM(ODP_VERSION_API_GENERATION, \ + ODP_VERSION_API_MAJOR, \ + ODP_VERSION_API_MINOR) + /** * ODP API version string *
-----------------------------------------------------------------------
Summary of changes: configure.ac | 2 +- include/odp/api/abi-default/align.h | 3 +++ include/odp/api/spec/align.h | 13 ++++++++-- include/odp/api/spec/version.h.in | 18 ++++++++++++++ test/validation/api/system/system.c | 47 +++++++++++++++++++++++++++++++++++-- 5 files changed, 78 insertions(+), 5 deletions(-)
hooks/post-receive