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 97F1E46A63 for ; Thu, 26 Jun 2025 14:08:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 910EF4026B; Thu, 26 Jun 2025 14:08:45 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2055.outbound.protection.outlook.com [40.107.92.55]) by mails.dpdk.org (Postfix) with ESMTP id 870BF4026B for ; Thu, 26 Jun 2025 14:08:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xx2nHLGMPexEYW0MZjCzl3zr+K9YXA9VrkHDH/4d5tu63/A5Wm0PAKMsN0cwyc+uEPjrBRQfrYw5S+ryGMfQnCy6pY+la9bD6+wJtOZX7BpQUt6wgUZc89abFKmrglCIYYC5RsGAV3folnRbJREi2ExCNh/jPeZUnoF8aIFLSuKg5L+wEOm9YfKSzIBvuQ9TE5V5CoJCTcxltW/RMjGYrnk5jLyS8WZSgBR1WI3aa91QGYMzguXHLDOgcXVvTCpnLFM4TX6QzZ5I8bZCyJV4y8m7jYBUBKRLCDoJ1Dn2iQF9HpsggJD/WHLJubj0uo3ckStjWsaulU5mvX6PiXuwXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=igV4wvsSx6CV37yaq8ZBm7wCdT7vyqj3+vZq7TvwfTo=; b=qYTEQKlWwcvw2yfXnvIPa3ga8ZbjxJC9fMnvMGVOnHS2IkaZCOZPIAG9Rt5Kngrv/l2ELomOHx9saFB/lpNFnQ1fhF7Ki/vjWT0OYnToq7mDplv4ddkSoBItJKjrytr4cv4gSQzxMHZkXXdk2nIpaawVwQQ8/4nCmSB4eh3goNgarguDC9QDgJgjfhdRY3cUfuFFu4WUhh6pvHwKk+jdeMzppdhP9T2pcIMhh1AdHKcq/pNSfULJKdaU516+QakeAaPm+gU8Jw9v1Iu2+1jfhQcYjlOgrfX8unJ97VsLVmu9+RH9Vr2Yl451r7pXW5VHmFUovuZmIOZglRIFtdeqBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=redhat.com 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 (0) 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=igV4wvsSx6CV37yaq8ZBm7wCdT7vyqj3+vZq7TvwfTo=; b=iO1Uw8IKbgSCdtvTWhVVKBz0FO2sQDYUHooE1CEBqj3TJzZvHuZgld0S59ugdUo2XpiffaqSu3f2q38lKNqb0PHUetZ2L4pT3BQ7mpFI0bIHVQZSqR35GRlfecIrRLYNMtEsFzzHqgRCpW8k3FlMX7aFQbD4PWCmG24ppagZVrK1SMPX515GkBAJJ24GBrGUrvjRxVIie0BhyNuNHV8j4cQPCEmK2z87bEA4arEnDntja9Z089D0A9qZJNqKs7V7dYZdDk+7H/4Cx4t2p5mfto0X/RNzErr5gLcq9Nf7/JMZpZmnD6r/9Kwccbh0y1UoKPlPGzCw0W1GlcUyEgMHQg== Received: from SJ0PR03CA0012.namprd03.prod.outlook.com (2603:10b6:a03:33a::17) by SN7PR12MB8791.namprd12.prod.outlook.com (2603:10b6:806:32a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.21; Thu, 26 Jun 2025 12:08:40 +0000 Received: from SJ5PEPF000001D2.namprd05.prod.outlook.com (2603:10b6:a03:33a:cafe::da) by SJ0PR03CA0012.outlook.office365.com (2603:10b6:a03:33a::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8880.20 via Frontend Transport; Thu, 26 Jun 2025 12:08:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SJ5PEPF000001D2.mail.protection.outlook.com (10.167.242.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.14 via Frontend Transport; Thu, 26 Jun 2025 12:08:40 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 26 Jun 2025 05:08:23 -0700 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.1544.14; Thu, 26 Jun 2025 05:08:22 -0700 From: Xueming Li To: David Marchand CC: Xueming Li , dpdk stable Subject: patch 'test/lcore: fix race in per-lcore test' has been queued to stable release 23.11.5 Date: Thu, 26 Jun 2025 20:01:33 +0800 Message-ID: <20250626120145.27369-74-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250626120145.27369-1-xuemingl@nvidia.com> References: <20250626120145.27369-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: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001D2:EE_|SN7PR12MB8791:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c4f99b7-3001-4ca1-0717-08ddb4aa3055 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|376014|36860700013|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?GKEmzHt8/j6xauIdoNZgpbEfnQxugvdj2N8kX9ZWwhiKDS+2Sk130b3WK+it?= =?us-ascii?Q?GhBmWJsNnZTRoPQe7PmuY/tg888ou0wKve0lXZSJaBxzMjWufdvDJ4ZFt70I?= =?us-ascii?Q?FPdTxK9T449owembVid3+KIpL7VdxiyqhO1ndgO6GPAjpIZ7nhDMaoGWfoNP?= =?us-ascii?Q?G+tdELRBvJxCfKC2RfbDjg8p6oawGabPPNtJl5Dqj7fZ3L0z+rehN/63z8M3?= =?us-ascii?Q?cMdLk7rzFGnRVuTh5rd6d19BMSDLZ04L9AwXfNPVoEaOz+kOpPscrvGz1N60?= =?us-ascii?Q?BTLOr8N+njoBF/ae50J5uE+vLqQYrPtXBTb4xHix+IFx3IL5c51LPsk366rj?= =?us-ascii?Q?th5ATfz7t+t7V+Mf8FXppWskB+iAW7gnNekZ/M/VVg5gT9MLFAkvU2S2f74i?= =?us-ascii?Q?wbG8GEDmEski5oAsomleK8bTvMM1VCmTX88IAB15E0sos0Yt1azd2vjdJbAk?= =?us-ascii?Q?bk8zvk3aYhuFl/hOBiftzBpkMrURZGHXUkBLcY5gWgmKEvdzA9S9a088iqos?= =?us-ascii?Q?ZUxSyhPN33XrcSsEbKq5ZD6IBYlcaxOI570HkdIkJXkzk6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UC/V1dHEI7cuvvvOkT/4AaCJ/JqOUC/ERtf1X8Wj8gFKucad+VXJktCyk?= =?us-ascii?Q?m4/K7OctxQaPQKYszkrWGfthTml0NIRtmwUcGRkecRdRM5DINQs2nBPycQ?= =?us-ascii?Q?=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(376014)(36860700013)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2025 12:08:40.4346 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c4f99b7-3001-4ca1-0717-08ddb4aa3055 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001D2.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8791 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 23.11.5 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/28/25. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e492f88b843f26e254df7d04f9d7e92c2cfce519 Thanks. Xueming Li --- >From e492f88b843f26e254df7d04f9d7e92c2cfce519 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Mon, 17 Mar 2025 15:30:15 +0100 Subject: [PATCH] test/lcore: fix race in per-lcore test Cc: Xueming Li [ upstream commit 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 ] In some CI, this unit test can fail, as the main thread may get rescheduled while lcores execute the callback waiting 100ms. Bugzilla ID: 1668 Fixes: af75078fece3 ("first public release") Signed-off-by: David Marchand --- app/test/test_per_lcore.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c index 63c5c80c24..9c72f0fa21 100644 --- a/app/test/test_per_lcore.c +++ b/app/test/test_per_lcore.c @@ -59,17 +59,29 @@ display_vars(__rte_unused void *arg) } static int -test_per_lcore_delay(__rte_unused void *arg) +test_per_lcore_delay(void *arg) { + RTE_ATOMIC(bool) *wait; + rte_delay_ms(100); printf("wait 100ms on lcore %u\n", rte_lcore_id()); + if (arg == NULL) + return 0; + + wait = arg; + while (rte_atomic_load_explicit(wait, rte_memory_order_relaxed)) { + rte_delay_ms(100); + printf("wait 100ms on lcore %u\n", rte_lcore_id()); + } + return 0; } static int test_per_lcore(void) { + RTE_ATOMIC(bool) wait = true; unsigned lcore_id; int ret; @@ -86,7 +98,7 @@ test_per_lcore(void) } /* test if it could do remote launch twice at the same time or not */ - ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MAIN); + ret = rte_eal_mp_remote_launch(test_per_lcore_delay, &wait, SKIP_MAIN); if (ret < 0) { printf("It fails to do remote launch but it should able to do\n"); return -1; @@ -97,6 +109,7 @@ test_per_lcore(void) printf("It does remote launch successfully but it should not at this time\n"); return -1; } + rte_atomic_store_explicit(&wait, false, rte_memory_order_relaxed); RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-26 19:59:20.500877614 +0800 +++ 0073-test-lcore-fix-race-in-per-lcore-test.patch 2025-06-26 19:59:17.486418040 +0800 @@ -1 +1 @@ -From 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 Mon Sep 17 00:00:00 2001 +From e492f88b843f26e254df7d04f9d7e92c2cfce519 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org