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 93F9143255; Tue, 31 Oct 2023 21:44:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5C4040DFD; Tue, 31 Oct 2023 21:44:36 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id C7EE640285; Tue, 31 Oct 2023 21:44:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698785075; x=1730321075; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=K1t7H/zAtUR07ksAMUoqMV/vSHBeFwnDXYasGtX4Q90=; b=YgsYPSqjmmMTM2jNpeIIgNHQgBAXteR70e4vw3LiId0JKDJ72jaDTiTB 4q4bMWlgOGVRbNKraZNAfbPUYgl6zjaLXts3JkmhqGZbHLO1L6yCf7O5g iCca7TeQz9rwXeB1tQR/XJO1OsY7WR+qUO6aBhKvZ7v1FyFg0OXd/wTIG G1KSieVHmx3zFb8BEN1evH8TRKmP7DinPUxzxFizbC8xa51mTBrLxnSB1 A78S/773JPUwScTVBfZaxJ1PCcTCqXlFtFb9+guwv4zfXw6dc99Kf2RAx 5HqGQmZY0qr1aMZO1VhBupfJOMcJyh/Qd/E6g8Y62TtMJCSLAFNUI6eWe A==; X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="9901675" X-IronPort-AV: E=Sophos;i="6.03,266,1694761200"; d="scan'208";a="9901675" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 13:44:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,266,1694761200"; d="scan'208";a="8433795" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 31 Oct 2023 13:44:34 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 31 Oct 2023 13:44:32 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 31 Oct 2023 13:44:32 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Tue, 31 Oct 2023 13:44:32 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Tue, 31 Oct 2023 13:44:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XSU2KVt1bodnpYFsLAkhn8WzoEgcdknSYQm5RR09dh/VwRCVQlSLYKJ21jwO5ICCJ6lzRgXwH8oRq5+TZihmwJ3h1HB25S5LOGNNiX51L7LCc8Vi9hGa795FxNhMtnFUzCLNpykKYflIPG+DjnRl3FRjqnjDy2AQ0SjBDy8usbtxkOw1Y3jy3ROUIm2ZZVg3BixcuHbPRFo8wJ2G3g4wqvmTMFm7izdNf/lNx9q6+f35eBghuPx7oWo0RvWRW4wjoR6O0YEDziGpbGAUErR0SKh3aQ0vxHjbMh+dQ1Eot9Dpbh72H3A2jiptpwQZN1/CW8yLzUKWxcUtu5Wo8P9IuQ== 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=aOJnvRrxo4H1yv5hEcvmtDy1BIHsuPuTyNhJPm3DlYc=; b=mXl2BCfa7S3/f5aZNRLu84oDbw5Olh+LgdIqe8EOoYfYQi1SFhtw1JWeLGPV3gRA9G3v2mjvjbg81RsrmjKe7RroEjVYFDj6JsDSdoJtSW6SQu56SNu97Y1jbfdGUWQcZ4aTePpHYprPcmh5ek17+pn3ERINtiLvOMVSsptJxW1f26e0GdI/0stp5YEoRi3ulwtwWM5hsDUwXPSL5ltQhkm6TPYTLT3KMkl3WgXWTrTgd21mClAlO1Kwqfg1Z9HEI4G9OSH0CCrj/2Qp5Ir9ZPxvCYb6aTxNKiMw1IbJn5TEjxZKh9+Ogvb3GClZ9IzG7DdJirKHwJTbihq9WNHE8A== 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 CYXPR11MB8711.namprd11.prod.outlook.com (2603:10b6:930:d7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19; Tue, 31 Oct 2023 20:44:28 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44%6]) with mapi id 15.20.6954.019; Tue, 31 Oct 2023 20:44:28 +0000 Date: Tue, 31 Oct 2023 20:44:22 +0000 From: Bruce Richardson To: Jerin Jacob CC: "Sevincer, Abdullah" , "dev@dpdk.org" , "jerinj@marvell.com" , "Chen, Mike Ximing" , "stable@dpdk.org" , David Marchand Subject: Re: [PATCH v3] event/dlb2: fix disable PASID for kernel 6.2 Message-ID: References: <20230607210050.107944-1-abdullah.sevincer@intel.com> <20231030211244.2516043-1-abdullah.sevincer@intel.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: DU2PR04CA0336.eurprd04.prod.outlook.com (2603:10a6:10:2b4::15) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CYXPR11MB8711:EE_ X-MS-Office365-Filtering-Correlation-Id: b8259c37-16c5-44ed-3744-08dbda522d3a X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ViXYtf7E8AYtu6ecJgZ/v851QQKwse6YA/XWQ14CGtz+Aj6OB+loOo6CCj3Fb7gA7VowngMlA0xNsAP+YxG2UynBqEtD+hfA2RNhZab6ntK2wN8SzgwCv4SVhzF0DlUGEbwSNuwgHI6CJH/Du3aHa2UAE2Emu8BRjQZr20T4GfwY59RpUlrFSGAeA8Lzwjo2tvYjV8cZ79vQQTBgl12y/+PURCt1/vxiJuVQ9mw4NtQ6YkacKVIT1hVSI+nUbn9hgzbuIwRQCjooc21lLV/VbX4v2c9ge9asnJiVxWRbID4QAgupSlqgMClHEiJyDLgA0bIEQD4lctj/qWzB+/VS9Tb+8tR61Bqo1x011M84DtbPRzZqEgNDHOZjLC9DX+08/nJXb/5xFCFxz/ffVOyKSxwUTH2908bgOEtBhvRbGJvr5/KDJ84BjRhx4acqk4wQie9fgVmH5ruUStArP5G32f2mzLk+Yk++lYNKxj42H8utWjqIw58Ik8kHM/pBQN6ycWx7UBi7VboNRIYUIAxZO4zO8NsBE/fN2f6iyLvysBsmYPoA6jRKlC4P3+qdRBew 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:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(6506007)(53546011)(478600001)(41300700001)(44832011)(6512007)(38100700002)(66556008)(66946007)(82960400001)(5660300002)(6486002)(8936002)(4326008)(8676002)(6666004)(86362001)(6916009)(66899024)(316002)(54906003)(26005)(83380400001)(66476007)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bUFhQUJHNkk5aVpqTXFESlNGOXdtMGdDbVc3ait0RTA1Qm5uS1orRmtWeXlU?= =?utf-8?B?VFVzWmlKbzY1M1VDc09Fb1NsOEZuL3p2SUZIZ2xwQVdQRUFjQXNuckxIblBU?= =?utf-8?B?MExxWHpPdG5rdzY2Q1dYeG1QV2RNdlQ5U0pMTURPUE16OWloVnpIT3NCU0VR?= =?utf-8?B?R2Uyb1RJQXJPNVFSdG1PZEEwVUtNYmRvNGZZODU1WjcvdGd6TWVrdG9SWTAr?= =?utf-8?B?Z0F4SHVvWFRMcDQ4Zi82UWQxbGU3clZwbVlpVExVa0hXKzZFcHFPL0V4YTdD?= =?utf-8?B?WTB6V2hMekxNNk5tYVlGVTExT0NOQkYwUm40NXVLSjhOVzBlZFBYSWlFL0dn?= =?utf-8?B?ZEFQcTFYc01DRHQzSFpUeUswa1VpdVhDNzlOSW1rbnlNa2IvbzN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ossTenant-Network-Message-Id: b8259c37-16c5-44ed-3744-08dbda522d3a X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 20:44:28.5920 (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: A3hJY/K4ERD5kS/zictmaNZ2iO9k1dj0U234z/F4f4plBiNCX8NatDoaSiQtFL+mDE3nr1P9++YxXz6Q6O4u7u4e/cu008M9Q7wZnoEesPA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR11MB8711 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 Wed, Nov 01, 2023 at 12:12:02AM +0530, Jerin Jacob wrote: > On Tue, Oct 31, 2023 at 10:45 PM Bruce Richardson > wrote: > > > > On Tue, Oct 31, 2023 at 10:36:04PM +0530, Jerin Jacob wrote: > > > On Tue, Oct 31, 2023 at 8:43 PM Sevincer, Abdullah > > > wrote: > > > > > > > > > > > > > +This patch can be splited as two, +1) Generic PCIe function to > > > > > enable/disable PASID +2) Call generic function to disable PASID > > > > > in drivers/event/dlb2/. Also mention which Linux kernel commit is > > > > > introducing this issue in the git commit log. > > > > > > > > Hi Jerrin, I think I need to provide more information here, then we > > > > can decide which way we will go would be good for now. I agree to > > > > having 2 functions in pci common code to enable/disable PASID, but > > > > we need to have hardcoded PASID cap offset inside these functions > > > > as well since PASID capability is not exposed to user. Hence, to be > > > > more specific main reason to have hardcoded PASID is, > > > > rte_pci_find_ext_capability() function to retrieve the offset > > > > returns '0' since PASID is not exposed to user yet. > > > > > > > > We can see this is vfio_pci_config.c in kernel code where PASID is > > > > not exposed to user. [PCI_EXT_CAP_ID_PASID] = 0, /* > > > > not yet */ > > > > > > > > So if it is okay to go with hardcoded offset now in these functions > > > > I will move the implementation to pci_common file. > > > > > > I would suggest, add argument option to API whether to probe the > > > capability or not? - 0 means probe and- non zero means specific PASID > > > cap offset till Linux VFIO is exposing it. > > > > That doesn't seem particularly useful to me. The calling-API in the > > DPDK PMD (assuming it's PMD who use this), is no more likely to know > > whether probing will work. Therefore, I think we just hard-code the > > offset for now. > > I think, there are three things here 1) Whether to have common API for > dealing with generic function like enabling PASID or not? - I think, we > are in agreement to have common public function(Implementation could be > hard-coded or probe) 2) Since it is public PCIe API, I thought of adding > probing in API as it is just LINUX limitation now. No strong opinion on > inclusion of probe in on this as Linux is main EAL which supports PCIe > now. 3) Since it is PCIe capability, In my understanding the offset will > change based on the number of capabilities available in PCIe config space > for a given device. _if so_, an additional argument for the offset needs > to be passed from PMD to common PCI API(I.e it can not be hard-coded in > common PCI code) > Given these constraints and how late we are in the release cycle, I therefore suggest we take the driver-specific bug fix for now. DLB seems the only driver affected right now (and I can confirm the issue having encountered it myself when running DPDK on Ubuntu 23.04). I think a general function is a good thing to have, but it seems that such a general function should wait until we really can make it generic in the future. Just my 2c. at this point. /Bruce