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 C27F2A04F5 for ; Wed, 11 Dec 2019 22:29:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6AD41D9E; Wed, 11 Dec 2019 22:29:04 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 2C3381D9E for ; Wed, 11 Dec 2019 22:29:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VJKeyuUFuXpMebZLI8zFJSH2Z/I5xStaLj+UssKGJwM=; b=cNaPPthuRl9oyf4djLSVibWJcTUdIIqd/7Cv/ydMT37Qrew2b8XF9/uN4WTuZe1llGNQLs EenRmO6A54VQzsbGNwxpzxFdk9kRWFT5HauLN/whyWk/yJU8xL7hn0NlNKUdEJ4vsFLAiZ s1JD6RFdXLjB/tb7hOsR7B7xqVq2UYE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-317-xq3fvfhnNju0ZkgDlE7gOg-1; Wed, 11 Dec 2019 16:29:00 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35F06100550E; Wed, 11 Dec 2019 21:28:59 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A55210013A1; Wed, 11 Dec 2019 21:28:58 +0000 (UTC) From: Kevin Traynor To: Pavan Nikhilesh Cc: dpdk stable Date: Wed, 11 Dec 2019 21:26:42 +0000 Message-Id: <20191211212702.27851-50-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: xq3fvfhnNju0ZkgDlE7gOg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'app/eventdev: fix divide by zero' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/17/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/e3edd018212bd1f91a= 69370b52012d4cea15a360 Thanks. Kevin. --- >From e3edd018212bd1f91a69370b52012d4cea15a360 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Fri, 22 Nov 2019 00:52:38 +0530 Subject: [PATCH] app/eventdev: fix divide by zero [ upstream commit 93b7794b83524b322d03634969f77d767dec13f1 ] Fix possible divide by zero condition when calculating percentages. Coverity issue: 277205 Coverity issue: 277234 Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer") Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/test_perf_common.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_= perf_common.c index f93729a12..81553a7b1 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -129,6 +129,7 @@ perf_event_timer_producer(void *arg) =09rte_delay_ms(1000); =09printf("%s(): lcore %d Average event timer arm latency =3D %.3f us\n", -=09=09=09__func__, rte_lcore_id(), (float)(arm_latency / count) / -=09=09=09(rte_get_timer_hz() / 1000000)); +=09=09=09__func__, rte_lcore_id(), +=09=09=09count ? (float)(arm_latency / count) / +=09=09=09(rte_get_timer_hz() / 1000000) : 0); =09return 0; } @@ -190,6 +191,7 @@ perf_event_timer_producer_burst(void *arg) =09rte_delay_ms(1000); =09printf("%s(): lcore %d Average event timer arm latency =3D %.3f us\n", -=09=09=09__func__, rte_lcore_id(), (float)(arm_latency / count) / -=09=09=09(rte_get_timer_hz() / 1000000)); +=09=09=09__func__, rte_lcore_id(), +=09=09=09count ? (float)(arm_latency / count) / +=09=09=09(rte_get_timer_hz() / 1000000) : 0); =09return 0; } --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:16.652574108 +0000 +++ 0050-app-eventdev-fix-divide-by-zero.patch=092019-12-11 21:24:12.709650= 349 +0000 @@ -1 +1 @@ -From 93b7794b83524b322d03634969f77d767dec13f1 Mon Sep 17 00:00:00 2001 +From e3edd018212bd1f91a69370b52012d4cea15a360 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 93b7794b83524b322d03634969f77d767dec13f1 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index e7cf75a7d..b3af4bfec 100644 +index f93729a12..81553a7b1 100644 @@ -22 +23 @@ -@@ -134,6 +134,7 @@ perf_event_timer_producer(void *arg) +@@ -129,6 +129,7 @@ perf_event_timer_producer(void *arg) @@ -32 +33 @@ -@@ -195,6 +196,7 @@ perf_event_timer_producer_burst(void *arg) +@@ -190,6 +191,7 @@ perf_event_timer_producer_burst(void *arg)