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 6A63A41D8D for ; Mon, 27 Feb 2023 08:09:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6601040ED6; Mon, 27 Feb 2023 08:09:41 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73]) by mails.dpdk.org (Postfix) with ESMTP id E2E4940A7D for ; Mon, 27 Feb 2023 08:09:40 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DlhO7dzhDPqiSRpBxIqSYDKI7P4BX/Aq033se/n0oCFo10Yam5pdlXvgp2skvcGMCfFy61i7HGv5LTpj9EUzJdM7hvpsU6IB7azPJ29quFQuAyppbQ1juO/dRCKauWOV61orPjKhFqVUdylptUnhZ27J6Ys4/cH6L5WfwEXhbhQ1pzuuYFmJz+0DvaDSxgM8AJ4FXn560jutzGPoEIxTU1gi6kmiBdgEgp8GRYM14glcTt+uOmLHZC7CJRRdBvR2OfS/9/AegtmRntcNrNFYjZplupq121Gv0tQqaNR9bN2/PzaKKTOrvUu3u2XvP9xJGXeXKb+gBfyVkUbKBTrE6g== 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=BFIJhIWzIItLs27SiNGIuWRfRQIVgpa8FCgJdF1TgGE=; b=RV8hFRx0g5tGolSsZgz6F2Y5M4U7mxkO6RaL6bcqiDERO+AFZaSerEWvbAD6woQrdaYJmsUayg27NXCGWUeyodiSkiUTTveiVIjInZaWhv5O53pZX9o/Gnk64IbPlHSNpfzNt/mH11Fc8D92lTjZcYCf0Cue55r+EyjhGdQ6+G2MZnWrToVXCYXZo/tv157NxY1jBefUAagsWWndg2TgDkzsrANgFxJVGXr3h6e22pjFTw7CM9w6tbD+fuwoVYs2C7pS/smmfLjNa2cThvIZxgJuIomf5VzVvoHTZpk5ybXJDHfeyupTzhpWY/nA+keJd1XT9IiKS1SpE4bLpbaf4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=huawei.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 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=BFIJhIWzIItLs27SiNGIuWRfRQIVgpa8FCgJdF1TgGE=; b=IiXS/A8bcQR+cBwFex3lVOYGukgY9r230C2lwK1NhasGhjV6OUIM2egM0ZPMRaKh0L1ozaSl/h1LacpadMaJoKQ3lGBeLY8NUbRfCxgKPa74rVsETzxw2q5bOmkaD2cwFLtou0gWW2PZzAGkM971CpEB4XgV2+KvKohuhWewYFik2zrn2jlu6mzUCnXv5VM+8Gj4tEBV0bcFEnaqA+FGp0/b+0Cx9LOHromY3XydfGTyyFePTB3nSjY7cMHt6Aw6mJNNHr2vECc+obQzIigwN+OY4yJusSK4S3R3XfArgadMdTpjkthAVr3Xp16bAKpj6KskZw+X5RRi3U5PQ5IP/w== Received: from DS7PR06CA0040.namprd06.prod.outlook.com (2603:10b6:8:54::28) by SA1PR12MB6750.namprd12.prod.outlook.com (2603:10b6:806:257::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.25; Mon, 27 Feb 2023 07:09:39 +0000 Received: from DM6NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:8:54:cafe::cb) by DS7PR06CA0040.outlook.office365.com (2603:10b6:8:54::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29 via Frontend Transport; Mon, 27 Feb 2023 07:09:38 +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 DM6NAM11FT028.mail.protection.outlook.com (10.13.173.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.16 via Frontend Transport; Mon, 27 Feb 2023 07:09:38 +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.986.36; Sun, 26 Feb 2023 23:09:26 -0800 Received: from nvidia.com (10.126.230.37) 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.37; Sun, 26 Feb 2023 23:09:24 -0800 From: Xueming Li To: Chengwen Feng CC: David Marchand , dpdk stable Subject: patch 'mem: fix hugepage info mapping' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 14:59:44 +0800 Message-ID: <20230227070107.15664-76-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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-TrafficTypeDiagnostic: DM6NAM11FT028:EE_|SA1PR12MB6750:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a3da873-30f0-4f39-139f-08db18919742 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uYHLu3ME5q9htsaqaQSAqXaA30yEhK1C8PfMyrM5u5nIBDa5EaZ1AO/kIN8QwEtG3jj7Y6iDjnSP5TVHD4oUaVngVTS1gQ9yXIwX2wIfL3/vuxWyR1gCZpzZ9wH+c7PtZDy19TwV3jmlGJj+e0CZigZY6n6nSnrb0062YKOLITAhasAWZRHaq9dTDvf0qfQ44LAR9x8ouL+wtnln5iOTBYbl0FRforwSpFex7e9Cq/beDUyOc7c2S5fl9hKuyqroPImS7BWNyXI1++AC9IF+6XPHPOIXzub4Mratbiqi0PUzDzohY+gSURmMURJszDIABIfcSRwF6aDLWHvP6Rts87ktQK8tjz62aM6yJxI5Qlu3ZKX8LJA54CwVHDVd2TPDvn4ghcAWJbekP1l9zQEVTy7metGf5e8H+gVwQYE/Rqxigvw9lMWhILP+f3w0xcLCL/MxfU12NTohvm3DGK7uzLH9Apel+OKRdnw69M0CnAZDyrVjSy0KbfIyzrbAZtsySbTUBKFmzwmhyuajYKWQSdh0SRePLa9+zPy4YM6KSEyS0YU1DobhPpXNo162y1PblA8QTk6t8IufwfHh2B0iuljCoobyYZdsZnPK3vDteyojoe3asNpILQjpplrMNO1Zdzdzin1z66lAatHR18wt/+fMnpxGC8m+lnOSBQry8bdPmxhALaPdfHNU3m29hZ260XeuwK25juXbwluTSrYSk+5si7VUUjI04d8E9sLnd+HVsKSb9K2DnTI7pUzxzOx6oOSCequLMHKto1A+i9p8kb4cuXpwxU0mbbTOy9KiEeAiCxgueWokABTjXLT22QdS 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:(13230025)(4636009)(346002)(39860400002)(396003)(136003)(376002)(451199018)(36840700001)(46966006)(40470700004)(83380400001)(966005)(316002)(36756003)(54906003)(82310400005)(86362001)(6286002)(40460700003)(16526019)(2906002)(7696005)(34020700004)(36860700001)(6916009)(8936002)(70586007)(5660300002)(8676002)(70206006)(41300700001)(4326008)(1076003)(6666004)(186003)(2616005)(53546011)(26005)(47076005)(478600001)(336012)(55016003)(40480700001)(426003)(7636003)(356005)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:09:38.8509 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a3da873-30f0-4f39-139f-08db18919742 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: DM6NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6750 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 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/01/23. 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=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=08019befc3dfa3fe24081ed86ff6e5bbd00192f0 Thanks. Xueming Li --- >From 08019befc3dfa3fe24081ed86ff6e5bbd00192f0 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Mon, 6 Feb 2023 10:53:10 +0000 Subject: [PATCH] mem: fix hugepage info mapping Cc: Xueming Li [ upstream commit 66e7ac416f3d62c5ee773ff02c115a24da9f1991 ] The map_shared_memory() function should treat mmap MAP_FAILED as NULL because callers compare it with NULL to determine whether the map is failed. Fixes: 764bf26873b9 ("add FreeBSD support") Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary") Signed-off-by: Chengwen Feng Reviewed-by: David Marchand --- lib/eal/freebsd/eal_hugepage_info.c | 2 +- lib/eal/linux/eal_hugepage_info.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/eal/freebsd/eal_hugepage_info.c b/lib/eal/freebsd/eal_hugepage_info.c index 9dbe375bd3..e58e618469 100644 --- a/lib/eal/freebsd/eal_hugepage_info.c +++ b/lib/eal/freebsd/eal_hugepage_info.c @@ -33,7 +33,7 @@ map_shared_memory(const char *filename, const size_t mem_size, int flags) } retval = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); close(fd); - return retval; + return retval == MAP_FAILED ? NULL : retval; } static void * diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c index a1b6cb31ff..24411d9c5b 100644 --- a/lib/eal/linux/eal_hugepage_info.c +++ b/lib/eal/linux/eal_hugepage_info.c @@ -50,7 +50,7 @@ map_shared_memory(const char *filename, const size_t mem_size, int flags) retval = mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); close(fd); - return retval; + return retval == MAP_FAILED ? NULL : retval; } static void * -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:43.355949200 +0800 +++ 0077-mem-fix-hugepage-info-mapping.patch 2023-02-27 14:08:40.799237000 +0800 @@ -1 +1 @@ -From 66e7ac416f3d62c5ee773ff02c115a24da9f1991 Mon Sep 17 00:00:00 2001 +From 08019befc3dfa3fe24081ed86ff6e5bbd00192f0 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 66e7ac416f3d62c5ee773ff02c115a24da9f1991 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org