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 ACCD5A0540 for ; Thu, 7 Jul 2022 09:56:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A846340DDE; Thu, 7 Jul 2022 09:56:49 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 7054E40A7B for ; Thu, 7 Jul 2022 09:56:48 +0200 (CEST) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 2BF123F1FD for ; Thu, 7 Jul 2022 07:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180608; bh=mddFwpIKSTueLi5TegHxklVg5by3FrDr0b1liL7NoTc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lv2UFtBh/sobGw+qgeOztIOE7PJzZEAz/WbyLhsyiGG90laIal1A7LatpX5UUVf0p KKAR1kHIKVAsdIOpknfhc8ZHN6j1yB8o/3sl3Ddy/Y77PIROiY6k9WE0XUmKionQRb 5pK6mfu8X+6+RlMNGh5KSYwtwaYhdX0/tZzDePjXmPy+Lkk+Q8UB8s9q4siaqJmXn9 yBVRp0PE1h7+RiOCnCC3rSORo2gpoowD/aIUnYns8MAwo8pnr71lWhG5qob8WzEKwo y6vLcAe53jLdgjq/e0i+6V55qXqyW6kPKlvKGr+AHr/nrwHhtroG9QgeNEfRhtVJ79 V/oC5yD99/ung== Received: by mail-ed1-f70.google.com with SMTP id z17-20020a05640235d100b0043762b1e1e3so13466374edc.21 for ; Thu, 07 Jul 2022 00:56:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mddFwpIKSTueLi5TegHxklVg5by3FrDr0b1liL7NoTc=; b=llS545h5f3H2UI+/9UcjfitqTQi1kn0D5AicFpBSFq4koL+8mmWshqKeISldqoICAr FVXmMCXN5oGcCldsW6/nhwmNa28MlzadpMz7VOF08uUrbnL0VPLrz5tdtvYTN295gjyL wO4tyU3Jkn+gG85BjHjJm6KQkCskJDzE0ateoUFldstoJTzyHWHhrfRp5iyYUCafv3xj PRXpO1PS/5wD0aWWeowOD8SEUqYHT+6J57U52jlpRfvjjP5dQfNsJ2mtkzKp5dmPiTNi 0pSV2OT4dgpNIgTZZ2LxQ25u636cDmIRUOSBTflMEKhcWZfuTAkrtBUa3q5DOTCdx8uB csJQ== X-Gm-Message-State: AJIora/R0oUnqC4s19wEUfcKaa7E/a7dluVhPoaeqctwRhMwqJn9zJxi HFQK7IOcm7HwcqMR0rHZlLaySvmqmhPv/m82eJ8zMsvfiYi4ZBZh86kpzq2B3Ux0rJdhTQfdYYS tCOw9V/qNwMzvFbzQdmfpkdZk X-Received: by 2002:a17:907:7f05:b0:726:9770:77d6 with SMTP id qf5-20020a1709077f0500b00726977077d6mr43117048ejc.464.1657180607456; Thu, 07 Jul 2022 00:56:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vGjvb4j/kO1BONSv+P5Ue9gDa0vzdu3lQZOaute9gXw0UWRoer6vKXge+pb05w22Gbg8dTYg== X-Received: by 2002:a17:907:7f05:b0:726:9770:77d6 with SMTP id qf5-20020a1709077f0500b00726977077d6mr43117035ejc.464.1657180607237; Thu, 07 Jul 2022 00:56:47 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id eq26-20020a056402299a00b0043a26e3db72sm9957123edb.54.2022.07.07.00.56.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:56:46 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Rakesh Kudurumalla Cc: dpdk stable Subject: patch 'test: avoid hang if queues are full and Tx fails' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:21 +0200 Message-Id: <20220707075522.194223-26-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 --- >From c4b081a060c9ce4287a42480abe6ddd2c58454a2 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 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@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)