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 2E198A00C3; Thu, 14 May 2020 12:39:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B76451D731; Thu, 14 May 2020 12:39:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 849051D72F for ; Thu, 14 May 2020 12:39:55 +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 04EAZreD028832 for ; Thu, 14 May 2020 03:39:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pfpt0818; bh=i/eEge374DK8yqRrnujK5yIFf7RV1Xgp5T5IyvX9XcY=; b=rL88KrwItb0CNC7IFXOgChn5FMQE3HBkoWlWLV/wScywXHiGskTHVj15YiKB/aw2waIf 6PS2LjuAhFlq3DGzUbMCPxob48hS/0WDk4r9eEF4pnIey9UofWWSobzJMYAMs3elqsWv e63xL+EQpaZabYSa1iq6vboUb12r/oQB8t5Ms1m/Xj6En0L3/KYNJJZRH0n54ThpgZLj bTuMShl49v+cfFBDCZZtS5mH/t3BbTzl3NlNHwnjrGFYOjYATH3T97/ZjQXkjIeceo3k ZZVHV7Bfq7XeFtzD4UwxOEe2FfUB/ccLpQ1Sy7lRPGoqOe+O0lS4mBv9p7nW1qhISU2N 7A== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3100xahv6p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 14 May 2020 03:39:54 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 14 May 2020 03:39:52 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 14 May 2020 03:39:52 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 14 May 2020 03:39:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CfXVpxF9VsqTybF+PBYwfwtKmpu+bV2ScRGDNm0QNFUfXP/IIlwKe0Uq7MtF7qjwKub3S9FYKJ5CP4Hn9tmYFC4HoxIoAne7OmeFJMDVdTLlvKZucdpJa1o7Klrp8SJSebgNZ8xEdHHqTJMJG/RPFCcsz9sQR+S9m7qBNsqng3lHCbo7YZri+3eM1d3OXifH7gyBwvlGDThrMqC4wZE/W1JmKNXIAVnL7xaqWUuMjPeadd1QqBTIL3+xISXhcVWMapZsSdZnZhJbsWdNeDO+XfKCLGxyJlouby+KktpatRAgI+6VSovpOjZ/F6p5hYffIzYjm1g/BmwOQE8TuLrp8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i/eEge374DK8yqRrnujK5yIFf7RV1Xgp5T5IyvX9XcY=; b=htLcPGB7CyGyLATkynq7ltgENjhrEbFbjj0RlljnjYUID9UoSH9x7q2JOet3sEknMcVB+l5r5Co978I+hjJKueEcXnSuA/NkcGRjuA76AyZkRtwSz/IXg8vBU0rFMk55hP2N/9Wm0+IaBhDkZp3EFI7FHcG7MxmGLA/SNFy+rhGrnaPzhV7+b0Cntlh/wXsgr0xvS65ujdqo+5v10vbboCQohsmJ2XAt3t0R+eym4YRyxCjaCBOJ/7Gv75CbGsKNNVxH8pgaxO2tBMt4PsoJFQqpR7A3DCtN+x1M0YlWHMw5/Wi2F0sgMO3mhGnhCN0zXTpwoscJEOnTwaY/uAxgaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i/eEge374DK8yqRrnujK5yIFf7RV1Xgp5T5IyvX9XcY=; b=VslVJSgK4zlhhCzFGzuj6P8Zg4A1fOXLZOH4MZ+NPZw2rw0mzHiHVh3z+9iIfACAWOCXujRdcrgcn/j386MoGRpItZKn++z2p4HC/J7KCaWWsezn4SqZO9edBRcfU5GQkm9H4MV4C2fBhrZk8CfbIF8Wt7uWkr08MCd1ZDuTw5k= Received: from BYAPR18MB2917.namprd18.prod.outlook.com (2603:10b6:a03:105::19) by BYAPR18MB2757.namprd18.prod.outlook.com (2603:10b6:a03:105::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Thu, 14 May 2020 10:39:48 +0000 Received: from BYAPR18MB2917.namprd18.prod.outlook.com ([fe80::a1ec:e959:77df:cd58]) by BYAPR18MB2917.namprd18.prod.outlook.com ([fe80::a1ec:e959:77df:cd58%5]) with mapi id 15.20.3000.016; Thu, 14 May 2020 10:39:48 +0000 Date: Thu, 14 May 2020 16:09:31 +0530 From: Nithin Dabilpuram To: CC: , Kiran Kumar K , Message-ID: <20200514103931.GA29118@outlook.office365.com> References: <20200513202218.6045-1-pbhagavatula@marvell.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200513202218.6045-1-pbhagavatula@marvell.com> User-Agent: Mutt/1.12.2 (34cd43c) (2019-09-21) X-ClientProxiedBy: BM1PR0101CA0041.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::27) To BYAPR18MB2917.namprd18.prod.outlook.com (2603:10b6:a03:105::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by BM1PR0101CA0041.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24 via Frontend Transport; Thu, 14 May 2020 10:39:46 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9aa3307d-4ba3-437c-3261-08d7f7f3200b X-MS-TrafficTypeDiagnostic: BYAPR18MB2757: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:80; X-Forefront-PRVS: 040359335D X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0LKm0xemDdPyFIS2xa07wI1OsNv8Z3wWH327pP8Kg7sRfO0uYMVlOLZZOYT66yZ9S1WeyuFBXSzKzcsbIBNVkyUWQwhhF/Ces5Mwdt1iKBT9YXs91ZtceI9zZJEBiNia5auwGFxy1fCjX0ibOAvIELy6gqnsPqBTu4cYOtuavNFHY/q5JU/bawn83nW0vPZHmxDbM0MQx62Wvy+e2INs10FbbzirLd4677CNaZYqw0FBqI6hhipN5y8nboQgaVmFrnzHawdCbYHu/bgVYKs1RlZMpVYgnVv9s4vgfP5ksyWHs7/ml+qUsfEJrFVaEbJpKYm2+fvAAle2tCojr6dx9arRZqqxKgDov6MpxasVK+4IlPfkSAJYlhZtVWO7DDj3Pzw5U5E8VCI7HHf4nFniBzJ2QWWL+2RBqGizdZlzzAKAu30+9eU5O9R6JL3l6ezl X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR18MB2917.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(136003)(396003)(346002)(366004)(39860400002)(2906002)(316002)(66556008)(55236004)(55016002)(86362001)(9686003)(6636002)(6506007)(33656002)(26005)(8676002)(16526019)(7696005)(5660300002)(52116002)(8936002)(186003)(4326008)(1076003)(478600001)(66476007)(66946007)(6666004)(956004)(34206002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: nb8GJ70+ycns6byn6cjKbV9hsJcqMcL8x4YcnLPl/V4q/7sY/wYzmXFRgQyXuznmtsNceA1qUaTkIlOHnmrcTZnEgASLdzJYuxDY5mI6XfHOZbmjfsfVpm3kyITlZt/VBm9vxpH4jxgvNu8jQ4f/pya/5tIV4OFUSG5siN5t+mPhycrfKxdm0lNef496Of2BlcexJgB4uW0N65bwMEqhTQVG0d77tapcVry355ZiZvE/6DFPOkstTpdr+jVHx9yNwYMAd0c9s1B8yjlxurWRohPaQ7xUHKDLdBYuvx7bmxYKroXrAZ17niEeJIKaLUeegVtiVtGhlzo4+ulmqmh7mhrOpQP1GT0jf9AqhzSZ47z/9i2orAIFdke0ZnxIxe1lnAuyS0Hi9NmOAiGkljHJozpSk/zvTzm4MNIrgPLWZJjhjmCC4gTBDn9b5AYHlwtN408At1rKzXnxWZ84HzfO7BFGLFN+rFjS7Rk5KdBvX/s= X-MS-Exchange-CrossTenant-Network-Message-Id: 9aa3307d-4ba3-437c-3261-08d7f7f3200b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2020 10:39:48.6101 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DScdcm4YbX2rq4RJnjy5DNAh0nKj+5AQ5FxiYtUCQasMStayU6rZwrf7hK3DRxDMTMYKtWSkFgA4UIy5qYPZsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2757 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-14_02:2020-05-13, 2020-05-14 signatures=0 Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd-graph: 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" On Thu, May 14, 2020 at 01:52:17AM +0530, pbhagavatula@marvell.com wrote: > From: Pavan Nikhilesh > > Fix unchecked return values reported by coverity. > > Coverity issue: 350601 > Fixes: ef853f1fd979 ("examples/l3fwd-graph: add ethdev configuration changes") > > Signed-off-by: Pavan Nikhilesh Acked-by: Nithin Dabilpuram > --- > examples/l3fwd-graph/main.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c > index 40108a0d3..c70270c4d 100644 > --- a/examples/l3fwd-graph/main.c > +++ b/examples/l3fwd-graph/main.c > @@ -598,6 +598,7 @@ check_all_ports_link_status(uint32_t port_mask) > uint8_t count, all_ports_up, print_flag = 0; > struct rte_eth_link link; > uint16_t portid; > + int ret; > > printf("\nChecking link status"); > fflush(stdout); > @@ -612,7 +613,14 @@ check_all_ports_link_status(uint32_t port_mask) > if ((port_mask & (1 << portid)) == 0) > continue; > memset(&link, 0, sizeof(link)); > - rte_eth_link_get_nowait(portid, &link); > + ret = rte_eth_link_get_nowait(portid, &link); > + if (ret < 0) { > + all_ports_up = 0; > + if (print_flag == 1) > + printf("Port %u link get failed: %s\n", > + portid, rte_strerror(-ret)); > + continue; > + } > /* Print link status if flag set */ > if (print_flag == 1) { > if (link.link_status) > -- > 2.17.1 >