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 6A6FB436CB; Tue, 12 Dec 2023 05:25:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 047E642DDF; Tue, 12 Dec 2023 05:25:43 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 9623442DD4; Tue, 12 Dec 2023 05:25:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A53+UdBrkeaFC2Y1Fe/rHD/SGYDANQLAjMmoyyxqBapBqfoSIxf6Rj9iZcyq471eGXWMCLjtxD9naAMzAIiv5HS3gGa3TeJWN5D535I0zQvXOgRgFppoc7jTKhl/jeQW2fW1DKCiBBaT9VfAwRbk0E3k1/jnk/bI8bsiUItPEzbe+WuTcNM+Xntj2BUhxJOZSR/SSMbkJpHTGsHKdTDnh4rXEjGoOCWesvcTvbdiZ8V+N8snMkv00gqo3VDfTfroSjLj92pRFH1UX9gDwY2EF4A1lBsW0UjUoPL3sqJxaJdVkYhHGAy27w+pLkbCQRR+aMnhfynSwaIR34eMzztlRg== 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=uXP/xKI+n5XBgy8wU7yetcK2IcXDzDrBbsKvPujH7yQ=; b=MhrS/JGwifG4tXG7YaK8Mi6trk9+lNorUVjDPRkviUClcsKkWU1nnQWNeqoclS81bOVgqmQ383zkEX5BLEJJmq4Nb1yzkWe08rMVJnOEWLwBusbUR4w7NR3fMhAplarppOqG91d3frbDyFbwO5qn2N3PvmfjW3U8ZYWxJBRZryJNVILcqcMujWJP2WrB7l/sT7foVPXPR7KO96tn3+RvhxyHckbOWGhkoMRU0hcqBpQNFxv7XscyCRmKMsQEzNFjmZFzDUnwDmMhi+XevGpKjJDstTOr05QtpgEYKX7s/9SNaVLDNgHRWqfrj8xbTVHGIVcNYaapumtfT8D0sxo4Kg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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 (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=uXP/xKI+n5XBgy8wU7yetcK2IcXDzDrBbsKvPujH7yQ=; b=OpWC7iqLobZnPpBtcVEDLinE3IdwZ4ig04oVVQ1FX3ezlO3dlTwcOI+27VkN3DzPH0kLZdHknjP1oXcBujpfYzNvmmFRO1mDPve4akN39pej26H/vdWEcn/cd6q1HAsV5JJNdShfIWSCNxl13VPE5C6RhmiWhgxW4CTJ5/Jwauu6av1VL/pKnll8+ADdLVRcWKbXpPtDJDpXuerPmpvP3SrQDEfvTSb+uG6vPZvchvDlHvwEOS2WHFv4f/k8Jyy0LaJoUx88VsZPfz48krkpqNVgy0iB6/jfW/aVIKAG4kS+W5WzgJvjtMxCwJZsswgjHv51Tda5k/MjkehvUMgQng== Received: from SN7PR18CA0018.namprd18.prod.outlook.com (2603:10b6:806:f3::10) by PH7PR12MB6717.namprd12.prod.outlook.com (2603:10b6:510:1b0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Tue, 12 Dec 2023 04:25:37 +0000 Received: from SA2PEPF000015C6.namprd03.prod.outlook.com (2603:10b6:806:f3:cafe::34) by SN7PR18CA0018.outlook.office365.com (2603:10b6:806:f3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33 via Frontend Transport; Tue, 12 Dec 2023 04:25:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by SA2PEPF000015C6.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.18 via Frontend Transport; Tue, 12 Dec 2023 04:25:37 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 11 Dec 2023 20:25:26 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 11 Dec 2023 20:25:25 -0800 Received: from nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41 via Frontend Transport; Mon, 11 Dec 2023 20:25:24 -0800 From: Artemy Kovalyov To: CC: Thomas Monjalon , , Qi Zhang , Anatoly Burakov Subject: [PATCH 2/5] eal: fix multiprocess hotplug race Date: Tue, 12 Dec 2023 06:25:13 +0200 Message-ID: <20231212042517.164353-3-artemyko@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231212042517.164353-1-artemyko@nvidia.com> References: <20231212042517.164353-1-artemyko@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015C6:EE_|PH7PR12MB6717:EE_ X-MS-Office365-Filtering-Correlation-Id: 0dc0ecda-0514-45a3-1245-08dbfaca640a X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HPnbZq7oR2WE336/CgbYiLLMJYKdxnkyToMBV98tSoUjLvapCM9Ku2NORHSR37BEltMDg33NGQ+/u+AoTZaKopiKFPARav+HJUZJ8Jk5CCPFR3aPVbBfH5oiiwEzgV8cNmVI1+QEadQ0QMWnpJj+H9DYXJzo4Bwey4O3e9njZofO8OJtJMxapuddJmwRAiQ82UUn9iDnaxwpmDU8l0Km/61JwqtJZkQUr0QoKw+BhOz65NsTPGYsj07dye1NFWW0FboHBX/eURFI8+OuJ8AS/be5B93GWrV/QjCx/eIVf0tDhlcJGu68QF5U/WyEZtbKoxhkDXwRI/KcsXeg8AIjlUjKj3VVhMfxGvj1ysTqcv2B/KI6qAazq836MZMQsGEaH+X6n3sTvdxAR+kO3RWjIflYt/X066lqIABVUHdhKspUl55L7HAfz0h9aMPp8N73hFRyfVK17zdg6d0EPeZ9HiCVxw8Ga3nEN24pWp8/mBX/l+eZhRwJvgG7vF9BBt9mT/ppP26Y/D9tNyx/EoR74w10LKQLo+elbFhcplknPf5H4ybi1de28r7YaldXqfMAZb1wNfO4OVXDvL7lYwcm5hSIL8HzLgf3tVCaoMoHlREGBncSWC3xae7eXayweId8dk+j8eW35/BDV5jDthNavUxvgYsvs1ET/j4NJpEwJIAzRCEqgArkYYL7VuvuY40kMcwAkISaOTBO7DVtX5IlKdAuORD3t04eu/EiKbIHKAu8d45Y8aPkG+/f73IkVK7e X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(376002)(346002)(396003)(39860400002)(136003)(230922051799003)(64100799003)(186009)(82310400011)(1800799012)(451199024)(36840700001)(40470700004)(46966006)(2906002)(41300700001)(47076005)(36860700001)(86362001)(70586007)(70206006)(36756003)(54906003)(6916009)(7636003)(356005)(82740400003)(2616005)(478600001)(7696005)(6666004)(1076003)(6286002)(26005)(336012)(83380400001)(426003)(5660300002)(8676002)(316002)(8936002)(4326008)(55016003)(40460700003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2023 04:25:37.0526 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0dc0ecda-0514-45a3-1245-08dbfaca640a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015C6.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6717 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org There exists a time gap between the creation of the multiprocess channel and the registration of request action handlers. Within this window, a secondary process that receives an eal_dev_mp_request broadcast notification might respond with ENOTSUP. This, in turn, causes the rte_dev_probe() operation to fail in another secondary process. To avoid this, disregarding ENOTSUP responses to attach notifications. Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Cc: stable@dpdk.org Signed-off-by: Artemy Kovalyov --- lib/eal/common/hotplug_mp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c index 6027819..e6a3f6b 100644 --- a/lib/eal/common/hotplug_mp.c +++ b/lib/eal/common/hotplug_mp.c @@ -428,6 +428,9 @@ int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req) if (req->t == EAL_DEV_REQ_TYPE_ATTACH && resp->result == -EEXIST) continue; + if (req->t == EAL_DEV_REQ_TYPE_ATTACH && + resp->result == -ENOTSUP) + continue; if (req->t == EAL_DEV_REQ_TYPE_DETACH && resp->result == -ENOENT) continue; -- 1.8.3.1