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 cd097450cbf9d7bb6cd24654f8d43ceade5b114a (commit)
from ee5be324411a7520528a367967c28fc529d3bc2e (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 cd097450cbf9d7bb6cd24654f8d43ceade5b114a
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Mon Jun 26 13:24:28 2017 +0300
test: l2fwd: list not used features
List not used features so that performance may be optimized
on some platforms. E.g. on odp-linux implementation, timer
polling causes high overhead, which is disabled when timers
are not used.
Signed-off-by: Petri Savolainen <petri.savolainen(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/test/common_plat/performance/odp_l2fwd.c b/test/common_plat/performance/odp_l2fwd.c
index 78b3633b..851614d6 100644
--- a/test/common_plat/performance/odp_l2fwd.c
+++ b/test/common_plat/performance/odp_l2fwd.c
@@ -1387,9 +1387,19 @@ int main(int argc, char *argv[])
odp_instance_t instance;
int num_groups;
odp_schedule_group_t group[MAX_PKTIOS];
+ odp_init_t init;
+
+ odp_init_param_init(&init);
+
+ /* List features not to be used (may optimize performance) */
+ init.not_used.feat.cls = 1;
+ init.not_used.feat.crypto = 1;
+ init.not_used.feat.ipsec = 1;
+ init.not_used.feat.timer = 1;
+ init.not_used.feat.tm = 1;
/* Init ODP before calling anything else */
- if (odp_init_global(&instance, NULL, NULL)) {
+ if (odp_init_global(&instance, &init, NULL)) {
LOG_ERR("Error: ODP global init failed.\n");
exit(EXIT_FAILURE);
}
-----------------------------------------------------------------------
Summary of changes:
test/common_plat/performance/odp_l2fwd.c | 12 +++++++++++-
1 file changed, 11 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 5a2ed3eefb1a263139282c376741adb2c355bd5a (commit)
from 2541e8688750f2a045aff3dbf544868be3ebf787 (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 5a2ed3eefb1a263139282c376741adb2c355bd5a
Author: Nikhil Agarwal <nikhil.agarwal(a)linaro.org>
Date: Wed Jun 28 11:41:50 2017 +0530
test:queue:update order queue test for locks.
Order queue test should reserve ordered locks only if
ordered locks count is more than 1.
Signed-off-by: Nikhil Agarwal <nikhil.agarwal(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/test/common_plat/validation/api/queue/queue.c b/test/common_plat/validation/api/queue/queue.c
index 6a13c006..f08d811f 100644
--- a/test/common_plat/validation/api/queue/queue.c
+++ b/test/common_plat/validation/api/queue/queue.c
@@ -262,6 +262,7 @@ void queue_test_info(void)
const char *const nq_order = "test_q_order";
odp_queue_info_t info;
odp_queue_param_t param;
+ odp_queue_capability_t capability;
char q_plain_ctx[] = "test_q_plain context data";
char q_order_ctx[] = "test_q_order context data";
unsigned lock_count;
@@ -274,13 +275,18 @@ void queue_test_info(void)
CU_ASSERT(odp_queue_context_set(q_plain, q_plain_ctx,
sizeof(q_plain_ctx)) == 0);
+ memset(&capability, 0, sizeof(odp_queue_capability_t));
+ CU_ASSERT(odp_queue_capability(&capability) == 0);
/* Create a scheduled ordered queue with explicitly set params */
odp_queue_param_init(¶m);
param.type = ODP_QUEUE_TYPE_SCHED;
param.sched.prio = ODP_SCHED_PRIO_NORMAL;
param.sched.sync = ODP_SCHED_SYNC_ORDERED;
param.sched.group = ODP_SCHED_GROUP_ALL;
- param.sched.lock_count = 1;
+ if (capability.max_ordered_locks)
+ param.sched.lock_count = 1;
+ else
+ param.sched.lock_count = 0;
param.context = q_order_ctx;
q_order = odp_queue_create(nq_order, ¶m);
CU_ASSERT(ODP_QUEUE_INVALID != q_order);
-----------------------------------------------------------------------
Summary of changes:
test/common_plat/validation/api/queue/queue.c | 8 +++++++-
1 file changed, 7 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 b668182d6ea0cb942c2cf43771c618c9457bf146 (commit)
via eb564bfb6f813ec3f2fe8a8d4ce0da25220b4215 (commit)
via 8fea9ff7d8fde984981e681f49133dbda8429b7f (commit)
from 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6 (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 b668182d6ea0cb942c2cf43771c618c9457bf146
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Wed Jul 5 17:23:19 2017 +0300
validation: system_info: add test for odp_sys_huge_page_size_all()
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/common_plat/validation/api/system/system.c b/test/common_plat/validation/api/system/system.c
index 5b7ca01a..4dfac550 100644
--- a/test/common_plat/validation/api/system/system.c
+++ b/test/common_plat/validation/api/system/system.c
@@ -13,6 +13,7 @@
#define DIFF_TRY_NUM 160
#define RES_TRY_NUM 10
+#define PAGESZ_NUM 10
void system_test_odp_version_numbers(void)
{
@@ -214,6 +215,25 @@ void system_test_odp_sys_huge_page_size(void)
CU_ASSERT(0 < page);
}
+void system_test_odp_sys_huge_page_size_all(void)
+{
+ uint64_t pagesz_tbs[PAGESZ_NUM];
+ uint64_t prev_pagesz = 0;
+ int num;
+ int i;
+
+ num = odp_sys_huge_page_size_all(NULL, 0);
+ CU_ASSERT(num >= 0);
+
+ num = odp_sys_huge_page_size_all(pagesz_tbs, PAGESZ_NUM);
+ CU_ASSERT(num >= 0);
+ for (i = 0; i < num && i < PAGESZ_NUM; i++) {
+ CU_ASSERT(pagesz_tbs[i] > 0);
+ CU_ASSERT(pagesz_tbs[i] > prev_pagesz);
+ prev_pagesz = pagesz_tbs[i];
+ }
+}
+
int system_check_odp_cpu_hz(void)
{
if (odp_cpu_hz() == 0) {
@@ -316,6 +336,7 @@ odp_testinfo_t system_suite[] = {
ODP_TEST_INFO(system_test_odp_cpu_model_str_id),
ODP_TEST_INFO(system_test_odp_sys_page_size),
ODP_TEST_INFO(system_test_odp_sys_huge_page_size),
+ ODP_TEST_INFO(system_test_odp_sys_huge_page_size_all),
ODP_TEST_INFO_CONDITIONAL(system_test_odp_cpu_hz,
system_check_odp_cpu_hz),
ODP_TEST_INFO_CONDITIONAL(system_test_odp_cpu_hz_id,
diff --git a/test/common_plat/validation/api/system/system.h b/test/common_plat/validation/api/system/system.h
index c33729b9..0ea72dcd 100644
--- a/test/common_plat/validation/api/system/system.h
+++ b/test/common_plat/validation/api/system/system.h
@@ -20,6 +20,7 @@ void system_test_odp_cpu_model_str(void);
void system_test_odp_cpu_model_str_id(void);
void system_test_odp_sys_page_size(void);
void system_test_odp_sys_huge_page_size(void);
+void system_test_odp_sys_huge_page_size_all(void);
int system_check_odp_cpu_hz(void);
void system_test_odp_cpu_hz(void);
int system_check_odp_cpu_hz_id(void);
commit eb564bfb6f813ec3f2fe8a8d4ce0da25220b4215
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Wed Jul 5 17:23:18 2017 +0300
linux-gen: system_info: implement odp_sys_huge_page_size_all()
Directory /sys/kernel/mm/hugepages contains subdirectories for all huge
page sizes supported by the running kernel. Loop through the contents of
this directory to find the supported huge page sizes.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-and-tested-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_system_info.c b/platform/linux-generic/odp_system_info.c
index 40ffca07..0495fb06 100644
--- a/platform/linux-generic/odp_system_info.c
+++ b/platform/linux-generic/odp_system_info.c
@@ -379,6 +379,42 @@ uint64_t odp_sys_huge_page_size(void)
return odp_global_data.hugepage_info.default_huge_page_size;
}
+static int pagesz_compare(const void *pagesz1, const void *pagesz2)
+{
+ return (*(const uint64_t *)pagesz1 - *(const uint64_t *)pagesz2);
+}
+
+int odp_sys_huge_page_size_all(uint64_t size[], int num)
+{
+ DIR *dir;
+ struct dirent *entry;
+ int pagesz_num = 0;
+ int saved = 0;
+
+ /* See: kernel.org: hugetlbpage.txt */
+ dir = opendir("/sys/kernel/mm/hugepages");
+ if (!dir) {
+ ODP_ERR("Failed to open huge page directory\n");
+ return -1;
+ }
+
+ while ((entry = readdir(dir)) != NULL) {
+ unsigned long sz;
+
+ if (sscanf(entry->d_name, "hugepages-%8lukB", &sz) == 1) {
+ if (size != NULL && saved < num)
+ size[saved++] = sz * 1024;
+ pagesz_num++;
+ }
+ }
+ closedir(dir);
+
+ if (size != NULL && saved > 1)
+ qsort(size, saved, sizeof(uint64_t), pagesz_compare);
+
+ return pagesz_num;
+}
+
uint64_t odp_sys_page_size(void)
{
return odp_global_data.system_info.page_size;
commit 8fea9ff7d8fde984981e681f49133dbda8429b7f
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Wed Jul 5 17:23:17 2017 +0300
api: system_info: add function for fetching all supported huge page sizes
A system may simultaneously support multiple huge page sizes. Add a new API
function odp_sys_huge_page_size_all() which returns all supported page
sizes. odp_sys_huge_page_size() stays unmodified to maintain backward
compatibility.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
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/system_info.h b/include/odp/api/spec/system_info.h
index ca4dcdc7..140db7b4 100644
--- a/include/odp/api/spec/system_info.h
+++ b/include/odp/api/spec/system_info.h
@@ -27,10 +27,29 @@ extern "C" {
* Default system huge page size in bytes
*
* @return Default huge page size in bytes
+ * @retval 0 on no huge pages
*/
uint64_t odp_sys_huge_page_size(void);
/**
+ * System huge page sizes in bytes
+ *
+ * Returns the number of huge page sizes supported by the system. Outputs up to
+ * 'num' sizes when the 'size' array pointer is not NULL. If return value is
+ * larger than 'num', there are more supported sizes than the function was
+ * allowed to output. If return value (N) is less than 'num', only sizes
+ * [0 ... N-1] have been written. Returned values are ordered from smallest to
+ * largest.
+ *
+ * @param[out] size Points to an array of huge page sizes for output
+ * @param num Maximum number of huge page sizes to output
+ *
+ * @return Number of supported huge page sizes
+ * @retval <0 on failure
+ */
+int odp_sys_huge_page_size_all(uint64_t size[], int num);
+
+/**
* Page size in bytes
*
* @return Page size in bytes
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/system_info.h | 19 +++++++++++++
platform/linux-generic/odp_system_info.c | 36 +++++++++++++++++++++++++
test/common_plat/validation/api/system/system.c | 21 +++++++++++++++
test/common_plat/validation/api/system/system.h | 1 +
4 files changed, 77 insertions(+)
hooks/post-receive
--