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 9441AA0032 for ; Fri, 18 Feb 2022 13:44:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9125641150; Fri, 18 Feb 2022 13:44:56 +0100 (CET) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by mails.dpdk.org (Postfix) with ESMTP id 5023240395 for ; Fri, 18 Feb 2022 13:44:54 +0100 (CET) Received: by mail-ed1-f48.google.com with SMTP id m3so9289914eda.10 for ; Fri, 18 Feb 2022 04:44:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DXWaE5oohSYfERV3gNSFucBrjOGe5DVek7zilYPeDJk=; b=kyr/BjUjxzmtBxO13X1SVgQVoQRlJ1P8TLfp8DAXIcL3ummRy5KEWMaJMEE465oN0o GeOWXkhseETTsEHUtpRLL0jfCKZvOUDtZ6+oDdDRsrJXJ7ACkfHP+Kg+G3ICrKoLUhmg 3454v6XF1/GjZCb6/UYIW4WGarzLKeVpzM7A8cJKI6pMZVNT41FvwFfLqCl7WjkkKgTi ta29tARViSwwywU++3AYysAA06gFUtuLyhG9YvF5TsoIlKyKWKJhobwU4jQNVvMf60n6 qTsTgZX+q2XmKymyOQNxUBZvli8GSalb6lNkKjxdHAy4P9T7I8oyxnMz4/iLPrqXgfBl afSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DXWaE5oohSYfERV3gNSFucBrjOGe5DVek7zilYPeDJk=; b=0yL2hGZfpmCYidB/UOxh49iBaOmMZtKsBDAqDjhD16WkTOsuYEVLQNUwbIk6OgpFzR VcT9Nk70KsIvJ1EgzB+LdnTJqPZAWFCBcnwRlcZjuTBMFabxPlp4/W234b74/hhek1/E m8Fh2ksjLMZk6MG8aGrrrPcZsH21hXjTipT+g0CLUO2NlNWMciRqb9Gr1ryIBOk7TsYG MLnT+n7e3+JwdEQcQ/zORz1cyo4IPrIog/278NAf7c0XOiyH0vH8iTCsI9Xz8He8sfD3 /JIc8fZgXY4a9VkrEUfW/qyP8vxvj9Q1FlNs1IDSJH1D1++A4NtKveItpa+ZTLq666+F wxvA== X-Gm-Message-State: AOAM5313uZrGkw3QsrAywxxX7dk5L0CO4pWf+qbedDMuNnyLQYEDh2nV AnI8CgI+P8RuI8QboOQtWpY= X-Google-Smtp-Source: ABdhPJzBZthQRCjVFeKxtXwl9SdKAs8Ba87RazezEr2BzudThgenS233t/9QvtbRNuijCvWZBds+zA== X-Received: by 2002:a05:6402:908:b0:410:ef84:f6f1 with SMTP id g8-20020a056402090800b00410ef84f6f1mr7859975edz.34.1645188293909; Fri, 18 Feb 2022 04:44:53 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id f5sm2220981ejj.159.2022.02.18.04.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:44:53 -0800 (PST) From: luca.boccassi@gmail.com To: Vladimir Medvedkin Cc: Kevin Traynor , dpdk stable Subject: patch 'app/fib: fix division by zero' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:39:14 +0000 Message-Id: <20220218123931.1749595-105-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-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.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/22. 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/32d2194f4f405db4a046200ce0ffa4fd2372377a Thanks. Luca Boccassi --- >From 32d2194f4f405db4a046200ce0ffa4fd2372377a Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin Date: Thu, 27 Jan 2022 18:08:53 +0000 Subject: [PATCH] app/fib: fix division by zero [ upstream commit a01070dac90b76f735e3c8805c3b78357b078518 ] This patch fixes the division by 0, which occurs if the number of routes is less than 10. Can be triggered by passing -n argument with value < 10: ./dpdk-test-fib -- -n 9 ... Floating point exception (core dumped) Fixes: 103809d032cd ("app/test-fib: add test application for FIB") Signed-off-by: Vladimir Medvedkin Acked-by: Kevin Traynor --- app/test-fib/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-fib/main.c b/app/test-fib/main.c index ebf37652ab..17569ece07 100644 --- a/app/test-fib/main.c +++ b/app/test-fib/main.c @@ -711,6 +711,10 @@ parse_opts(int argc, char **argv) print_usage(); rte_exit(-EINVAL, "Invalid option -n\n"); } + + if (config.nb_routes < config.print_fract) + config.print_fract = config.nb_routes; + break; case 'd': distrib_string = optarg; @@ -1240,6 +1244,10 @@ main(int argc, char **argv) config.nb_routes = 0; while (fgets(line, sizeof(line), fr) != NULL) config.nb_routes++; + + if (config.nb_routes < config.print_fract) + config.print_fract = config.nb_routes; + rewind(fr); } -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:41.828601943 +0000 +++ 0105-app-fib-fix-division-by-zero.patch 2022-02-18 12:37:37.838795226 +0000 @@ -1 +1 @@ -From a01070dac90b76f735e3c8805c3b78357b078518 Mon Sep 17 00:00:00 2001 +From 32d2194f4f405db4a046200ce0ffa4fd2372377a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a01070dac90b76f735e3c8805c3b78357b078518 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 622703dce8..830c32cc44 100644 +index ebf37652ab..17569ece07 100644 @@ -38 +39 @@ -@@ -1242,6 +1246,10 @@ main(int argc, char **argv) +@@ -1240,6 +1244,10 @@ main(int argc, char **argv)