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 BA78F43E57 for ; Sat, 13 Apr 2024 14:56:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B30FF40DD8; Sat, 13 Apr 2024 14:56:04 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2073.outbound.protection.outlook.com [40.107.220.73]) by mails.dpdk.org (Postfix) with ESMTP id 76251400D6 for ; Sat, 13 Apr 2024 14:56:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DbO6o4EK1duKHpv08jC4/hHFOtmHTGpeDDNT0EY0b8m7f+97ocTaHntAz9H2HeOGPYz+xnKBi2esyxnCFOl6uEXb83EVWFbxrKW+71ShiesebTcLJ/U5TXvSdLx6oM5aWHbn7eihHLsIJztzVzmc0xnN6xoDtUUVL1LhdKKPNPlFrjMEb7omxTMqtHnkjsL8m3q54bye932iqR+sMvo9rLtMqBj4DvR3Ip+xP7zH/QXohEzGhLgBS4LAJiFSlrCrwxwVNPHt09LbbpGx3SMPDZHPfrNu4X8zT0WwMPqpjJFrGQqyUzmYk5Qs9c7sOBpHbwWty0Vbp/wu0D0LEDMj8A== 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=m+NXdXmcOtW8+PGW8u/EnJPLAXkHBr4YM4sQwQc2xXw=; b=BRKai1pBKOui1I/4OaCfAIpwyGyIQh2WEOzRergR6qLxRm8TqDCTJrohb7mQWCFvQVP+OcPT59LR2U5EE1k4ftSAGdBiEJtvZwzp5luqnb5+FucyoH6Rn+dwsygAzC9DKCGHn06jpoSI+OQ/j88R6T3FsYAv9qA5FxzwJ6JFu2PHJKJLSpA3lMWeYVmhHuLyGS5vutoZskDhGN3DhdnVWpcBf9ord+uSUn3g4vrMCzkDuj5/b4M7FfjtktYyKL3zu3LYRW9/MgnzXx0vix7qo+M0YrDTHrREwd1aH9HP21LKKomNcCuBhhcqlgfFIQcjrogWmNAXP1p5xo/G5Z2HRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.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 (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=m+NXdXmcOtW8+PGW8u/EnJPLAXkHBr4YM4sQwQc2xXw=; b=MfB/pEDayyZj1bDXwoJVqR2dJBTaR4Jz9ySHZyVWkG9/tfdH/VgIcdDiQzh1/JkJ/vSyXBRH/HAnoOsJfkcoceCfDnyOiSuUks6JtooUv0D/HBZZlikh/vHgm0uXznlrKlspN5+szFx2CcXYslypCSGnEI8LWb3zJR3VrWG4cSGybb0OyN1alI4mjf0wBRBQQJZ748/vLj1FjeL6UN8I7DloBK0Xr0y0IcT5SRohogwaPojVerLFnkvt2ufmL7vKR2DEGdfu19tzhw+YVVJW4sclBvgK1Dt83AuwP+GYTif3KFkJKdQkkZ6Zx/Y22esglfadGMbrG/9vUYopipsl3w== Received: from SJ0PR05CA0138.namprd05.prod.outlook.com (2603:10b6:a03:33d::23) by CH3PR12MB7521.namprd12.prod.outlook.com (2603:10b6:610:143::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Sat, 13 Apr 2024 12:56:00 +0000 Received: from SJ1PEPF00001CDD.namprd05.prod.outlook.com (2603:10b6:a03:33d:cafe::70) by SJ0PR05CA0138.outlook.office365.com (2603:10b6:a03:33d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.16 via Frontend Transport; Sat, 13 Apr 2024 12:56:00 +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 SJ1PEPF00001CDD.mail.protection.outlook.com (10.167.242.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:56:00 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Sat, 13 Apr 2024 05:55:51 -0700 Received: from nvidia.com (10.126.230.35) 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.1258.12; Sat, 13 Apr 2024 05:55:49 -0700 From: Xueming Li To: Mingjin Ye CC: Anatoly Burakov , dpdk stable Subject: patch 'bus/vdev: fix devargs in secondary process' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:49:04 +0800 Message-ID: <20240413125005.725659-64-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CDD:EE_|CH3PR12MB7521:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d4c8ce5-bfa6-4511-b633-08dc5bb91189 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yi8qR9Au4iODDkXtvJ5pdkvaQRKhQUjJ6FwtbArUqAnYxuj5+EHYX9gL1U176WuTLESCnLpidcyweaLWDvJ0c1G5boUDoYXEzhFbEKvhTmtZQbVWfde73Jp2Xd9Gfvhw/CPHOXgv0Tc6WQmUNHUW8a5TBrncC6rXpxawSaHSJPjRxcGut4AqELiPBdeJu6tYqsQik3UEjFE2nSw1G9UDlzIrurZtCtQbCWJgnBrNozYd9Yc9cZXVMjfCgAfEm22DMMTEFt9WkL0Gy2UTlKJb9Yj3aaLYm5+EVPEifbq31KA8kwI+G/5E7Y0gRNk1Lwaqq3wlIBXsEpJE4os6/jSQuTvJf3Xab759vfcuaHqYBp3g7paHYdo3gwLYntY5FeWaSLaS2zCeXCmTUFPjgUfSMPSXW1kjW7MAt4Ksh47X3CyLf2g2iUovAvvjrHrzK0nE+7CAcCZUHeA4d4pMKJE6hkBVxmI8WPUw/Eq/o3UNG+n34WT4FmYC/W6IfNdxBS+r2cXNev/dc6Il8LOlTQrZDJNsFt22tn6jWj1bjtgb31//EAqJYZvXPFshdl1BQBpPEDT2bmYpOutumId2tyVRaMgYsRGqa2kSOWhC8uu8IHt/k8+EiXoBchrwSMvw5dLNEbpxsxeF/2uQfQLHO9dvmiHsNJTdTUlcA1s6ihAc2lnH4Mjne1XNmUFGM6aVd6OnnfnWF+dpUNeJRmVOG/Cd/mg23VAzkDPCLSyHKBrfHbbZU+K0OwkBh0Dj18LKfrD4 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)(82310400014)(36860700004)(1800799015)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:56:00.0926 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d4c8ce5-bfa6-4511-b633-08dc5bb91189 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: SJ1PEPF00001CDD.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7521 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 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/24. 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=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6148604a438aad21e5d74f414976666b370582c1 Thanks. Xueming Li --- >From 6148604a438aad21e5d74f414976666b370582c1 Mon Sep 17 00:00:00 2001 From: Mingjin Ye Date: Fri, 1 Sep 2023 07:24:09 +0000 Subject: [PATCH] bus/vdev: fix devargs in secondary process Cc: Xueming Li [ upstream commit 6666628362c94a0b567a39a0177539c12c97d999 ] When a device is created by a secondary process, an empty devargs is temporarily generated and bound to it. This causes the device to not be associated with the correct devargs, and the empty devargs are not released when the resource is freed. This patch fixes the issue by matching the devargs when inserting a device in secondary process. Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct") Fixes: a16040453968 ("eal: extract vdev infra") Signed-off-by: Mingjin Ye Acked-by: Anatoly Burakov --- drivers/bus/vdev/vdev.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index 05582f1727..14cf856237 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -263,6 +263,22 @@ alloc_devargs(const char *name, const char *args) return devargs; } +static struct rte_devargs * +vdev_devargs_lookup(const char *name) +{ + struct rte_devargs *devargs; + char dev_name[32]; + + RTE_EAL_DEVARGS_FOREACH("vdev", devargs) { + devargs->bus->parse(devargs->name, &dev_name); + if (strcmp(dev_name, name) == 0) { + VDEV_LOG(INFO, "devargs matched %s", dev_name); + return devargs; + } + } + return NULL; +} + static int insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev, @@ -275,7 +291,11 @@ insert_vdev(const char *name, const char *args, if (name == NULL) return -EINVAL; - devargs = alloc_devargs(name, args); + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + devargs = alloc_devargs(name, args); + else + devargs = vdev_devargs_lookup(name); + if (!devargs) return -ENOMEM; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:07.025817983 +0800 +++ 0064-bus-vdev-fix-devargs-in-secondary-process.patch 2024-04-13 20:43:05.017753905 +0800 @@ -1 +1 @@ -From 6666628362c94a0b567a39a0177539c12c97d999 Mon Sep 17 00:00:00 2001 +From 6148604a438aad21e5d74f414976666b370582c1 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6666628362c94a0b567a39a0177539c12c97d999 ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org