From: Pavan Nikhilesh Date: Wed, 13 May 2020 20:20:25 +0000 (+0530) Subject: examples/l3fwd: check service core reset result X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c1c48e7636ca4797e7eea606b4d0770da9064ad3;p=dpdk.git examples/l3fwd: check service core reset result Fix unchecked return values reported by coverity. Coverity issue: 354235 Fixes: 8bd537e9c6cf ("examples/l3fwd: add service core setup based on caps") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh --- diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 84f171f18b..24ede42903 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -1112,8 +1112,9 @@ l3fwd_service_enable(uint32_t service_id) /* Get the core which has least number of services running. */ while (slcore_count--) { /* Reset default mapping */ - rte_service_map_lcore_set(service_id, - slcore_array[slcore_count], 0); + if (rte_service_map_lcore_set(service_id, + slcore_array[slcore_count], 0) != 0) + return -ENOENT; service_count = rte_service_lcore_count_services( slcore_array[slcore_count]); if (service_count < min_service_count) {