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 AFB52A034C for ; Wed, 20 Jul 2022 10:27:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7C1840697; Wed, 20 Jul 2022 10:27:17 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2071.outbound.protection.outlook.com [40.107.243.71]) by mails.dpdk.org (Postfix) with ESMTP id 33CC04003C for ; Wed, 20 Jul 2022 10:27:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M53SecIGsKLSMoivMO0FE155FvkSUMKNeHUrE8V/sTx6/W7lU/t1RRjOcouTXNEficjyDmTLYF0pgg6NING+GafxTSZ2+WxS4RB1+MQaFt0nzucvNSyggv32wwdExkuhvCOrofeXZpdSgpYOr6Rd7xiVQu3HEijYJD1yygrIF0Ib8LZ/y4uiK9MaI+aj9wl0Q3fMy279zNGCioQfWNjq45jBBvLvsJ2qSm9oIc0YIf2z+QVnp4jL0ocgMQx28Xv6WNCjV6ccVmumF9w/PhTyvzQM8pvxkquZXzcRs20up0Tzf5OLoVL2+Y+Fp34KdrNmyo1ZP2diT+pnB0w4CO3pKg== 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=E4/wtf4xjTCKVeckMVW6b524dJYpCJLRmhnwt8QpG+g=; b=RDBbXWAOE9nLSYjRq5NGvZt48677WdGMOXW3lpmPxpT/UFVikBVWfJt0d0/nYwQrOadEyfFJl9QkReh58YKn5ocFy+JZyTYJB9cCjYi//HRj1a3g9Eia2KJ0vhdM0mBdVn1JywIIb9yHMvWsVz4U9ezBAkgWRaT1msw4S/cYsChYox84iQxxKHj9jtkDnF5aff30wseyABYfDMdxWdRT4/PsVy+L5kBj++BdspaD23j25OSz4787ZVIVlYqThiqDjY2GaF/4zu+Gq2wqqb7LhKK0mgsqH3aUWjGzTAgWMxsFjOzBkeDjK4W3MfaoUpZ/QXW+av31GX0Vv6Rnqx78Ng== 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=E4/wtf4xjTCKVeckMVW6b524dJYpCJLRmhnwt8QpG+g=; b=hzHjYKWMvk4uvrGivWyAmu2AmDezMdQLQI8EUgMn6I758GrFEVd0SZ3bjh7UNZDJgIN0q858XSQu/tSzeXrKnyTkkGBmXruOtcv0uTiGO/biaztYTD+9wJiIfpA1B3jAL8Q/o8qeTTR3DJk+Ij+Xl7NByU1deGLGizHEFlgxxLJIvaDDMCzuvLbkmxfHHT+rB1u33R2aibS0s7pyUaKdLMtH2jEURWdVVIHV1KfinnldARz/DmYpumNIl+GYuID6vB36hhGybnSpQiBUAJDHNt0ouIOa77TJkKRXg/gQMTBQxLCmknALiBrFVv43fMhF+VVaf1pY/2UBbSJfsebDUw== Received: from BN0PR07CA0008.namprd07.prod.outlook.com (2603:10b6:408:141::35) by CY4PR1201MB2517.namprd12.prod.outlook.com (2603:10b6:903:da::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.17; Wed, 20 Jul 2022 08:27:14 +0000 Received: from BN8NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:408:141:cafe::dc) by BN0PR07CA0008.outlook.office365.com (2603:10b6:408:141::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.19 via Frontend Transport; Wed, 20 Jul 2022 08:27:14 +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 BN8NAM11FT003.mail.protection.outlook.com (10.13.177.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:27:14 +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; Wed, 20 Jul 2022 08:27:13 +0000 Received: from nvidia.com (10.126.231.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.26; Wed, 20 Jul 2022 01:27:11 -0700 From: Xueming Li To: Harry van Haaren CC: , Naga Harish K S V , dpdk stable Subject: patch 'service: fix lingering active status' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:21:30 +0300 Message-ID: <20220720082132.3954126-61-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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: 07212446-a346-4fe1-0675-08da6a29a680 X-MS-TrafficTypeDiagnostic: CY4PR1201MB2517:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?q4vu1WRR/cy0OQSop9wYYYoAwo9JDKZ2SRSz4l6XZO7Rhcoh9v2dxBXFi9Pw?= =?us-ascii?Q?6hKr7lNcCGqpIDQr2Bt0lUTdeN9WPyv5hOIp9kT8uo9ULKYM+rEeEmB/125B?= =?us-ascii?Q?MSZyReigcY5/j8Ymqwt+DIq04cWSQDWJUlXLJ/MIIbBl6n6r6aLsnG1B9KJG?= =?us-ascii?Q?zirVbrxcL2jO8bePhXj2dylKGqfHkfO5hNfUUybeVfGTlXf76R3EVZZ1JyiX?= =?us-ascii?Q?XO2C0RzL6XtY0AWbXBAGSfrzLn5XHSly4Q/zUAJE6Yw4DPJXd2yP3CysDQ/F?= =?us-ascii?Q?RkcqwQ2L/aljzM/SwE4a1Fo+nYQjdM0JZxcfyd1tIHXc3Ses8+BN8QVfnXjX?= =?us-ascii?Q?30zJmT8IOhpoJmo0zZQ72sPrvy+G6yf7Ot0z7J4Ab7zre6trJegHO21OI6px?= =?us-ascii?Q?ruVHR9PYlPP3UkTveXbH0x1ejW8atCZXxVfWoQ/U9hTJx+Ldli/UkmghjOSw?= =?us-ascii?Q?QScLEcdiVmb4AdYGYsemT8j4UKos+RDSYrXis7Uc5/GSc0xoCiHa1m0CwAIq?= =?us-ascii?Q?qSQkEzN2DxTeQxjGSX6T2+chY+vLLI8T+fAKm1FC/w5OT1iOe3jdLOvMInx8?= =?us-ascii?Q?TP4bxUR5fC0x/CSGYxxNcDa39PIAUrn+/CIjX1DJVB2Qswoaa8p3nejoFkTl?= =?us-ascii?Q?eT80/N3mpqU+GS8ey+3DJTvdDuLe125iKrWeen69IkzhXbZjRDZdES1dNgVa?= =?us-ascii?Q?T+sXu9BUPwUSh6tgidLaRKFtvKWf9gJ11HyeSqGWPeOMJxcI0zhstSO55vOS?= =?us-ascii?Q?Ejzd/rfgMiMDJJyjGIzsc6mSrTxHdqNDolR2JYdjwjGKxLjxkNUo3qnEzDXi?= =?us-ascii?Q?v1IlYdM98HZndZm+xjUGE/kSAkDdKLSWm544gsa+P+pomygETAj1I0xJWdVq?= =?us-ascii?Q?yTe7M7OCMfWcKHXp1cxi34KMLh9vDecfLNBXpmrPH25v+5Z5HR8RnHNnGagg?= =?us-ascii?Q?qFCLtIh39XZKruGQFOQ3dg=3D=3D?= 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)(346002)(376002)(136003)(396003)(39860400002)(40470700004)(36840700001)(46966006)(6286002)(8936002)(86362001)(81166007)(70206006)(8676002)(4326008)(53546011)(55016003)(82740400003)(70586007)(54906003)(7696005)(356005)(36756003)(6916009)(966005)(26005)(40460700003)(316002)(1076003)(186003)(426003)(6666004)(41300700001)(2616005)(478600001)(36860700001)(82310400005)(336012)(16526019)(5660300002)(83380400001)(2906002)(40480700001)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:27:14.4239 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 07212446-a346-4fe1-0675-08da6a29a680 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: BN8NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB2517 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 07/22/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/51b005b1a43305846a17abbb0c418201ab874559 Thanks. Xueming Li --- >From 51b005b1a43305846a17abbb0c418201ab874559 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Tue, 5 Jul 2022 13:32:07 +0000 Subject: [PATCH] service: fix lingering active status Cc: Xueming Li [ upstream commit 6550113be62d1bd27b2f2dc07d7a888ad9499006 ] This commit fixes an issue where calling rte_service_lcore_stop() would result in a service's "active on lcore" status becoming stale. The stale status would result in rte_service_may_be_active() always returning "1", indicating that the service is not certainly stopped. This is fixed by ensuring the "active on lcore" status of each service is set to 0 when an lcore is stopped. Fixes: e30dd31847d2 ("service: add mechanism for quiescing") Fixes: 8929de043eb4 ("service: retrieve lcore active state") Reported-by: Naga Harish K S V Signed-off-by: Harry van Haaren --- lib/librte_eal/common/rte_service.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index bd8fb72e78..e76c2baffc 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -764,7 +764,9 @@ rte_service_lcore_stop(uint32_t lcore) return -EALREADY; uint32_t i; - uint64_t service_mask = lcore_states[lcore].service_mask; + struct core_state *cs = &lcore_states[lcore]; + uint64_t service_mask = cs->service_mask; + for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) { int32_t enabled = service_mask & (UINT64_C(1) << i); int32_t service_running = rte_service_runstate_get(i); @@ -772,6 +774,11 @@ rte_service_lcore_stop(uint32_t lcore) __atomic_load_n(&rte_services[i].num_mapped_cores, __ATOMIC_RELAXED)); + /* Switch off this core for all services, to ensure that future + * calls to may_be_active() know this core is switched off. + */ + cs->service_active_on_lcore[i] = 0; + /* if the core is mapped, and the service is running, and this * is the only core that is mapped, the service would cease to * run if this core stopped, so fail instead. -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:01:01.592589680 +0800 +++ 0061-service-fix-lingering-active-status.patch 2022-07-20 15:00:58.807667007 +0800 @@ -1 +1 @@ -From 6550113be62d1bd27b2f2dc07d7a888ad9499006 Mon Sep 17 00:00:00 2001 +From 51b005b1a43305846a17abbb0c418201ab874559 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6550113be62d1bd27b2f2dc07d7a888ad9499006 ] @@ -21 +24 @@ - lib/eal/common/rte_service.c | 9 ++++++++- + lib/librte_eal/common/rte_service.c | 9 ++++++++- @@ -24,5 +27,5 @@ -diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c -index ef31b1f63c..d2b7275ac0 100644 ---- a/lib/eal/common/rte_service.c -+++ b/lib/eal/common/rte_service.c -@@ -758,7 +758,9 @@ rte_service_lcore_stop(uint32_t lcore) +diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c +index bd8fb72e78..e76c2baffc 100644 +--- a/lib/librte_eal/common/rte_service.c ++++ b/lib/librte_eal/common/rte_service.c +@@ -764,7 +764,9 @@ rte_service_lcore_stop(uint32_t lcore) @@ -39 +42 @@ -@@ -766,6 +768,11 @@ rte_service_lcore_stop(uint32_t lcore) +@@ -772,6 +774,11 @@ rte_service_lcore_stop(uint32_t lcore)