From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F0CB9A00C5; Wed, 13 May 2020 22:20:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6B2631D5FF; Wed, 13 May 2020 22:20:37 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id CCBC81D5FE for ; Wed, 13 May 2020 22:20:35 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04DKFiDr001565; Wed, 13 May 2020 13:20:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=Jx70qj4G0VWzHNtPXmO5WC0a5BbSUWeVZkjChl9gF6k=; b=ikb+2WNMpwsXEiLYUwVIEOiR3v9e4t6ID/rppJnrXeB9U5sYLNLOdnhRldCdMbJ86gQU RDuAG1o/76Tr6+gjp+P2ApU7IayL9B9XP0BD8s1SiWICVFLwjdqITOpJjDtN84ZQumCj 7FEo5sP2Enti2kdmTBz0IoEGFMSgCjjLhWMeEy8z5BE9azUWn4TgSIbhs5B+dW0RZZ/R 9oQTAHCOzCrG5ORu9v/9cV/pOIvzkXRBhDHBjQUB4GfkL7M2/ZstI/uM2GMJ/yO7boug ImUfLyTNNbFuBHNBf1Y0ME6RkdeyB5yPTMwkc6/IeJHtP/f68Zw6SZJ0PYZG8m7vV79X 2Q== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3100xaej5b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 13 May 2020 13:20:34 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 13 May 2020 13:20:33 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 13 May 2020 13:20:33 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.161.240]) by maili.marvell.com (Postfix) with ESMTP id E8BEF3F703F; Wed, 13 May 2020 13:20:29 -0700 (PDT) From: To: , Marko Kovacevic , Ori Kam , Bruce Richardson , "Radu Nicolau" , Akhil Goyal , "Tomasz Kantecki" , Sunil Kumar Kori , Pavan Nikhilesh CC: Date: Thu, 14 May 2020 01:50:25 +0530 Message-ID: <20200513202026.5091-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-13_09:2020-05-13, 2020-05-13 signatures=0 Subject: [dpdk-dev] [PATCH] examples/l3fwd: fix unchecked function return values X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh Fix unchecked return values reported by coverity. Coverity issue: 354235 Fixes: 8bd537e9c6cf ("examples/l3fwd: add service core setup based on caps") Signed-off-by: Pavan Nikhilesh --- examples/l3fwd/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 84f171f18..24ede4290 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) { -- 2.17.1