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 C152C43B74; Thu, 7 Mar 2024 08:01:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3134C42E3C; Thu, 7 Mar 2024 08:01:45 +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 16B4242E39; Thu, 7 Mar 2024 08:01:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZEKfYso2J7aMn3TvmoidiTDRej4uPLDy1MEr6fK/UrAWkkepdAvbXLQeiUosSSYSaH6Eza1D25kIuXJ4TEOHk42oX/gOGEkMxq/5/8ZA9zQd+pQDT+D2O4aCS9vT2gxoWq90xTY9Q2g6yEcAEkpWznCZyRah6/i+htNgMhd6d/y5X79umxSkU/GtUqDfo/j+7BP3D7Bzg7S7kpWC9W1HMNuHpKK6m4+69h0FJ166DZA0NVK0mmwoQKOC1RnYk4BrszoiGuam1MZNlqpYtUTmI/rsyjp2Xc2pWreSnXtyDAYxjUSu+0n0bRLwc9mEa3Dta87FN42gM1+8xjjpz/bIpw== 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=cblMIb6Ntruwxj6gtqfiqr4uGuYyFIwRGJufDuOP3hNQehdMpJ002gkK/LFRX0aQ1+kH6q1PAvJK86+pBwpyInfmK1/yNfsdxQ7t8ImIusMOsVLmLgy7mHSjggNVBmN+iMOJWifZ/4/bBnCCgnMy3xJyCUZIPm8lyO+LdtIZrvAjw9SmnWPDR7/cAkv1h3fxaVr7schBVByVkwEI1zkgQ54UsZhxtSeaLg+/fXSXLpJvovFIuwU6FJabk0SzwgPl4vF9GgfKaKo6N1KRU/QJ7xc9E12/zXEUlHRcS6WlvZftuSLa4IxVaC37F2NKAEcwc3KmCRMnPHKumRIdTO4jCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=XRioJeqJ9AAvpP5e5wVkftOTdGo7RJ2bmK5B9h+imttMSZrCnYMlLeQFbH4/1l7V42pJP0zOFeDpvDz+c3RZc+ogg2tzP+T5SGX5/jnk7TKj7pyq89xW75+NMAd9TPYpwFudfdDKiVHYUDblsu20Mk3DlRLkiNHkUJwOjq+ecZFtpwgdNUH2owQVNyKfKVEC053R0fSuDSJgE9Vd2CE2U19QFuZyK36N1pImmNopR/YtF8OqWwLyu5yiVx635cb+zmADeq+dbNBC5V1dh5DzTsDMJN+RBfVo15ttiuD3TJnuniKbpOHlCWfap+uNc0pdQPZAOTIR440usOvbTOTrCQ== Received: from MW4PR04CA0271.namprd04.prod.outlook.com (2603:10b6:303:89::6) by SJ0PR12MB6943.namprd12.prod.outlook.com (2603:10b6:a03:44b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Thu, 7 Mar 2024 07:01:40 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:89:cafe::5a) by MW4PR04CA0271.outlook.office365.com (2603:10b6:303:89::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.26 via Frontend Transport; Thu, 7 Mar 2024 07:01:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.0 via Frontend Transport; Thu, 7 Mar 2024 07:01:40 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 6 Mar 2024 23:01:23 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Wed, 6 Mar 2024 23:01:22 -0800 Received: from nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12 via Frontend Transport; Wed, 6 Mar 2024 23:01:21 -0800 From: Artemy Kovalyov To: CC: Thomas Monjalon , , Qi Zhang , Anatoly Burakov Subject: [PATCH v2 2/5] eal: fix multiprocess hotplug race Date: Thu, 7 Mar 2024 07:01:10 +0000 Message-ID: <20240307070113.29580-3-artemyko@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307070113.29580-1-artemyko@nvidia.com> References: <20231212042517.164353-2-artemyko@nvidia.com> <20240307070113.29580-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: CO1PEPF000044FD:EE_|SJ0PR12MB6943:EE_ X-MS-Office365-Filtering-Correlation-Id: b9cb9508-f4dd-417d-6b28-08dc3e747093 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: IYCRoFQvg0QqLu54Wz/c6jPdkK2yvV0IjCBPj6JUtYseqptGBB3Juqdl0qnN8VTjeqtCqbVF13z0lebAh+4RAxZk0lT8X160uJaP+RMz2SdhsVDPIy/3xB+Nzv1d5u0f+RxkCwlq0Qc266SgQhSN507QdUDh6+1v8aVi8zp1EH6RLlCFgIADzgDQCYyYBav9enz2fZm1GC41JUbuTNdgWP7aAdZfXwJjFG5zMh5tCuny7qLQXZor4fYxcBytRuGvC7Li0OXsKLU7EHIpOyndpAMBdn1ENXC625WoA8EjmNpFF1u5bxfheTNBVOe2K6luCdRM5FTJHBPyeORuedbF3oFbOR3in21A3iIkJQ29cnyDu8jhIMuLF9CoMoayXX96lCqNcE/++mfbi+HzPUQnTruqPqtNadS8hAdDNohGRMBu3BHHvgYOCYthMj1aURMpNRHQtxMWbT/ROaX6YFimWQHa+TZGevP/6FMhH119iPdL8A57vXqEcpcig74pdJVxZIYbbLyGzN/CQ/w0+fnvxt1O87B6ECD/ttYP3Ulvw9VDoxjRhgDdvjk3/vmWcvE7XnrP6AILQzx6qdHMIvNMqWN/jz2bHbWoYr1xwytwVL4tHGkXWi7rWEicI9v1sWIahQFpNlEUH6v9qJCVrTv0ls2NezWLPWP56tutzCoztb/coJKU36+Fs0fokTt/LToytsvHc8D3TzcU7NkbWdQurW/bIyAWsoxY2QvCm52p9DIoEAdXb3/v6TZl0feb3nuG X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 07:01:40.4199 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b9cb9508-f4dd-417d-6b28-08dc3e747093 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6943 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