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 E5F05A0555 for ; Thu, 9 Jun 2022 13:37:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C50C340A7D; Thu, 9 Jun 2022 13:37:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A534640A7D for ; Thu, 9 Jun 2022 13:37:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654774637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ByzI2hi9tQ7ToesXpK2xMkyUUeCFg8BHkkdFQvb6wrA=; b=B/stjg/RxtsMUmeZ5IFgqfVvZ+TgYpnaq/7XNU71FCdFFppvKuGnKsFe6FmI3fjTPnXXvJ K3ddKPVUARo/I+O4ld8PhsO9JDwjVOKqwD0Bjq0Z28ocNm/jOUYAzok4MLCxkDnzhCiTtG QQoDl+Y0SttXgOjAiI4WUvtnBZ8iSTY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-327-6np4nwq_P9KpifY3gsMXpQ-1; Thu, 09 Jun 2022 07:37:16 -0400 X-MC-Unique: 6np4nwq_P9KpifY3gsMXpQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4797B1C0514E; Thu, 9 Jun 2022 11:37:16 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72B6A18EA3; Thu, 9 Jun 2022 11:37:15 +0000 (UTC) From: Kevin Traynor To: Rakesh Kudurumalla Cc: dpdk stable Subject: patch 'test: avoid hang if queues are full and Tx fails' has been queued to stable release 21.11.2 Date: Thu, 9 Jun 2022 12:35:51 +0100 Message-Id: <20220609113701.386938-4-ktraynor@redhat.com> In-Reply-To: <20220609113701.386938-1-ktraynor@redhat.com> References: <20220609113701.386938-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 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 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 --- 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@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)