From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7794942E54; Wed, 12 Jul 2023 16:39:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DC1C40A7D; Wed, 12 Jul 2023 16:39:39 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id B0D9B406BA for ; Wed, 12 Jul 2023 16:39:37 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 4D310320096F; Wed, 12 Jul 2023 10:39:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 12 Jul 2023 10:39:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1689172774; x=1689259174; bh=sO0/psDp17JnyYYuEE8txPZmCYVyg2z9mtN PbqspxLs=; b=ORwS716FMVMhNHqOLUfXCKd3O7wTjyD80+c/u9T0g3j8MsJ+bCy Ejruz6ukuQHulQ1eLSDHNr7yyVQe0r8weYHm7xo4aZGokjo1L0Ag6XW6Y1PIC2Ir 35bE9Q/roD58lOAhdWanu8H3iE6Et3RrSYRdp75ERvIAdY9r3lGIZixudbaVahYF S3FKl9DS7Kp01CGIqL0sgcTnl+QmtOzftnCZFHpm7pEkU5V81jwV/69HRhJofcWI h7FKFrO2pPP6kDQP6/kEfOcawGWjO6fVPe+z8e1HeZZ2bnVI5sU8Zur5E7JtyEfm pa779xU5Yt98oRshN35Uvw5h+hjJfBoXCpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1689172774; x=1689259174; bh=sO0/psDp17JnyYYuEE8txPZmCYVyg2z9mtN PbqspxLs=; b=S0RG2PC9KFEXaGrc8dGVrDCYcE1qcAuPTkvZhyUiBi8f+DJ9tYR DB9D0UJ+cgrGT6Zv3KPBGUlT46F+buQIyCBnlOOFlPtCxlsk3eqscCsUUWCMAHK0 /sCsiraLAKE1LHRVUa5zDLAbgr+Fkuwz6QjozlNYdW+KM5Ci+Sk4ua4xszqhOqud MOqH2+xCraLPyIkoqw0k975VUGO4tnn8g443/EIixPvsXkwBAqizUYPI9p4Lkqcm Ivt7GS78nwH/a8CCaUx6yo2oRiRrCAPMbrw675864zWwca2VLUnIIh0hRl2k7IDY yDO1+ie9dwSW0hDP4CKgkToZjk7fP/Nx2lQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrfedvgdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Jul 2023 10:39:32 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: Mohammad Iqbal Ahmad , dev@dpdk.org, Vladimir Medvedkin , Konstantin Ananyev , Conor Walsh , jerinj@marvell.com, skori@marvell.com, skoteshwar@marvell.com, pbhagavatula@marvell.com, kirankumark@marvell.com, psatheesh@marvell.com, asekhar@marvell.com, anoobj@marvell.com, gakhil@marvell.com, hkalra@marvell.com, ndabilpuram@marvell.com Subject: Re: [PATCH v1] examples/l3fwd: fix for coverity scan Date: Wed, 12 Jul 2023 16:39:30 +0200 Message-ID: <4927488.mogB4TqSGs@thomas> In-Reply-To: <20230706110926.689d1344@hermes.local> References: <20221216073958.1645736-1-mahmad@marvell.com> <7686290.gsGJI6kyIV@thomas> <20230706110926.689d1344@hermes.local> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 06/07/2023 20:09, Stephen Hemminger: > On Wed, 01 Feb 2023 18:28:44 +0100 > Thomas Monjalon wrote: > > > 10/01/2023 15:56, Mohammad Iqbal Ahmad: > > > This patch fixes (Logically dead code) coverity issue. > > > This patch also fixes (Uninitialized scalar variable) coverity issue. > > > > > > Coverity issue: 381687 > > > Coverity issue: 381686 > > > Fixes: 6a094e328598 ("examples/l3fwd: implement FIB lookup method") > > > > > > Signed-off-by: Mohammad Iqbal Ahmad > > > > It seems you removed "if (nh != FIB_DEFAULT_HOP)" > > > > Please could you explain what was the issue > > inside the commit message. > > It could help to find a better title as well. > > Coverity is spotting that the same condition is evaluated first > in the if() then in the conditional expression. So yes it is a bug. > > Would prefer the title of > examples/l3fwd: fix duplicate expression for default nexthop > > Don't think the default nexthop was ever tested. If it was then > hops[i] would have never been updated. Probably would just get previous > value so it worked. > > Acked-by: Stephen Hemminger Applied, thanks.