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 40cd2eb0ddb11d4880bf0cd19a2b661a9b42d398 (commit) via 2d76e64f9ca79b3efce87bd02d849d139a9f305a (commit) via 86b8f3d4371b3fd0ec09091b404b829f2e97730d (commit) via 0841edfc364b39fce8c1ed1cdbddecde1d98b42e (commit) via c7801718747a7bcaf377fd25cdd97582f8755b05 (commit) via fa9533ede03e40f0455c6d889997042f32235fc1 (commit) from 07a5a017f0178e9067aab7aeb9a9fc4152152f5c (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 40cd2eb0ddb11d4880bf0cd19a2b661a9b42d398 Author: Matias Elo matias.elo@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@nokia.com Reviewed-and-tested-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/api/system/system.c b/test/validation/api/system/system.c index 6873fcc4..a2749003 100644 --- a/test/validation/api/system/system.c +++ b/test/validation/api/system/system.c @@ -15,6 +15,7 @@
#define DIFF_TRY_NUM 160 #define RES_TRY_NUM 10 +#define PAGESZ_NUM 10
void system_test_odp_version_numbers(void) { @@ -216,6 +217,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) { @@ -318,6 +338,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/validation/api/system/system.h b/test/validation/api/system/system.h index c33729b9..0ea72dcd 100644 --- a/test/validation/api/system/system.h +++ b/test/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 2d76e64f9ca79b3efce87bd02d849d139a9f305a Author: Matias Elo matias.elo@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@nokia.com Reviewed-and-tested-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index 1303d793..3cbe1d3d 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -423,6 +423,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 86b8f3d4371b3fd0ec09091b404b829f2e97730d Author: Matias Elo matias.elo@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@nokia.com Reviewed-and-tested-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@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,9 +27,28 @@ 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 *
commit 0841edfc364b39fce8c1ed1cdbddecde1d98b42e Author: Brian Brooks brian.brooks@arm.com Date: Fri Jun 23 16:04:36 2017 -0500
test: odp_pktio_ordered: add queue size
Signed-off-by: Brian Brooks brian.brooks@arm.com Reviewed-and-tested-by: Yi He yi.he@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/performance/odp_pktio_ordered.c b/test/performance/odp_pktio_ordered.c index d7e43c4b..ed4e2e8e 100644 --- a/test/performance/odp_pktio_ordered.c +++ b/test/performance/odp_pktio_ordered.c @@ -93,6 +93,9 @@ /** Maximum number of pktio queues per interface */ #define MAX_QUEUES 32
+/** Seems to need at least 8192 elements per queue */ +#define QUEUE_SIZE 8192 + /** Maximum number of pktio interfaces */ #define MAX_PKTIOS 8
@@ -1222,6 +1225,7 @@ int main(int argc, char *argv[]) qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; qparam.sched.group = ODP_SCHED_GROUP_ALL; + qparam.size = QUEUE_SIZE;
gbl_args->flow_qcontext[i][j].idx = i; gbl_args->flow_qcontext[i][j].input_queue = 0;
commit c7801718747a7bcaf377fd25cdd97582f8755b05 Author: Bill Fischofer bill.fischofer@linaro.org Date: Tue Jun 13 07:55:15 2017 -0500
doc: userguide: add odp_init_global() documentation for unused features
Update User Guide startup section to include current parameters for odp_init_global() and odp_init_local() as well as optimization hints for unused features.
Signed-off-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc index 0d1e5eb7..0c7d3f77 100644 --- a/doc/users-guide/users-guide.adoc +++ b/doc/users-guide/users-guide.adoc @@ -558,20 +558,44 @@ calling the terminate functions should only be done when the application is sure it has closed the ingress and subsequently drained all queues, etc.
=== Startup -The first API that must be called by an ODP application is 'odp_init_global()'. +The first API that must be called by an ODP application is `odp_init_global()`: +[source,c] +----- +int odp_init_global(odp_instance_t *instance, + const odp_init_t *param, + const odp_platform_init_t *platform_param); +----- This takes two pointers. The first, `odp_init_t`, contains ODP initialization data that is platform independent and portable, while the second, `odp_platform_init_t`, is passed unparsed to the implementation to be used for platform specific data that is not yet, or may never be -suitable for the ODP API. +suitable for the ODP API. Each of these parameters is optional and may be +specified as NULL to accept the implementation-defined default initialization +values.
-Calling odp_init_global() establishes the ODP API framework and MUST be +Calling `odp_init_global()` establishes the ODP API framework and MUST be called before any other ODP API may be called. Note that it is only called -once per application. Following global initialization, each thread in turn +once per application. A successful call to `odp_init_global()` returns rc = 0 +and sets the `instance` variable supplied as input to the call to an handle +representing this unique ODP instance. + +The `odp_init_t` parameter is used to specify various customizations to the +ODP environment being established by this call. For example, the caller can +specify the maximum number of worker threads it will use, the thread masks +associated with these threads, as well as whether the default logging or +abort functions are to be overridden with an application-supplied handler. + +The application may also provide optimization hints to the ODP implementation +if it knows that it will never use specific ODP feature sets, such as the +packet classifier or traffic manager. Implementations may use such hints to +provide optimized behavior to applications that are known not to need these +features. + +Following global initialization, each thread in turn calls 'odp_init_local()'. This establishes the local ODP thread context for that thread and MUST be called before other ODP APIs may be -called by that thread. The sole argument to this call is the _thread type_, -which is either `ODP_THREAD_WORKER` or `ODP_THREAD_CONTROL`. +called by that thread. The sole argument to this call is the `instance` +variable returned by `odp_init_global()`.
=== Shutdown Shutdown is the logical reverse of the initialization procedure, with
commit fa9533ede03e40f0455c6d889997042f32235fc1 Author: Petri Savolainen petri.savolainen@linaro.org Date: Wed Feb 22 17:08:22 2017 +0200
abi: event: add ODP_EVENT_IPSEC_RESULT
Update ABI spec with the new IPSEC event type.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/arch/default/api/abi/event.h b/include/odp/arch/default/api/abi/event.h index fd86f25c..336938f5 100644 --- a/include/odp/arch/default/api/abi/event.h +++ b/include/odp/arch/default/api/abi/event.h @@ -28,7 +28,8 @@ typedef enum odp_event_type_t { ODP_EVENT_BUFFER = 1, ODP_EVENT_PACKET = 2, ODP_EVENT_TIMEOUT = 3, - ODP_EVENT_CRYPTO_COMPL = 4 + ODP_EVENT_CRYPTO_COMPL = 4, + ODP_EVENT_IPSEC_RESULT = 5 } odp_event_type_t;
/**
-----------------------------------------------------------------------
Summary of changes: doc/users-guide/users-guide.adoc | 36 ++++++++++++++++++++++++++------ include/odp/api/spec/system_info.h | 19 +++++++++++++++++ include/odp/arch/default/api/abi/event.h | 3 ++- platform/linux-generic/odp_system_info.c | 36 ++++++++++++++++++++++++++++++++ test/performance/odp_pktio_ordered.c | 4 ++++ test/validation/api/system/system.c | 21 +++++++++++++++++++ test/validation/api/system/system.h | 1 + 7 files changed, 113 insertions(+), 7 deletions(-)
hooks/post-receive