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

Kevin Traynor ktraynor at redhat.com
Thu Jun 9 13:35:51 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.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 06/13/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/242c01792cbc6a75299951e0177c014b7b74fc6c

Thanks.

Kevin

---
>From 242c01792cbc6a75299951e0177c014b7b74fc6c 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 0aa9dc1b1c..4094057b27 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -455,4 +455,5 @@ main_loop(__rte_unused void *args)
 #define FRAME_GAP 12
 #define MAC_PREAMBLE 8
+#define MAX_RETRY_COUNT 5
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
 	unsigned lcore_id;
@@ -462,4 +463,6 @@ main_loop(__rte_unused void *args)
 	uint64_t diff_tsc;
 	uint64_t packets_per_second, total_packets;
+	int retry_cnt = 0;
+	int free_pkt = 0;
 
 	lcore_id = rte_lcore_id();
@@ -479,8 +482,17 @@ main_loop(__rte_unused void *args)
 			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);
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:29.892223393 +0100
+++ 0004-test-avoid-hang-if-queues-are-full-and-Tx-fails.patch	2022-06-09 12:34:29.609980409 +0100
@@ -1 +1 @@
-From 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 Mon Sep 17 00:00:00 2001
+From 242c01792cbc6a75299951e0177c014b7b74fc6c 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 0aa9dc1b1c..4094057b27 100644
@@ -25 +26 @@
-@@ -457,4 +457,5 @@ main_loop(__rte_unused void *args)
+@@ -455,4 +455,5 @@ main_loop(__rte_unused void *args)
@@ -31 +32 @@
-@@ -464,4 +465,6 @@ main_loop(__rte_unused void *args)
+@@ -462,4 +463,6 @@ main_loop(__rte_unused void *args)
@@ -38 +39 @@
-@@ -481,8 +484,17 @@ main_loop(__rte_unused void *args)
+@@ -479,8 +482,17 @@ main_loop(__rte_unused void *args)



More information about the stable mailing list