From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 65F41A0096 for ; Wed, 10 Apr 2019 18:44:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D0181B105; Wed, 10 Apr 2019 18:44:47 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9227A1B12B for ; Wed, 10 Apr 2019 18:44:45 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0486380481; Wed, 10 Apr 2019 16:44:45 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-94.ams2.redhat.com [10.36.117.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10CA35D961; Wed, 10 Apr 2019 16:44:43 +0000 (UTC) From: Kevin Traynor To: Julien Meunier Cc: Ferruh Yigit , dpdk stable Date: Wed, 10 Apr 2019 17:43:27 +0100 Message-Id: <20190410164411.10546-19-ktraynor@redhat.com> In-Reply-To: <20190410164411.10546-1-ktraynor@redhat.com> References: <20190410164411.10546-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 10 Apr 2019 16:44:45 +0000 (UTC) Subject: [dpdk-stable] patch 'test/pmd_perf: fix the way to drain the port' has been queued to LTS release 18.11.2 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/16/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 rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Kevin Traynor --- >From eaf3a3063c9b15f45042904bf97ca5d758dd90a2 Mon Sep 17 00:00:00 2001 From: Julien Meunier Date: Wed, 20 Feb 2019 23:06:08 +0200 Subject: [PATCH] test/pmd_perf: fix the way to drain the port [ upstream commit 4c3cd4c294f883a5cf6d75425351b855d5f4be05 ] If the port has received less than ``pkt_per_port`` packets (for example, the port has missed some packets), the test is in an infinite loop. Instead of expecting a number of packet to receive, let the port to be drained by itself. If no more packets are received, the test can continue. Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx") Signed-off-by: Julien Meunier Reviewed-by: Ferruh Yigit --- test/test/test_pmd_perf.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c index f5095c87d..ed8524a17 100644 --- a/test/test/test_pmd_perf.c +++ b/test/test/test_pmd_perf.c @@ -494,5 +494,6 @@ main_loop(__rte_unused void *args) for (i = 0; i < conf->nb_ports; i++) { portid = conf->portlist[i]; - int nb_free = pkt_per_port; + int nb_free = 0; + uint64_t timeout = 10000; do { /* dry out */ nb_rx = rte_eth_rx_burst(portid, 0, @@ -501,7 +502,11 @@ main_loop(__rte_unused void *args) while (nb_tx < nb_rx) rte_pktmbuf_free(pkts_burst[nb_tx++]); - nb_free -= nb_rx; - } while (nb_free != 0); - printf("free %d mbuf left in port %u\n", pkt_per_port, portid); + nb_free += nb_rx; + + if (unlikely(nb_rx == 0)) + timeout--; + } while (nb_free != pkt_per_port && timeout != 0); + printf("free %d (expected %d) mbuf left in port %u\n", nb_free, + pkt_per_port, portid); } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-04-10 14:06:09.501484032 +0100 +++ 0019-test-pmd_perf-fix-the-way-to-drain-the-port.patch 2019-04-10 14:06:07.834294930 +0100 @@ -1,8 +1,10 @@ -From 4c3cd4c294f883a5cf6d75425351b855d5f4be05 Mon Sep 17 00:00:00 2001 +From eaf3a3063c9b15f45042904bf97ca5d758dd90a2 Mon Sep 17 00:00:00 2001 From: Julien Meunier Date: Wed, 20 Feb 2019 23:06:08 +0200 Subject: [PATCH] test/pmd_perf: fix the way to drain the port +[ upstream commit 4c3cd4c294f883a5cf6d75425351b855d5f4be05 ] + If the port has received less than ``pkt_per_port`` packets (for example, the port has missed some packets), the test is in an infinite loop. @@ -12,7 +14,6 @@ continue. Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx") -Cc: stable@dpdk.org Signed-off-by: Julien Meunier Reviewed-by: Ferruh Yigit