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 05804A0543 for ; Tue, 21 Jun 2022 10:08:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00C7F4281C; Tue, 21 Jun 2022 10:08:11 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2047.outbound.protection.outlook.com [40.107.96.47]) by mails.dpdk.org (Postfix) with ESMTP id EC3A14281C for ; Tue, 21 Jun 2022 10:08:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W+Rp6pfVQ8bHTPoEUojL6P/hT8HP5HSsDLjm03VcjrPqjyecGVH8MlBLnrIX84bQHAeCluqnGc004ofkmDAwia6uvJRfS9uw6lq4mlnH48oL/fmSnHqD3N61LYUVZd+E/+ObCx9LRuWBeAm6kIKUvhLGdgurj9Dn4vIi8u16fM2H2PaE7G7nGKY+42NhQW0WXMmoB5Dsy+vgWO8GLOo+93JnPxbjey2VyAnNFoFSogD/A0ZUaHCTWPDSOJUklL7rpW/HGQIsI4/6DNbXIWUxu1hTbxRE4ryXHDbiRE/Mrh5G3D615BgRG/SRezWUpRfZ904SRnBpCml9Xy5UH/py2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OoSG11HoKZXdjKGPjzijJa3G5BnpF+zo0T+AoR9BHmY=; b=S4mxtzjrBuU6zoGZFYedi3+tOaIqF+kpXfa4+jTwOcJPBEBu0oF59Hh74+Pxv1G6AtQ29Pon6KjZIkBUI9Lo2IANdtVL8phfDh8N2InVd7f+OIiLPE4WNsSS8GFg3oLMU2dD+DkU91X4BVNL77oOCPtKiwmR2zm89rlWl9sF0yFqFp13bphAmafYmOEw0fryeVQZruDLNRl1nuIDJ5DeCqY0fRtJETYzP20m4v8nVMjSGeiCwhzOnX6ViybJ0BR5ArifyCUdm9gt8T6dMewxFxNXL4BoXhp1Izrq42OtjJLKo5dmKlt6IRR5A5FpNnbuCui9dvMgBcA0DPAdvYWbvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OoSG11HoKZXdjKGPjzijJa3G5BnpF+zo0T+AoR9BHmY=; b=mtyVFtbL7uzHtcQBNd+VU29Md/9DytbbnQSYnx3nsGSi6e+kpqJCC+R1xoauzGF+Pnd2GfGbaAeNv9A1iDICRKbcYAIbHQnCRZrjX2QkdV/SGOknJpWKvkPy4t4M9FpfhNmdIQQqeZm5Y2FNssZZsVz9GolxMHsIIZB7jIGXQ33oyBYoK+S1kG1bc9JLFstN5KhLDpkkZicLYTuZMReCS2jfpS0Pla6t9JpF/D/+4GKg0huMDfDdZtvUCZtL+zmofzQulOeJu7ssi30moqVpdb/aywzclu8vg9Th2necMNE6URxDBRuEKmm9gozT4HmqYofg0PQX+G6i4VeNwYttgg== Received: from BN0PR07CA0020.namprd07.prod.outlook.com (2603:10b6:408:141::18) by MW2PR12MB2380.namprd12.prod.outlook.com (2603:10b6:907:4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Tue, 21 Jun 2022 08:08:06 +0000 Received: from BN8NAM11FT037.eop-nam11.prod.protection.outlook.com (2603:10b6:408:141:cafe::10) by BN0PR07CA0020.outlook.office365.com (2603:10b6:408:141::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.21 via Frontend Transport; Tue, 21 Jun 2022 08:08:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT037.mail.protection.outlook.com (10.13.177.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:08:06 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:08:05 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:08:04 -0700 From: Xueming Li To: Rakesh Kudurumalla CC: dpdk stable Subject: patch 'test: avoid hang if queues are full and Tx fails' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:03 +0300 Message-ID: <20220621080301.2315720-58-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: db0c1caa-8737-40f0-139d-08da535d2c2f X-MS-TrafficTypeDiagnostic: MW2PR12MB2380:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GGIew35StVmKQAhOoGwgg1/Ua4JcU71lA5GKf2whtBHtqf9mJk+UfEobb84FJ7NozAlQWXemDlwUAino2Tn4aa5hly/dCBtZPknvR7Gq4oIjTHGIWf43AwKAVtd6FIBYejZMn0DlXeOHMNQKZJc0tif0fpbLpk2DgLdLaMe/bJPw5HXIyPfMdz38nuguKv+ODTmaCNQ3TcopNo8fQPzN1ErW9ZzlDhY5Cgjzdce1+Ij9tv77lYI+Uqckwu2dUurr8ujCNCJ1IvSB4deo9hvDEomRJWIhcYtUAvneU84h3Uy5pkRtnidDLorSWqYAeWAKDyxLqQn3RHhzGx7Dxrp8V4H2gHyS/Qhj83XaCfCXcArKdaMD/1sg5rRNzrF39StjimfmGh9fG9oJl73qHdV04D/dBuSG7L6/+nhpu/6j0MEWvYRWCvybSSKZxsxDDdCHh8JWll2XkH8zbRlNAo9c/5mZGlGP0L5pMz8A8Lqalk/iQt2LIscU4Lxe8pa7rEzU71UbF2fzx5kIdtKEHMCYwuK5eNIdV9RYzeB1mx9wKKNVKa/2SvzvAOhxibK/uF5z56klWALOvsG6eitS36112x9lTte0VZjgCwOk2Haa3s7uYhdopXsjAhw46GNrdNGazrzG76Nn7D73S5RZfSVXORvWfLnaLGE6oCMRkADYLhrVeTX48sRPOQ66872m8+PbGuPURoBkmwW3jd33Lfn+96ORPYmklFRbt/2dFSysCaIxzKpnhdbB9bW6ovx8o/Goabb7niKXCW6l5c1gdZ3UCP2oYHejBgvZ9r7Hnsz4Bc4LVn2BNFYT2qll2RG+w3YI5yfE5G6wNAou626LP2KsMu2BCNwRuGxY9SjGx+SK6b0= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(376002)(136003)(346002)(39860400002)(40470700004)(36840700001)(46966006)(966005)(53546011)(7696005)(6286002)(26005)(41300700001)(2616005)(2906002)(16526019)(336012)(478600001)(40480700001)(40460700003)(82310400005)(55016003)(47076005)(5660300002)(356005)(6916009)(186003)(426003)(8676002)(316002)(8936002)(70206006)(36756003)(81166007)(70586007)(82740400003)(1076003)(4326008)(86362001)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:08:06.2818 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db0c1caa-8737-40f0-139d-08da535d2c2f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT037.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2380 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 20.11.6 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/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/20ee31283dfda5ede87129fba4d5ec410ab3c1b7 Thanks. Xueming Li --- >From 20ee31283dfda5ede87129fba4d5ec410ab3c1b7 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 Cc: Xueming Li [ 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 1ef844ba75..6ce02e3787 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -456,6 +456,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; @@ -463,6 +464,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]; @@ -480,10 +483,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.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.903408053 +0800 +++ 0057-test-avoid-hang-if-queues-are-full-and-Tx-fails.patch 2022-06-21 15:37:49.077784727 +0800 @@ -1 +1 @@ -From 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 Mon Sep 17 00:00:00 2001 +From 20ee31283dfda5ede87129fba4d5ec410ab3c1b7 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index 25611bfe9b..ec3dc251d1 100644 +index 1ef844ba75..6ce02e3787 100644