#
fd1bcb6c |
| 02-Oct-2024 |
Mattias Rönnblom <mattias.ronnblom@ericsson.com> |
test/service: reintroduce delay
Eliminate unreachable code and have dummy service function perform a short delay again, mimicking previous service core test behavior.
Coverity issue: 445158 Fixes:
test/service: reintroduce delay
Eliminate unreachable code and have dummy service function perform a short delay again, mimicking previous service core test behavior.
Coverity issue: 445158 Fixes: a37e053b2364 ("service: extend service function call statistics")
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
a37e053b |
| 09-Sep-2024 |
Mattias Rönnblom <mattias.ronnblom@ericsson.com> |
service: extend service function call statistics
Add two new per-service counters.
RTE_SERVICE_ATTR_IDLE_CALL_COUNT tracks the number of service function invocations where no work was performed.
R
service: extend service function call statistics
Add two new per-service counters.
RTE_SERVICE_ATTR_IDLE_CALL_COUNT tracks the number of service function invocations where no work was performed.
RTE_SERVICE_ATTR_ERROR_CALL_COUNT tracks the number invocations resulting in an error.
The semantics of RTE_SERVICE_ATTR_CALL_COUNT remains the same (i.e., counting all invocations, regardless of return value).
The new statistics may be useful for both debugging and profiling (e.g., calculate the average per-call processing latency for non-idle service calls).
Service core tests are extended to cover the new counters, and coverage for RTE_SERVICE_ATTR_CALL_COUNT is improved.
The documentation for the CYCLES attributes are updated to reflect their actual semantics.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
b6a7e685 |
| 14-May-2024 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
app: use stdatomic API
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.c
app: use stdatomic API
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
e0a8442c |
| 16-Aug-2023 |
Bruce Richardson <bruce.richardson@intel.com> |
test: tag tests type
Rather than having the test types called out in the meson.build file, we can use macros to identify the test type in the C file itself and then dynamically build up the tests li
test: tag tests type
Rather than having the test types called out in the meson.build file, we can use macros to identify the test type in the C file itself and then dynamically build up the tests lists at config time.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|
#
f9eb7a4b |
| 02-Mar-2023 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
use atomic intrinsics closer to C11
Use __atomic_fetch_{add,and,or,sub,xor} instead of __atomic_{add,and,or,sub,xor}_fetch when we have no interest in the result of the operation.
This change reduc
use atomic intrinsics closer to C11
Use __atomic_fetch_{add,and,or,sub,xor} instead of __atomic_{add,and,or,sub,xor}_fetch when we have no interest in the result of the operation.
This change reduces unnecessary code that provided the result of the atomic operation while this result was not used.
It also brings us to a closer alignment with atomics available in C11 standard and will reduce review effort when they are integrated.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Ruifeng Wang <ruifeng.wang@arm.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
5aa7769d |
| 03-Mar-2023 |
Harry van Haaren <harry.van.haaren@intel.com> |
test/service: split functional and performance tests
On some CI runs, some service-cores tests spuriously fail as the service lcore thread is not actually scheduled by the OS in the given amount of
test/service: split functional and performance tests
On some CI runs, some service-cores tests spuriously fail as the service lcore thread is not actually scheduled by the OS in the given amount of time.
Increasing timeouts has not resolved the issue in the CI, so the solution in this patch is to move them to a separate perf test suite.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
6caffbb3 |
| 06-Oct-2022 |
Harry van Haaren <harry.van.haaren@intel.com> |
test/service: fix spurious failures by extending timeout
This commit extends the timeout for service_may_be_active() from 100ms to 1000ms. Local testing on a idle and loaded system (compiling DPDK w
test/service: fix spurious failures by extending timeout
This commit extends the timeout for service_may_be_active() from 100ms to 1000ms. Local testing on a idle and loaded system (compiling DPDK with all cores) always completes after 1 ms.
The wait time for a service-lcore to finish is also extended from 100ms to 1000ms.
The same timeout waiting code was duplicated in two tests, and is now refactored to a standalone function avoiding duplication.
Reported-by: David Marchand <david.marchand@redhat.com> Suggested-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
show more ...
|
#
b54ade8f |
| 05-Oct-2022 |
Mattias Rönnblom <mattias.ronnblom@ericsson.com> |
service: introduce per-lcore cycles counter
Introduce a per-lcore counter for the total time spent on processing services on that core.
This counter is useful when measuring individual lcore load.
service: introduce per-lcore cycles counter
Introduce a per-lcore counter for the total time spent on processing services on that core.
This counter is useful when measuring individual lcore load.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
bb9d8226 |
| 11-Jul-2022 |
Harry van Haaren <harry.van.haaren@intel.com> |
test/service: add perf measurements with stats
This commit improves the performance reporting of the service cores polling loop to show both with and without statistics collection modes. Collecting
test/service: add perf measurements with stats
This commit improves the performance reporting of the service cores polling loop to show both with and without statistics collection modes. Collecting cycle statistics is costly, due to calls to rte_rdtsc() per service iteration.
Reported-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Suggested-by: Morten Brørup <mb@smartsharesystems.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
4a985f4e |
| 11-Oct-2021 |
David Marchand <david.marchand@redhat.com> |
test/service: fix race in attr check
The CI reported rare (and cryptic) failures like:
RTE>>service_autotest + ------------------------------------------------------- + + Test Suite : service cor
test/service: fix race in attr check
The CI reported rare (and cryptic) failures like:
RTE>>service_autotest + ------------------------------------------------------- + + Test Suite : service core test suite + ------------------------------------------------------- + + TestCase [ 0] : unregister_all succeeded + TestCase [ 1] : service_name succeeded + TestCase [ 2] : service_get_by_name succeeded Service dummy_service Summary dummy_service: stats 1 calls 0 cycles 0 avg: 0 Service dummy_service Summary dummy_service: stats 0 calls 0 cycles 0 avg: 0 + TestCase [ 3] : service_dump succeeded + TestCase [ 4] : service_attr_get failed + TestCase [ 5] : service_lcore_attr_get succeeded + TestCase [ 6] : service_probe_capability succeeded + TestCase [ 7] : service_start_stop succeeded + TestCase [ 8] : service_lcore_add_del succeeded + TestCase [ 9] : service_lcore_start_stop succeeded + TestCase [10] : service_lcore_en_dis_able succeeded + TestCase [11] : service_mt_unsafe_poll succeeded + TestCase [12] : service_mt_safe_poll succeeded perf test for MT Safe: 42.7 cycles per call + TestCase [13] : service_app_lcore_mt_safe succeeded perf test for MT Unsafe: 73.3 cycles per call + TestCase [14] : service_app_lcore_mt_unsafe succeeded + TestCase [15] : service_may_be_active succeeded + TestCase [16] : service_active_two_cores succeeded + ------------------------------------------------------- + + Test Suite Summary : service core test suite + ------------------------------------------------------- + + Tests Total : 17 + Tests Skipped : 0 + Tests Executed : 17 + Tests Unsupported: 0 + Tests Passed : 16 + Tests Failed : 1 + ------------------------------------------------------- + Test Failed RTE>> stderr: EAL: Detected CPU lcores: 16 EAL: Detected NUMA nodes: 2 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/service_autotest/mp_socket EAL: Selected IOVA mode 'PA' EAL: No available 1048576 kB hugepages reported EAL: VFIO support initialized EAL: Device 0000:03:00.0 is not NUMA-aware, defaulting socket to 0 APP: HPET is not enabled, using TSC as default timer EAL: Test assert service_attr_get line 340 failed: attr_get() call didn't get call count (zero)
According to API, trying to stop a service lcore is not possible if this lcore is the only one associated to a service. Doing this will result in a -EBUSY return code from rte_service_lcore_stop() which the service_attr_get subtest was not checking. This left the service lcore running, and a race existed with the main lcore on checking the service attributes which triggered this CI failure.
To fix this, dissociate the service lcore with current service.
Once fixed this first issue, a race still exists, because the wait_slcore_inactive helper added in a previous fix was not paired with a check that the service lcore _did_ stop.
Add missing check on rte_service_lcore_may_be_active.
Fixes: 4d55194d76a4 ("service: add attribute get function") Fixes: 52bb6be259ff ("test/service: fix race condition on stopping lcore") Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Aaron Conole <aconole@redhat.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
79afbbfe |
| 19-Aug-2021 |
Joyce Kong <joyce.kong@arm.com> |
test/service: fix some comment
Change the inaccurate comment of 'set pass flag' to 'clear pass flag' as the '*pass_test = 0' code actually implements clearing.
Fixes: f038a81e1c56 ("service: add un
test/service: fix some comment
Change the inaccurate comment of 'set pass flag' to 'clear pass flag' as the '*pass_test = 0' code actually implements clearing.
Fixes: f038a81e1c56 ("service: add unit tests") Cc: stable@dpdk.org
Signed-off-by: Joyce Kong <joyce.kong@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
8c816dc5 |
| 20-Jul-2021 |
Joyce Kong <joyce.kong@arm.com> |
test/service: use compiler atomics for lock sync
Convert rte_atomic usages to compiler atomic built-ins for lock sync in service_cores testcases.
Signed-off-by: Joyce Kong <joyce.kong@arm.com> Revi
test/service: use compiler atomics for lock sync
Convert rte_atomic usages to compiler atomic built-ins for lock sync in service_cores testcases.
Signed-off-by: Joyce Kong <joyce.kong@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
cb056611 |
| 15-Oct-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
eal: rename lcore master and slave
Replace master lcore with main lcore and replace slave lcore with worker lcore.
Keep the old functions and macros but mark them as deprecated for this release.
T
eal: rename lcore master and slave
Replace master lcore with main lcore and replace slave lcore with worker lcore.
Keep the old functions and macros but mark them as deprecated for this release.
The "--master-lcore" command line option is also deprecated and any usage will print a warning and use "--main-lcore" as replacement.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
52bb6be2 |
| 16-Oct-2020 |
Kevin Laatz <kevin.laatz@intel.com> |
test/service: fix race condition on stopping lcore
There is a potential race condition in 'service_attr_get' which will cause test failures since the service core thread is still running while the v
test/service: fix race condition on stopping lcore
There is a potential race condition in 'service_attr_get' which will cause test failures since the service core thread is still running while the values are being retrieved/reset.
This patch fixes the race condition by waiting for the service core thread to stop before continuing with the unit test checks.
Fixes: 4d55194d76a4 ("service: add attribute get function")
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
8b6b2bf6 |
| 14-Sep-2020 |
Harry van Haaren <harry.van.haaren@intel.com> |
test/service: fix race condition on stopping lcore
This commit fixes a potential race condition in the tests where the lcore running a service would increment a counter that was already reset by the
test/service: fix race condition on stopping lcore
This commit fixes a potential race condition in the tests where the lcore running a service would increment a counter that was already reset by the test-suite thread. The resulting race-condition incremented value could cause CI failures, as indicated by DPDK's CI.
This patch fixes the race-condition by making use of the added rte_service_lcore_active() API, which indicates when a service-core is no longer in the service-core polling loop.
The unit test makes use of the above function to detect when all statistics increments are done in the service-core thread, and then the unit test continues finalizing and checking state.
Fixes: f28f3594ded2 ("service: add attribute API")
Reported-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
show more ...
|
#
048db4b6 |
| 08-Jul-2020 |
Lukasz Wojciechowski <l.wojciechow@partner.samsung.com> |
service: fix core mapping reset
The rte_service_lcore_reset_all function stops execution of services on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE. However the thread loop for s
service: fix core mapping reset
The rte_service_lcore_reset_all function stops execution of services on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE. However the thread loop for slave lcores (eal_thread_loop) distincts these roles to set lcore state after processing delegated function. It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE. So changing the role to RTE before stopping work in slave lcores causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait must be run after rte_service_lcore_reset_all to bring back lcores to launchable (WAIT) state. This has been fixed in test app and clarified in API documentation.
Setting the state to WAIT in rte_service_runner_func is premature as the rte_service_runner_func function is still a part of the lcore function delegated to slave lcore. The state is overwritten anyway in slave lcore thread loop. This premature setting state to WAIT might however cause rte_eal_lcore_wait, that was called by the application, to return before slave lcore thread set the FINISHED state. That's why it is removed from librte_eal rte_service_runner_func function.
Bugzilla ID: 464 Fixes: 21698354c832 ("service: introduce service cores concept") Fixes: f038a81e1c56 ("service: add unit tests") Cc: stable@dpdk.org
Reported-by: Sarosh Arif <sarosh.arif@emumba.com> Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
fea5a82f |
| 07-Jul-2020 |
Igor Romanov <igor.romanov@oktetlabs.ru> |
test/service: check active state on two lcores
The test checks that the service may be active API works when there are two cores: a non-service lcore and a service one.
The API notes to take care w
test/service: check active state on two lcores
The test checks that the service may be active API works when there are two cores: a non-service lcore and a service one.
The API notes to take care when checking the status of a running service, but the test setup allows for a safe usage in that case.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
show more ...
|
#
9ec8f113 |
| 06-May-2020 |
Harry van Haaren <harry.van.haaren@intel.com> |
test/service: add perf test for service on app lcore
This commit adds a basic test to check the cycle cost of related to calling into a service.
Signed-off-by: Harry van Haaren <harry.van.haaren@in
test/service: add perf test for service on app lcore
This commit adds a basic test to check the cycle cost of related to calling into a service.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Tested-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com>
show more ...
|
#
505a2b0c |
| 27-Nov-2019 |
Harry van Haaren <harry.van.haaren@intel.com> |
test/service: fix wait for service core
This commit fixes a sporadic failure of the service_autotest unit test, as seen in the DPDK CI. The failure occurs as the main test thread did not wait on the
test/service: fix wait for service core
This commit fixes a sporadic failure of the service_autotest unit test, as seen in the DPDK CI. The failure occurs as the main test thread did not wait on the service-thread to return, and allowing it to read a flag before the service was able to write to it.
The fix changes the wait API call to specific the service-core ID, and this waits for cores with both ROLE_RTE and ROLE_SERVICE.
The rte_eal_mp_wait_lcore() call does not (and should not) wait for service cores, so must not be used to wait on service-cores.
Fixes: f038a81e1c56 ("service: add unit tests") Cc: stable@dpdk.org
Reported-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
e0f4a0ed |
| 15-Jun-2019 |
David Marchand <david.marchand@redhat.com> |
test: skip tests when missing requirements
Let's mark as skipped the tests when they are missing some requirements like a number of used cores or specific hardware availability, like compress, crypt
test: skip tests when missing requirements
Let's mark as skipped the tests when they are missing some requirements like a number of used cores or specific hardware availability, like compress, crypto or eventdev devices.
Signed-off-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
db9f4430 |
| 28-Mar-2019 |
Nikhil Rao <nikhil.rao@intel.com> |
service: fix parameter type for attribute
The type of value parameter to rte_service_attr_get should be uint64_t *, since the attributes are of type uint64_t.
Fixes: 4d55194d76a4 ("service: add att
service: fix parameter type for attribute
The type of value parameter to rte_service_attr_get should be uint64_t *, since the attributes are of type uint64_t.
Fixes: 4d55194d76a4 ("service: add attribute get function")
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Reviewed-by: Gage Eads <gage.eads@intel.com> Reviewed-by: Rami Rosen <ramirose@gmail.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
show more ...
|
#
a9de470c |
| 26-Feb-2019 |
Bruce Richardson <bruce.richardson@intel.com> |
test: move to app directory
Since all other apps have been moved to the "app" folder, the autotest app remains alone in the test folder. Rather than having an entire top-level folder for this, we ca
test: move to app directory
Since all other apps have been moved to the "app" folder, the autotest app remains alone in the test folder. Rather than having an entire top-level folder for this, we can move it back to where it all started in early versions of DPDK - the "app/" folder.
This move has a couple of advantages: * This reduces clutter at the top level of the project, due to one less folder. * It eliminates the separate build task necessary for building the autotests using make "make test-build" which means that developers are less likely to miss something in their own compilation tests * It re-aligns the final location of the test binary in the app folder when building with make with it's location in the source tree.
For meson builds, the autotest app is different from the other apps in that it needs a series of different test cases defined for it for use by "meson test". Therefore, it does not get built as part of the main loop in the app folder, but gets built separately at the end.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|