[dpdk-stable] [dpdk-dev] [PATCH] test/service: fix wait for service core

David Marchand david.marchand at redhat.com
Wed Nov 27 22:38:57 CET 2019


On Wed, Nov 27, 2019 at 2:20 PM Harry van Haaren
<harry.van.haaren at intel.com> wrote:
>
> 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 at dpdk.org

>
> Reported-by: Aaron Conole <aconole at redhat.com>
> Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>

Acked-by: David Marchand <david.marchand at redhat.com>

Before this patch, reproduced the pb in less than 2 minutes with:
# time (log=/tmp/$$.log; while true; do echo service_autotest |taskset
-c 0-1 build-gcc-static/app/test/dpdk-test --log-level *:8 -l 0-1
>$log 2>&1; grep -q 'Test OK' $log || break; done; cat $log; rm -f
$log)

With the patch, this loop has been running for 40 minutes.

Applied, thanks.


--
David Marchand



More information about the stable mailing list