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 BC6ACA00E6 for ; Thu, 11 Jul 2019 00:00:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CBD9E322C; Thu, 11 Jul 2019 00:00:43 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by dpdk.org (Postfix) with ESMTP id 3944E3195 for ; Thu, 11 Jul 2019 00:00:42 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 16E5F2DE; Wed, 10 Jul 2019 18:00:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 10 Jul 2019 18:00:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=7wgQ9rwMf9tLgzgZPMKHfwFqXdjZ7kmkx2mJkgGV9RI=; b=H6Ccq9GDxlY2 PldOCPVuSkht7ayxK/SoCaZoiX5i8GAaSps7HFjdc3Jz7TRDkT50FuPu9b3TCOOU lM60azS9pV+zZocKO9EV2gZ6wbLjqQ/dYQ/Nopm5cu6H8gQsvCNFnXzVNgu+NFTN Snaaz2LgR+MONQyAjJ0iooRjsH4THiw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=7wgQ9rwMf9tLgzgZPMKHfwFqXdjZ7kmkx2mJkgGV9 RI=; b=x8QcanZs8uosJX+LwjD39AsI6+Cscy/sbysYKXnUFjuRDQ0OByFkeb0r0 VsIHZ7cEYEwRmNzKxVzUeuuzDJC47SAe1d3vpi0mHDlvnqXRS3Reb6w7gG5lVQCm jZIeBu8VASbj/khlcojoINCgg/5MpTIn7ozlTmmncSpOzI+8p5kbzGTYcYlcu7fd dV5d4UPflR4pFuSDeM8FJQZGREepVEja0DBjW2BCBYqBxzaw+wRqYbNypVMf0pE+ ha6Rlxjnlost8Tm2EqXwyQghazynPvwXgKgc2prB2u17Zfb3P6ewCyemfNWsq4hR nPC5tv6kZdIwY7yIjR/64Pda9NMpg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrgeejgddtgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4EDCF380085; Wed, 10 Jul 2019 18:00:39 -0400 (EDT) From: Thomas Monjalon To: David Hunt Cc: dev@dpdk.org, reshma.pattan@intel.com Date: Thu, 11 Jul 2019 00:00:38 +0200 Message-ID: <74441472.B2Snk2g9C8@xps> In-Reply-To: <20190710152620.9365-1-david.hunt@intel.com> References: <20190710152620.9365-1-david.hunt@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v1] examples/l3fwd-power: fix telemetry coverity issue 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" 10/07/2019 17:26, David Hunt: > 6 issues caught by Coverity 343465 > * Possible divide by zero on 3 lines > * Convert to float then back to int, losing precision on 3 lines > > This patch modifies the code so that it only assigns calculated > values if the divisor is > 0, otherwise sets metrics to zero. > Also removes the un-needed round() function. > > Coverity issue: 343465 > Fixes: 609e79841fcf ("examples/l3fwd-power: add telemetry mode") > Signed-off-by: David Hunt Applied, thanks