patch 'test: avoid hang if queues are full and Tx fails' has been queued to stable release 19.11.13

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:54:21 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/09/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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/c4b081a060c9ce4287a42480abe6ddd2c58454a2

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From c4b081a060c9ce4287a42480abe6ddd2c58454a2 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla at marvell.com>
Date: Tue, 20 Jul 2021 22:20:52 +0530
Subject: [PATCH] test: avoid hang if queues are full and Tx fails

[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ]

Current pmd_perf_autotest() in continuous mode tries
to enqueue MAX_TRAFFIC_BURST completely before starting
the test. Some drivers cannot accept complete
MAX_TRAFFIC_BURST even though rx+tx desc count can fit it.
This patch changes behaviour to stop enqueuing after few
retries.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla at marvell.com>
---
 app/test/test_pmd_perf.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 60fa5d1ff6..832af747c6 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -459,6 +459,7 @@ main_loop(__rte_unused void *args)
 #define PACKET_SIZE 64
 #define FRAME_GAP 12
 #define MAC_PREAMBLE 8
+#define MAX_RETRY_COUNT 5
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
 	unsigned lcore_id;
 	unsigned i, portid, nb_rx = 0, nb_tx = 0;
@@ -466,6 +467,8 @@ main_loop(__rte_unused void *args)
 	int pkt_per_port;
 	uint64_t diff_tsc;
 	uint64_t packets_per_second, total_packets;
+	int retry_cnt = 0;
+	int free_pkt = 0;
 
 	lcore_id = rte_lcore_id();
 	conf = &lcore_conf[lcore_id];
@@ -483,10 +486,19 @@ main_loop(__rte_unused void *args)
 			nb_tx = RTE_MIN(MAX_PKT_BURST, num);
 			nb_tx = rte_eth_tx_burst(portid, 0,
 						&tx_burst[idx], nb_tx);
+			if (nb_tx == 0)
+				retry_cnt++;
 			num -= nb_tx;
 			idx += nb_tx;
+			if (retry_cnt == MAX_RETRY_COUNT) {
+				retry_cnt = 0;
+				break;
+			}
 		}
 	}
+	for (free_pkt = idx; free_pkt < (MAX_TRAFFIC_BURST * conf->nb_ports);
+			free_pkt++)
+		rte_pktmbuf_free(tx_burst[free_pkt]);
 	printf("Total packets inject to prime ports = %u\n", idx);
 
 	packets_per_second = (link_mbps * 1000 * 1000) /
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.317141745 +0200
+++ 0026-test-avoid-hang-if-queues-are-full-and-Tx-fails.patch	2022-07-07 09:54:10.837823826 +0200
@@ -1 +1 @@
-From 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 Mon Sep 17 00:00:00 2001
+From c4b081a060c9ce4287a42480abe6ddd2c58454a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 25611bfe9b..ec3dc251d1 100644
+index 60fa5d1ff6..832af747c6 100644
@@ -25 +26 @@
-@@ -456,6 +456,7 @@ main_loop(__rte_unused void *args)
+@@ -459,6 +459,7 @@ main_loop(__rte_unused void *args)
@@ -33 +34 @@
-@@ -463,6 +464,8 @@ main_loop(__rte_unused void *args)
+@@ -466,6 +467,8 @@ main_loop(__rte_unused void *args)
@@ -42 +43 @@
-@@ -480,10 +483,19 @@ main_loop(__rte_unused void *args)
+@@ -483,10 +486,19 @@ main_loop(__rte_unused void *args)


More information about the stable mailing list