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 A877445515; Fri, 28 Jun 2024 11:28:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9605040EE7; Fri, 28 Jun 2024 11:28:16 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by mails.dpdk.org (Postfix) with ESMTP id 1AA8C40E96 for ; Fri, 28 Jun 2024 11:28:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719566895; x=1751102895; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=tj5lZgi2BiH6/BLEcDrtWEGwvcd89j1erAnXifwZuTk=; b=TLzSYPMhegcJFQw7CuqYUXGuZl8Aqqfpwo3U0PTNicSRu9CmMWntlUcP Cow9Vk8NEbDXnWKtKi6SsXQZtLpMSDFG5iNDK+o0LetwYQ9ZVjWmvWC4n yd3Sj0hrKAzgoUrTQpmbf7/ur4OgGl7Zoy3xNSOQtzBo0j/bEjY4Koobo 1DKo2brZLqUYATI4aiinH3UIzqaK8ijzzGrdgU1z+8HTKu2bYoQclqT7b uSjdJ6d+3F3vxa1bsTJ7x9N0bFJwCwghVOdJ9vu30ETbI8YmBC0qB8Pdp lAqsbbtYBSPzVtn/0VSCUfhDhVcQRdbE67NwlQfHgIP+mw8KRKeXzeqwt A==; X-CSE-ConnectionGUID: FrSeYfhKTxqaa8FGIFUh/g== X-CSE-MsgGUID: lpBEBqTRQIOgegiZEwZcxA== X-IronPort-AV: E=McAfee;i="6700,10204,11116"; a="27428065" X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="27428065" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 02:28:03 -0700 X-CSE-ConnectionGUID: 9wSGcpRqSSi/XrIXiUhZ5A== X-CSE-MsgGUID: nGcojaJZRtuRiqX+m6cBgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="49157684" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Jun 2024 02:28:03 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 28 Jun 2024 02:28:02 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 28 Jun 2024 02:28:01 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 28 Jun 2024 02:28:01 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.43) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 28 Jun 2024 02:28:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bhskP1z8kyh9EQp6ay5EiYY/yqM+AIANT6WVm4BpP7vFcwzFZ1bebzmtifhaEvTySMHVOZNl+sWfYG9la2rKSaJRFjRNDb4DlBlpAcRzXryOCPPzxm4k3D30LAyJALflanvbMDexhVzxPFDj0m45Vsu2+4gg4mirAkq/vGFEiItKBNoo3YwsIvoNBRAI3xBhjDLQWSQ+h0wZ5ZG6wSz63cBUm3uJ9opRRgG1xx1oOgqXUBhCHE7pMYnPaWyVIX8V90AGxvKZeZZmq6hIMplPVDXFndBL+dvfz4leA26ECrKrgLTeqzKWgeyFxZvHEvE0N9EW58L5o7LnGvp0WGsefw== 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=XB164DS0qs82G2KjKtkFxrqfv7WTrZyZEgmCeVlV94s=; b=d9tim+Oc8D7yz5igyKXtNtkGcsjToxdlyJ8JsJIa7e1/rKlM6EiO8SCW1GaePe1A18NY598cJQc24PlvvS1rcfbmbsJkhNONugcW2MsaqwkM3ueFucPOwmS4+F4U/8YKEi0UTHPOW6e0nOvq/TzrQO+cQpYa7Ut4n0t8IhumAE+FpfYP/WKDTnV0GQ+FKbuC1FfywtrR3aBbNbrdPuaPqF7jwN2ZJuMGiM7SVwq7N8GLcGBD+DgcvnSt6G0hUDz5MW5VnRvLzmfW5xqSfh4jqWyY/p6xRLvC7BxC4yCdywXeOJcNFYmoR5tA42t3TFqVEDMrmj2OJjgsiT4SYYiBMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SJ1PR11MB6105.namprd11.prod.outlook.com (2603:10b6:a03:48c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.26; Fri, 28 Jun 2024 09:27:54 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%7]) with mapi id 15.20.7719.022; Fri, 28 Jun 2024 09:27:54 +0000 Date: Fri, 28 Jun 2024 10:27:47 +0100 From: Bruce Richardson To: Wenwu Ma CC: , Subject: Re: [PATCH] dma/idxd: fix failure to configure a device instance for DSA Message-ID: References: <20240628053458.78337-1-wenwux.ma@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240628053458.78337-1-wenwux.ma@intel.com> X-ClientProxiedBy: ZR2P278CA0085.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:65::7) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SJ1PR11MB6105:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e4219de-eb92-47b8-7db6-08dc97549673 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ikDmojhg30TX1v9clCwASak46310IZVCXGxe8ppojdn6sHa0sVAW5Y21k1PS?= =?us-ascii?Q?RelGC6UBYgOL+P3/1wftGtEEqBAikN93OVmM1NKKCbAvIJKFSClEfxhsU3W+?= =?us-ascii?Q?hDXcfR8WxFL2hcm/auPVCDrS3330gbvrNBAWScWGUdTQX7PmXkcYn8gmuNKx?= =?us-ascii?Q?Ha5rlJaVoCChyb/zhQO+Mzb/y5OayHYDqSxZoUYbp1Hw/XwBimi62nmN0lxC?= =?us-ascii?Q?8zGRaJ96lDAHwJKIVU4wLs8j7TLXIiBiMXlt4/F1vE89W44Epv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/KoiWSJ4e1tHhWaBV3x16XGyX/3w0+?= =?us-ascii?Q?9GSjdcGKMTl782765+oAmjjq1OGLoW0prs+F2ny0bcpjnYxvEv2O9lkdy771?= =?us-ascii?Q?XI0Q6k3sowI80hRKTaJuSFeL/lPXsgGQNWmHAHej7uQdX7Ku51cvDplAM92X?= =?us-ascii?Q?tXLiSXoCfHLoAQWsN3oFApUFVli2cEYxlRnuKIxXERVDeA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2ILI+W4/2A952O/2bScxGKGm4ov32XyN3LgqVi/doP862cYJr+F3peh2UbPa?= =?us-ascii?Q?ZOSn5O1LKeEULxNpMyOAs74qvZgmLTgcxflDbKwaRGka8+LbUb1wlMl4oYns?= =?us-ascii?Q?mDAgzow54GGRMnLQGsEVy6lEKTVKhKNGGBiLt+TDbSm0JqPm5YVIUIdzExp/?= =?us-ascii?Q?HsY+X7JrQY7BZXyT1dozQFpljhDiPOLbCXxjnP+W+7lF6SpkWZhxK3D0PYde?= =?us-ascii?Q?EyZfd10KO3tHEoFFhx0h+4RBHevAJLeisxNREyjtzsa52kmN8f+BBu3resMy?= =?us-ascii?Q?OpPa1Pq+7Y7OmY5A4WfXWikQDs423BcDJGWGAOxVlaKEbhobWVgEDW/jlj0L?= =?us-ascii?Q?cx8FC7WUFDuK8M37+UpdajD36gW1/7hAZN+n0wSG4WVknbbdG5FG/oDvSbmX?= =?us-ascii?Q?w7KbTZnb5EQq0G0U0UzcTV2v5PNLqjV3rmRJhmnuKFBU481AlgOKzncM7sbl?= =?us-ascii?Q?lnivVIQpvxaPXdJ20tY6vToowAJ1FB1UlErE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ascii?Q?EyKW2h/T3xamm7RP//UFusJA+a9oLegf7aAsz0ZucmAcVIcodIZPTyJV2a9C?= =?us-ascii?Q?8PrEzflLfpMzmqCrTnh2sdqwMoix0EqfG09SxkAnzVgFQ/JNfFRGRxUcSym1?= =?us-ascii?Q?BXc5dv6vRmwioVHH+pHbkxQ5hXWgC4t5pnj08JdQbfVc1PMPiBs/irLejcIh?= =?us-ascii?Q?M/bCeJiupQ7HxvrBvczmd1+MTthl2D2tyz84CKA6dKHqnr+Ni4uh3DPJ9oE1?= =?us-ascii?Q?NQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1e4219de-eb92-47b8-7db6-08dc97549673 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2024 09:27:53.9302 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pZyhaZ0Q3FHqtQ0CoYMNNrgQ4IzoTrGHbtIHMstIShwdOC9W65qs2zDu6B9vh7ywVemAQmdyxE/OLzHumNoiHcKyKSRwaeApGSEgBbqYThI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6105 X-OriginatorOrg: intel.com 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 On Fri, Jun 28, 2024 at 01:34:58PM +0800, Wenwu Ma wrote: > In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs, > DPDK needs to write a correct value to this file when configuring a device > instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be > configured, this patch fixes the issue. > > Signed-off-by: Wenwu Ma > --- One comment inline below. With that addressed: Acked-by: Bruce Richardson > drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py > index c0c833ade9..9ca4c4d76c 100755 > --- a/drivers/dma/idxd/dpdk_idxd_cfg.py > +++ b/drivers/dma/idxd/dpdk_idxd_cfg.py > @@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args): > "priority": 1, > "max_batch_size": 1024, > "size": int(max_work_queues_size / nb_queues)} > - wqcfg.update(parse_wq_opts(args.wq_option)) > wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}")) > + if os.path.exists(SysfsDir(os.path.join(wq_dir.path, f"driver_name")).path): I think this be simplified to remove the extra SysfsDir call as: if os.path.exists(os.path.join(wq_dir.path,"driver_name")): > + wqcfg.update({"driver_name": "user"}) > + wqcfg.update(parse_wq_opts(args.wq_option)) > wq_dir.write_values(wqcfg) > > # enable device and then queues > -- > 2.25.1 >