service: fix identification of service running on other lcore
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Wed, 6 May 2020 15:28:00 +0000 (23:28 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 11 May 2020 11:17:05 +0000 (13:17 +0200)
commit5c76111f068c4ef8aff4f5b4e2e641a21ff733a0
treeddd16f709aa710b2e082e87aa125e2bd7163d4a4
parent18cae99cb9096abe0f33b43e51eb8b781e8a5ff9
service: fix identification of service running on other lcore

The logic to identify if the MT unsafe service is running on another
core can return -EBUSY spuriously. In such cases, running the service
becomes costlier than using atomic operations. Assume that the
application passes the right parameters and reduce the number of
instructions for all cases.

Cc: stable@dpdk.org
Fixes: 8d39d3e237c2 ("service: fix race in service on app lcore function")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
lib/librte_eal/common/rte_service.c