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 9E24D41D8D for ; Mon, 27 Feb 2023 08:09:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9960E40A84; Mon, 27 Feb 2023 08:09:44 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2058.outbound.protection.outlook.com [40.107.94.58]) by mails.dpdk.org (Postfix) with ESMTP id 79C1940ED6 for ; Mon, 27 Feb 2023 08:09:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=auATMe5JkSV99XGhdlrTRQiacYaq3sm/dSngd9ubz10Y/Q2Tx3GMxF6YXvvNWyMut1z//cHpW85tUlhBrJ/XvkBidE22w/pNBIRqlX0az4DmMo60zV9IDh/+118USwd+1HgmLH5/X1q7rdF/roP3RfHuHj13jX/haQnVcpiZa6t9lk9SfDOgFSFLOsrv7Wbsv5nsN/08IY7B6akshXjwjcxIndPAOq3QX+ruVyLntP8ocGMnBu99kQtuVdb6hT0IqSynQgZWuSIWIVf3LFZaWFdi9WSBOh8e2ymOKQeFo+elUa+N0SVu+K/2ln4S2AaLbHhIjOM6QsUM1MF6jq8hDQ== 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=SonaALi1JLesYXnT99vCxoL+80Q1aBNNhf/rIze3EAc=; b=SJ9z5I1AsHEFVymYFgCcpwV9bmsZh7K9j5Nq2iQFd3t31HW/7Yp3HWgdBbdhL/y4PyKYpy9YK89waWcbFnSdC2cCPPrA5m6RRVA9bs3qwCPNmEpZxT+U+nVZ1gBktXNuf4bSAFHeW3UvdG3AFnrgMzV0Vk6potHmU+jmXEK953oD+W4RezL5UudZPVwjBfQeFSpq4Z0juugyNpGJfdwKPda0G2z6yzdMEdoJ3kususcDAO9zpxhVUnwfM9On3IBdYf1Nfqxdw7Czu1sgomt44dD5H96A4l9PmmmpNP5PL0+bBzlG3HknAyOYVXrukMHOktofuMaFbo3Y0ZhbjAbkqw== 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=SonaALi1JLesYXnT99vCxoL+80Q1aBNNhf/rIze3EAc=; b=ZnO4Fg289jf3qWRNChApFq3nn2Z6aU6z9o5OCghzfFIVl6YCKVds+QjugJEujuqhhekbaOPI/anpsODGysIZgIZS+LsrXI8OSs/n5FOZyYoVl5SSY8cAQ9C+JpIFYMq4qNtQ1zQU/vwrG8aFSP0PyWhK28fSEXpSuJyn7EnocTxlSHAgB9dZ0X2muBfl3sB3UXxY4EW1iJHX31SSN2QuBNaDx5khSOOOZTSoco+RxtADnjxdtzQ907RkykoLD+n6Gs47Unq6sP5dZ7zEOKNw9KeoUJeSFSZwznZG1VtifGTzRW+CvYKeR91YUe92lRTjQsp36LvkvXWh+fooYJkezw== Received: from DM6PR14CA0059.namprd14.prod.outlook.com (2603:10b6:5:18f::36) by SN7PR12MB6888.namprd12.prod.outlook.com (2603:10b6:806:260::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.24; Mon, 27 Feb 2023 07:09:40 +0000 Received: from DM6NAM11FT059.eop-nam11.prod.protection.outlook.com (2603:10b6:5:18f:cafe::2) by DM6PR14CA0059.outlook.office365.com (2603:10b6:5:18f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.28 via Frontend Transport; Mon, 27 Feb 2023 07:09: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 DM6NAM11FT059.mail.protection.outlook.com (10.13.172.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.12 via Frontend Transport; Mon, 27 Feb 2023 07:09: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.986.36; Sun, 26 Feb 2023 23:09:28 -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:26 -0800 From: Xueming Li To: Chengwen Feng CC: Rosen Xu , dpdk stable Subject: patch 'raw/ifpga/base: fix init with multi-process' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 14:59:45 +0800 Message-ID: <20230227070107.15664-77-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: DM6NAM11FT059:EE_|SN7PR12MB6888:EE_ X-MS-Office365-Filtering-Correlation-Id: af417483-6e9a-4441-c3d6-08db189197fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nbSNfwgZ1FwM3U9iIL8NDY99cSlPt22bU0rzftncGhJa/zXaRecLV83M/CziXTxW8uqusIHyu0VcK9oVa6f42UUEbk1z6sUlvALLi5SIIXmU8+J5PDgdjS18nMkw+CiWK4DFq/rMX1siUTXnF/2ZevDsGz++FEYEgIOoKij0fwB/5szYexcgWw+CW6VrVF6sLUzkqjvns0mFugOi9j7z41jrktsjZORJB6ZuHnpWPWs/VAE+QRwV0ByVeEB8ctw8pjdZEWNNPtL02XMvAljTc5ttrRPkAvU7zd+ZATBWLsxNLY9mwwYvelrktgu8r6e+7AiZuQviPeLJC6a43AisE+mVNKtwV9ElNIpg+huiYFdSCUwCHQcYoPm26g0gl5W3e7W1kRqq7aIpHHaxxp+XmWFJ239gvJgYdfIp4VCU3pv4sv22Oqxb+13LAZFF2iKskNCPvcy+EPGjSLDIX14T16v+0AqOIOH+mX5Bzy9HTx9VtV3wRXyJC+IceWXiQz736gdXdfjz0SErvNbtbtk1jLa0rtjDJ2Ve5joA9dnaAns0XTL1Ogbs9lzgacQUSm2M86rHrhVZ1YzFGauvCicY6KLL9xPK0aei2U51VCoOug/BW03KwaZbAvj3G+2LBwn30ktqVqplRSe18GfKqjQgC4JEITCh87fYBSTGxpu+8MHvJg6RHdm6LkySA4j80NuYEi7EpzZcxjAoI0qfFf4bVCYPK591LMgefAU8HP9CvNI89d8Jbbh/cgrlzGgXc5NY/lwtFZCmvDghv/6GIYO7BsWgX5OupnQTLbP5s0bJTFgGWCp3wh6bY7Q4BbTAQubD 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)(376002)(39860400002)(396003)(136003)(451199018)(36840700001)(40470700004)(46966006)(966005)(7696005)(40480700001)(55016003)(47076005)(34020700004)(426003)(36860700001)(82310400005)(86362001)(356005)(83380400001)(7636003)(82740400003)(1076003)(336012)(6666004)(6286002)(26005)(53546011)(40460700003)(36756003)(16526019)(2616005)(186003)(70586007)(70206006)(8936002)(478600001)(5660300002)(54906003)(6916009)(316002)(41300700001)(4326008)(2906002)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:09:40.0678 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af417483-6e9a-4441-c3d6-08db189197fb 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: DM6NAM11FT059.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6888 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=f5803ba5c5572d022512b2682925b2f945bef2d6 Thanks. Xueming Li --- >From f5803ba5c5572d022512b2682925b2f945bef2d6 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Mon, 6 Feb 2023 10:53:11 +0000 Subject: [PATCH] raw/ifpga/base: fix init with multi-process Cc: Xueming Li [ upstream commit e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 ] The MAP_FAILED should be used to determine whether the mapping is successful. Fixes: e41856b515ce ("raw/ifpga/base: enhance driver reliability in multi-process") Signed-off-by: Chengwen Feng Reviewed-by: Rosen Xu --- drivers/raw/ifpga/base/opae_hw_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/raw/ifpga/base/opae_hw_api.c b/drivers/raw/ifpga/base/opae_hw_api.c index 1117c3e160..6d48d227d6 100644 --- a/drivers/raw/ifpga/base/opae_hw_api.c +++ b/drivers/raw/ifpga/base/opae_hw_api.c @@ -380,7 +380,7 @@ static pthread_mutex_t *opae_adapter_mutex_open(struct opae_adapter *adapter) PROT_READ | PROT_WRITE, MAP_SHARED, shm_id, 0); adapter->lock = (pthread_mutex_t *)ptr; - if (ptr) { + if (ptr != MAP_FAILED) { dev_info(NULL, "shared memory %s address is %p\n", shm_name, ptr); @@ -499,7 +499,7 @@ static void *opae_adapter_shm_alloc(struct opae_adapter *adapter) adapter->shm.size = size; adapter->shm.ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, shm_id, 0); - if (adapter->shm.ptr) { + if (adapter->shm.ptr != MAP_FAILED) { dev_info(NULL, "shared memory %s address is %p\n", shm_name, adapter->shm.ptr); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:43.391302000 +0800 +++ 0078-raw-ifpga-base-fix-init-with-multi-process.patch 2023-02-27 14:08:40.799237000 +0800 @@ -1 +1 @@ -From e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 Mon Sep 17 00:00:00 2001 +From f5803ba5c5572d022512b2682925b2f945bef2d6 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e6a2804b77c5fbfd97d0fe05ec7f959a0404a380 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org