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 D609841EA5 for ; Wed, 15 Mar 2023 23:48:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF9F54282D; Wed, 15 Mar 2023 23:48:26 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 030FC40141 for ; Wed, 15 Mar 2023 23:48:24 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id m18-20020a05600c3b1200b003ed2a3d635eso2288586wms.4 for ; Wed, 15 Mar 2023 15:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678920503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EyybOqb6S3dlHO67fjybjs3FeZ1JxxbHABZmoWtJeQg=; b=cFxLhj+XkVLzMTV9w1zWBF0CUOH2JZT5T+/etFGASqdoHTkL1MNda0D4AQhTkCVdpA JIylRd4BE54gioLYB2JTf9lbb5JkJWdftUDS+zZqvINYXpzkJ0eR+l2XRTVcwUnLNrwQ klHqkHIXK5RWvxnjbyrn0+16oaPt0DKBV/yse8omKwAzeuD42kiYB/2Voq5CjSD161Br QpgKf2Qi/3edYgaOHLz5bBml8l1IB0DahzRInUGY27m4krdz6EYHp6KQVXCickIln3l/ uwcfj35Ypm+mvndkAFlZGHc8BYCLcbSkIoEfBIUQqRIUgLmL1x9idV6bJL08nCz5PAwm fEGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678920503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EyybOqb6S3dlHO67fjybjs3FeZ1JxxbHABZmoWtJeQg=; b=f36YmGaVcmwcDhX+qcziMz7zf5iMxBLEtJ+FniVQ0bsxveG0e24mLWCXfGpK9WwGj9 YgJ0JEOFs5vgJl1LycT5vTFwHCNk5kkZsvq/yXuTE+WN7/3AybenuuNe5opZWwe13Swd LQUB1OPeU6QrnWRfYJJ2cKn3DtNNAZl0Srp9JEEmrC33mO4z1f8eUp0lYsdW8Ck677lg W6yBmtVtqGi1pndqzdCLWGLZv3YnjmHK89cjh/e4IXIB3DNQ1NJA4uLNzZ7Gkm0MvDkW fZqHfnEQAuqpiHAH2Uf6jnWBFIajlVQSbiICpIEIpyVOT0O7PXdUwtMYL/tGnIpUhbEu r+qw== X-Gm-Message-State: AO0yUKUh0aFBBd890HL/NxoMawctUtOAPwVSHxcsaOxQ6NvLBJ1jiVEz 4czSt9sUOQ6s5y7vy1Hhtha3yEvNQbbmig== X-Google-Smtp-Source: AK7set8Trag9CkbkGzzQNw1L5zaDkNdLk9+p/8+/aPwmM+1FFYV1WRNEe4q/s6nuR58VYRcx3rHfAQ== X-Received: by 2002:a7b:ca41:0:b0:3ea:f75d:4626 with SMTP id m1-20020a7bca41000000b003eaf75d4626mr19129930wml.38.1678920503757; Wed, 15 Mar 2023 15:48:23 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id y16-20020a05600c365000b003ed23845666sm3062140wmq.45.2023.03.15.15.48.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 15:48:23 -0700 (PDT) From: luca.boccassi@gmail.com To: Mohammad Iqbal Ahmad Cc: Wisam Jaddo , dpdk stable Subject: patch 'app/flow-perf: fix division or module by zero' has been queued to stable release 20.11.8 Date: Wed, 15 Mar 2023 22:46:30 +0000 Message-Id: <20230315224631.1025649-39-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315224631.1025649-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-71-luca.boccassi@gmail.com> <20230315224631.1025649-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/17/23. 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 rebasing (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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/2e3d3e025d3f04065763e4c483b874c4da701e81 Thanks. Luca Boccassi --- >From 2e3d3e025d3f04065763e4c483b874c4da701e81 Mon Sep 17 00:00:00 2001 From: Mohammad Iqbal Ahmad Date: Tue, 24 Jan 2023 16:08:03 +0530 Subject: [PATCH] app/flow-perf: fix division or module by zero [ upstream commit 132d39dcab370b2112e0a24ab1c94036b40b9557 ] Fix division or module by zero reported by coverity scan. Coverity issue: 373870 Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation") Signed-off-by: Mohammad Iqbal Ahmad Acked-by: Wisam Jaddo --- app/test-flow-perf/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index 899f6c93b6..b05f70cfb6 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -709,13 +709,11 @@ args_parse(int argc, char **argv) if (strcmp(lgopts[opt_idx].name, "rules-batch") == 0) { n = atoi(optarg); - if (n >= DEFAULT_RULES_BATCH) + if (n > 0) rules_batch = n; - else { + else rte_exit(EXIT_FAILURE, - "rules_batch should be >= %d\n", - DEFAULT_RULES_BATCH); - } + "flow rules-batch should be > 0\n"); } if (strcmp(lgopts[opt_idx].name, "rules-count") == 0) { -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-15 22:44:51.856028877 +0000 +++ 0039-app-flow-perf-fix-division-or-module-by-zero.patch 2023-03-15 22:44:49.667852022 +0000 @@ -1 +1 @@ -From 132d39dcab370b2112e0a24ab1c94036b40b9557 Mon Sep 17 00:00:00 2001 +From 2e3d3e025d3f04065763e4c483b874c4da701e81 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 132d39dcab370b2112e0a24ab1c94036b40b9557 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15,3 +16,2 @@ - .mailmap | 1 + - app/test-flow-perf/main.c | 7 ++++++- - 2 files changed, 7 insertions(+), 1 deletion(-) + app/test-flow-perf/main.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) @@ -19,12 +18,0 @@ -diff --git a/.mailmap b/.mailmap -index aaa15deff9..4018f0fc47 100644 ---- a/.mailmap -+++ b/.mailmap -@@ -924,6 +924,7 @@ Mitch Williams - Mit Matelske - Mohamad Noor Alim Hussin - Mohammad Abdul Awal -+Mohammad Iqbal Ahmad - Mohammed Gamal - Mohsin Kazmi - Mohsin Mazhar Shaikh @@ -32 +20 @@ -index 4a9206803a..e0ef78a840 100644 +index 899f6c93b6..b05f70cfb6 100644 @@ -35,2 +23 @@ -@@ -848,7 +848,12 @@ args_parse(int argc, char **argv) - /* Control */ +@@ -709,13 +709,11 @@ args_parse(int argc, char **argv) @@ -39,2 +26,2 @@ -- rules_batch = atoi(optarg); -+ n = atoi(optarg); + n = atoi(optarg); +- if (n >= DEFAULT_RULES_BATCH) @@ -42 +29,2 @@ -+ rules_batch = n; + rules_batch = n; +- else { @@ -44 +32,4 @@ -+ rte_exit(EXIT_FAILURE, + rte_exit(EXIT_FAILURE, +- "rules_batch should be >= %d\n", +- DEFAULT_RULES_BATCH); +- }