[dpdk-stable] patch 'test/pmd_perf: fix the way to drain the port' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Wed Apr 10 18:43:27 CEST 2019


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 <julien.meunier at nokia.com>
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 <julien.meunier at nokia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 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 <julien.meunier at nokia.com>
 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 at dpdk.org
 
 Signed-off-by: Julien Meunier <julien.meunier at nokia.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>


More information about the stable mailing list