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 524FA42DEC; Thu, 6 Jul 2023 20:09:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04B5241101; Thu, 6 Jul 2023 20:09:31 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 421C840A79 for ; Thu, 6 Jul 2023 20:09:30 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1b8033987baso15473515ad.0 for ; Thu, 06 Jul 2023 11:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688666969; x=1691258969; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=TaD5FCN6+TLVaEPZLkklXTxPEHtR/FCfFi6+XfjWnIk=; b=w4dlSG9VkIPz0j52SjnzqudqTE8P37moGtNlR3uPukuaKdOadPtolyx+yamVCrwWgg 9T9rsj1m8Uoqc+3Nfpti8m+u7NanmD4Q/Qr8mwekCXrrHc1b6FaVx0Bck6sfdSXxPwl4 zHsOPuVxbkDDOSQLDgfjsxcFB0BkQwjcyrofJWfZAheFusuNLHTRpCz8jg1kkY8SpOBY u5++27eNPtQB9WCRCjJe9/MoG4f/bd9bJPJjp7bbUyx0mb0ks/v1+g0q3br2sqnWLLZD 3YkxTu4TLL36351h5pezdoIyWziJAvi7uANUyVSf3p/mnKoyWQXtTVj3IVi3TYE42Cns H7Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688666969; x=1691258969; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TaD5FCN6+TLVaEPZLkklXTxPEHtR/FCfFi6+XfjWnIk=; b=I1h1FSJUqH0+yTuMFe4Y2ZZJF2Ze88zl3YAzA639wiDJmZMqHLiSkQp+wn+Vp8xKEN 7K+9NjFwHuipaN0ysDgXCL+IMMQeHybWyvmkDkTQu7mIGmjJVreDIe7EoL8xZon07IZO CvE1RNpxZEpAVDwuiZuhG+dlToxmd0r2cculfvmj2nxicWN9CkfVxgpgMaUG7ImzdQNN yjfFwCPlZm4KolB6UzmHOJlydPdBWMrFMAv+j6g5K2bR/9jqwXiGD99J6uIkKRto3fst zi+/f00+v88jP0DgmZjvJF8aHlar7QyVBX7A+z1OeSfxXgUroOK/YnC1s7sngpYSNxY/ f0og== X-Gm-Message-State: ABy/qLZvD/tbfTwoYqEXyFp4SFrKp3MSsEQu7LsXWu30qQa/0Yjwv5N4 vP94DJeFcN5OuCvqFy6xCcRqtQ== X-Google-Smtp-Source: APBJJlFi7OrTNMWR552VkkNh8moDosTBBDFPUGQsYNY7CxTaXzIszQ1oDGnIxcv02LSwy+9mO0D6WQ== X-Received: by 2002:a17:903:2441:b0:1b8:a39e:ff4b with SMTP id l1-20020a170903244100b001b8a39eff4bmr8286233pls.32.1688666969221; Thu, 06 Jul 2023 11:09:29 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id b6-20020a170902d50600b001ab2592ed33sm1717540plg.171.2023.07.06.11.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 11:09:29 -0700 (PDT) Date: Thu, 6 Jul 2023 11:09:26 -0700 From: Stephen Hemminger To: Thomas Monjalon 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 Message-ID: <20230706110926.689d1344@hermes.local> In-Reply-To: <7686290.gsGJI6kyIV@thomas> References: <20221216073958.1645736-1-mahmad@marvell.com> <20230110163442.1157560-1-mahmad@marvell.com> <7686290.gsGJI6kyIV@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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