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 371C7A034F for ; Wed, 10 Nov 2021 07:53:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30C4140142; Wed, 10 Nov 2021 07:53:57 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2088.outbound.protection.outlook.com [40.107.212.88]) by mails.dpdk.org (Postfix) with ESMTP id EA80F40E28 for ; Wed, 10 Nov 2021 07:53:55 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fO2tdax1wT7uD/j6/94c7w/sQIcOaAgPlAcAMAPRq7jsJ7LZUgKfo21G6/kEznRJdVt4Jd2a2BNIBEL0e64SU+HZSyYVQdl40sv6jMuoTZLzSaAo2G1aYXyPGQmmIb7tykLBYoM/EpWBMmpudHs0XPe/qWp0l4qn57rFaNzp/N7ouwlqRMUlzYqp7Auo1E+Mh6yihqujXpu7lJtsMKyBCoUqLod3aliIIWZabic1RQm1isDujEZq+/GigvW7hwQtCo5osbhficozs36wih1r5Krx/E+3cuFFe/CBqBhYDUCFGCfD8OUIDsp6TLUdh4IBYXPmkD4FNlLMbojI0QJ79g== 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=zAHvK1RFEyNLmOjrMPmk2h9rUgcQ0zCdRIOV9V4FuXM=; b=TXDBBrPWr4A57Zdpx/9/yjX/SJ6KtTww1rXiimC0UTPzLMO2QoG3AAksuXU7UMgYKKvwkmi0MAIT6c7XH9Jp3bTACAWdd3bQU1Bixq8tWFRgpJ+2yWjpdkvum2jfRAQGWNf6vR1DbQ7sG5L1MA8ACguxwITKEm1Y2P879LizwnaiAqNA4q3wkE3HO5RatIaJIJDEl8NZx+UHuv99N6SSCIMxVvSr8MR+UF0l0CcLhzI5VJbV+9YsJN4jKG8ai3KJxzeiTmkhNGMuMr9WE8lq/OqOX6LNCs+cemlAennWifKfZdP8QXuwvuixKn/GT2OARyxJzRSD9vyMkNRkk3tK3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=zAHvK1RFEyNLmOjrMPmk2h9rUgcQ0zCdRIOV9V4FuXM=; b=Wl9AePA3V3mplQ1lhBULETx2IeZkXiW1PJv8hpIvai0j+xA9Dq4MA6uc2L8lFtnzC3mZSjZtzpwfYs1ADKASP94xVVVrGyUsu0xU52YUEQAv2CLXdGXbpM2c4RrP1NiP8Uoir6tE4jcl5ggE0/XLxK3tRCIhdPLjy3N8zRwNtYdEDjTteMDbj9CI+qNN4sTQxDTl9EYDDHGMt5hIx0223XAUSGchzvHAa+9hhm8gnFtpEQ3LptjSXIa1VofWcVjIGKPjRvUxmFxFGMS8uSNrAamfWhEixLDavNkrs7MAQKTgPhh34CymWLtuOTZMW0DQlPvUfV/J6TRutkojZNB+CA== Received: from BN8PR07CA0033.namprd07.prod.outlook.com (2603:10b6:408:ac::46) by MN2PR12MB3149.namprd12.prod.outlook.com (2603:10b6:208:d2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.18; Wed, 10 Nov 2021 06:53:53 +0000 Received: from BN8NAM11FT013.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::4f) by BN8PR07CA0033.outlook.office365.com (2603:10b6:408:ac::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend Transport; Wed, 10 Nov 2021 06:53:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT013.mail.protection.outlook.com (10.13.176.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:53:52 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:53:49 +0000 From: Xueming Li To: Honnappa Nagarahalli CC: Luca Boccassi , Ruifeng Wang , Feifei Wang , dpdk stable Date: Wed, 10 Nov 2021 14:31:16 +0800 Message-ID: <20211110063216.2744012-193-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 913d172e-dc76-4624-83bb-08d9a416db69 X-MS-TrafficTypeDiagnostic: MN2PR12MB3149: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: USHsCFnOMeHHLkF250WOxVSjxxjj/YZ6zUjvSzYRh/n1r6fU+qq6j1FJ6nb8hozQbPMYHW9NVlZ7l5G4oCVsh8e018yIFxT5wOeO3tKgC2/0GejM9qiJCdkunpACK0vzYfnFtl3WRO17LTdXTh/Y5NTX3wvVQYiTgitPYwjVyt/mFkvS8/9/rtI+p68DDVnvfRpw3FxXBZQxvlPKoz57j6MIFUhe1BOXetMwu4IJppDYFMrpc/1CzGu8++dQ5XMRxa2SEDIzUqxS96EC/avTR11z+ZIE7mU2ki6yjec+5pc6t4n16J4Yi+dFF9bvRc8wnoAqOlxebbGHqALcQqwv7wr7RBjmcmc3w6vmrn7LllDlNiCOhPsrfA9FcZ421bpStPeKJe6SHzk4PNtjIQNL1aVxnnd72OBtmbFUGghk/hLr8Tyl8VHswjGMOqLu4vYQP7RDEwlK+QG2dIRWGGWU3g1kFKuqYbnw9eeHPQHEV0o98MVfBIPOgHNY2ch9HFndcvydzz9Z9yGhJISvZonI1k4npfztwJ40wPKinDf6Wh3Z/TERfb9SZcZODjo5GN4X0dU+IaildtVMWaPPdbhoul1HBpD7btFMxMrtDiVBdCvfq/0hsbrIAr9T3uv7S0BZfQ3vfTiskYDYHuobwG95bN085ZkZFR0PdoWv2WTu6/NwtEsddKp15QCa2y047jesYAeBtWNZj8HRggwz/4px02ZoA6KACPedIk3sS0OeM4jSeiHsVQl7XBEEDPk2pgYKtcJVH7LglCvF21A/N4dCrGVZxosPJH6VNwdyuQjbCN6rKjS5iBtu9fDhCo50V+kxt8JSMPcQ3JfrvcaMIB2d0A== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(36906005)(82310400003)(6916009)(2906002)(5660300002)(7696005)(6286002)(316002)(2616005)(86362001)(4001150100001)(36860700001)(508600001)(55016002)(8936002)(8676002)(53546011)(54906003)(4326008)(16526019)(26005)(426003)(186003)(336012)(966005)(36756003)(6666004)(1076003)(7636003)(356005)(70206006)(47076005)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:53:52.5437 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 913d172e-dc76-4624-83bb-08d9a416db69 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT013.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3149 Subject: [dpdk-stable] patch 'eal: reset lcore task callback and argument' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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/6c7884c1caced1127482c07596f113253bada945 Thanks. Xueming Li --- >From 6c7884c1caced1127482c07596f113253bada945 Mon Sep 17 00:00:00 2001 From: Honnappa Nagarahalli Date: Sun, 24 Oct 2021 23:52:34 -0500 Subject: [PATCH] eal: reset lcore task callback and argument Cc: Xueming Li [ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ] In the rte_eal_remote_launch function, the lcore function pointer is checked for NULL. However, the pointer is never reset to NULL. Reset the lcore function pointer and argument after the worker has completed executing the lcore function. Fixes: af75078fece3 ("first public release") Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang Reviewed-by: Feifei Wang --- lib/librte_eal/freebsd/eal_thread.c | 2 ++ lib/librte_eal/linux/eal_thread.c | 2 ++ lib/librte_eal/windows/eal_thread.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c index 1dce9b04f2..bbc3a8e985 100644 --- a/lib/librte_eal/freebsd/eal_thread.c +++ b/lib/librte_eal/freebsd/eal_thread.c @@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg) fct_arg = lcore_config[lcore_id].arg; ret = lcore_config[lcore_id].f(fct_arg); lcore_config[lcore_id].ret = ret; + lcore_config[lcore_id].f = NULL; + lcore_config[lcore_id].arg = NULL; rte_wmb(); lcore_config[lcore_id].state = FINISHED; } diff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c index 83c2034b93..8f3c0dafd6 100644 --- a/lib/librte_eal/linux/eal_thread.c +++ b/lib/librte_eal/linux/eal_thread.c @@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg) fct_arg = lcore_config[lcore_id].arg; ret = lcore_config[lcore_id].f(fct_arg); lcore_config[lcore_id].ret = ret; + lcore_config[lcore_id].f = NULL; + lcore_config[lcore_id].arg = NULL; rte_wmb(); /* when a service core returns, it should go directly to WAIT diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c index 9c3f6d69fd..df1df5d02c 100644 --- a/lib/librte_eal/windows/eal_thread.c +++ b/lib/librte_eal/windows/eal_thread.c @@ -110,6 +110,8 @@ eal_thread_loop(void *arg __rte_unused) fct_arg = lcore_config[lcore_id].arg; ret = lcore_config[lcore_id].f(fct_arg); lcore_config[lcore_id].ret = ret; + lcore_config[lcore_id].f = NULL; + lcore_config[lcore_id].arg = NULL; rte_wmb(); /* when a service core returns, it should go directly to WAIT -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:10.435509806 +0800 +++ 0192-eal-reset-lcore-task-callback-and-argument.patch 2021-11-10 14:17:02.000745027 +0800 @@ -1 +1 @@ -From 33969e9c61385fc397f1934324e231ece9750404 Mon Sep 17 00:00:00 2001 +From 6c7884c1caced1127482c07596f113253bada945 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -18,3 +20,3 @@ - lib/eal/freebsd/eal_thread.c | 2 ++ - lib/eal/linux/eal_thread.c | 2 ++ - lib/eal/windows/eal_thread.c | 2 ++ + lib/librte_eal/freebsd/eal_thread.c | 2 ++ + lib/librte_eal/linux/eal_thread.c | 2 ++ + lib/librte_eal/windows/eal_thread.c | 2 ++ @@ -23 +25 @@ -diff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c +diff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c @@ -25,2 +27,2 @@ ---- a/lib/eal/freebsd/eal_thread.c -+++ b/lib/eal/freebsd/eal_thread.c +--- a/lib/librte_eal/freebsd/eal_thread.c ++++ b/lib/librte_eal/freebsd/eal_thread.c @@ -36 +38 @@ -diff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c +diff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c @@ -38,2 +40,2 @@ ---- a/lib/eal/linux/eal_thread.c -+++ b/lib/eal/linux/eal_thread.c +--- a/lib/librte_eal/linux/eal_thread.c ++++ b/lib/librte_eal/linux/eal_thread.c @@ -49 +51 @@ -diff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c +diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c @@ -51,2 +53,2 @@ ---- a/lib/eal/windows/eal_thread.c -+++ b/lib/eal/windows/eal_thread.c +--- a/lib/librte_eal/windows/eal_thread.c ++++ b/lib/librte_eal/windows/eal_thread.c