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 74D7B43256 for ; Tue, 31 Oct 2023 18:15:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 682FF40DDA; Tue, 31 Oct 2023 18:15:26 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 823B140284; Tue, 31 Oct 2023 18:15:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698772522; x=1730308522; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=qGtyti/YmX8ftfn97FQMD5PhkE+KbIlfX1jMg27L+0w=; b=iM3mb35aKzjvp6TLIVQz6JY7OkM4A/9zTa1UddUVDG0C8zmOy/e5tNT1 fhgn/j91qRubMp44btaY7wsVHy/iwdw2EEonQ+Nay/EtyKfeA/1ncxf3Y ZqwrLCQ0nXTmqJIiqhM5HhlgEZOclpf7SjjjWvY59djsYqU2vK+Eacbgf aNIFo+QnOYyUXbwx2twENHbGZjLvsOJdPxTIM0wsuEj29++g1Y33fva8M WLqkz/aFQDec+Z19uxdKE7FjFhicahv/VuLSU36TQ/j4mLNcvggvX7fOB XrBuB7qPLSTOSWH5RLT8yhXREY13IgWhSbzzFYcwYUcxiZ7APbSO1jiqh w==; X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="387220560" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="387220560" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 10:15:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="8763227" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 31 Oct 2023 10:15:21 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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 10:15:20 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) 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 10:15:14 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.102) 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 10:15:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K9WmBFOSGXMVuSCOwkCmmGTGi+nzJzPuk/9aPXQ8fmXVk7aJf+YX66WqqPdhOTD2DX0QWpQtyl8POI66kDddcu0v3qrg298gVxfIIpWoMyhM6q0bx4OASNDX6NwJ0BcoKM3c7eshIThHtc0BcZ9X2zZr6vKvwhdoj23GbeNhzetWpg56kYe6rVGHE0jejKhz62EfdFrby6xkRKEN51gW/Q9sxfjs/tv+jfjHTTF8eVJzWOMzB5R26mDC+wNcUHPHHgDJRmXk8w619O7b3yiIV8loDa3L6vp36427oSRtW0yKQCngQ/G2VL/71wPoa+EcbFEs+ANqJ/CjGe7KAUJ99A== 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=V36y8f3zq9KuXXmzN7EK0WNoQIIA9Wy8VbnGtsn/tOE=; b=a7K7tzMALf0GAllRjRaRwIgP9YAR3VjMBkavyvRK7rOR2SIDZm1yEzN+VBEfkOZ4Q8c6h0ddn3fB2ZQJ0O3WlYbubs6FZSbhWJ6Hv8yYYmcj+qBKw2mK2pIT3BuRrGh6qncN7qcCVWKtPOz8/gh3duBhZ04TAe6zR/aclEzRne6s2Mr8vF0+c0Q01ry/Cpw1VbfOHQcmCOxlT9dbdpXTNMNjKhyAJ9p+XbOScxDMLDwiY1femcmBiC6OQ15LVxpx1ua+3AWflbqakCmDzKXsyxJwCm8pX32tGoknkZ1spSVZyN5oyYhVPn9FciJu2kjhMGU6yys6SC7DipZ0ql6iwg== 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 IA0PR11MB7282.namprd11.prod.outlook.com (2603:10b6:208:43a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 31 Oct 2023 17:15:12 +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 17:15:12 +0000 Date: Tue, 31 Oct 2023 17:15:07 +0000 From: Bruce Richardson To: Jerin Jacob CC: "Sevincer, Abdullah" , "dev@dpdk.org" , "jerinj@marvell.com" , "Chen, Mike Ximing" , "stable@dpdk.org" 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: DUZPR01CA0278.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b9::23) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|IA0PR11MB7282:EE_ X-MS-Office365-Filtering-Correlation-Id: 35a1a011-e9f8-4669-49df-08dbda34f116 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H8zHOBv0fzkl8jPNqtbgFnWLfmKp4E6OAgjcGBtTSnX6koysrK2xKq+IuGLhLemZHNbE5tmJLqjytzHra62LUxfTKsRVdaBXDZtdEujRDYQc2A2WM65RMVTlr3I4rpkZfQ/7J5H6GCRYfrtsDAycojHI2GT2WVHesP7goG5hjhfhNkeBKknHb6to78KxCwLH3VR2nmaCn92Hv0A4QM7hw7jrEukc8JfT74gpVL+Tk21BahkAr//W1JcH9kzgJXL6+cHYmldqqu4G82wTppBobQE3Rk88gb+qCyVRUmDumoN/79uD+Qg5om5s++lL3N5TM72TLD6/oviGvM1O2ZVSCNhfSpZso7GqsSm9JT1xFHPSWrq5B48ewX5ooYLk7Kldrsku44S9z1KOn2k1B1qcqpNT3g7KhqjTSZBRdLqOsyjz3oI7heNgPVnjh09l6RqhWW82jSwssL+bxLsfvDiyS790/vGMS1aUcahTLAG68eLIXyxvdOiB1L/0NuaeMmgKYpvBsD0wREnxeLUPni1TVFb7cI2YovH0dJvbzDz3680MVA4rMOTt11WWxp7sZ1d6 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)(346002)(366004)(376002)(396003)(136003)(39860400002)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(26005)(6512007)(38100700002)(86362001)(82960400001)(4326008)(5660300002)(83380400001)(478600001)(2906002)(6666004)(6506007)(66476007)(6486002)(8676002)(66946007)(316002)(8936002)(54906003)(6916009)(44832011)(41300700001)(66556008)(53546011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bHlDa1orazlsK1oxcEgwdXZ5d2VzQ245Q1hRMXJJa2xnKzhzV2dHbFZxOE5P?= =?utf-8?B?eGdZbEhQR3BRVVE0L1ZmaGdVSURnckVUU3Z3MnZQczJ2Y3AxRXdtKzFhYThl?= =?utf-8?B?S3VqN1dMSStiaWk0MU5SUjVQOWR5QnBpMkxBWkdicG12WloxclFacVNKUjJN?= =?utf-8?B?aTdhVmRwdUZaYjF3UzNhcGkrRGdEREtTbGIvd3JreFdYU3BCNTdKc2NWRWE0?= =?utf-8?B?WFdoTzBhYjdpbWdSdFNXSUh3M0t1UnFLUS9CQXNRRVZNTy9ER2hFdHBvZ2FZ?= =?utf-8?B?Mkd6bERqRG92clVzNUFPdW42ZjgwR3VtTUlXWU9EWmdMVEZwbnRQR3IvS1ha?= =?utf-8?B?eEp1SE1NZmxnZnNnSmhLL1JRWHU3ZXRMWklEcW5ZQllEZER5Y24vQ05qWERH?= =?utf-8?B?K3V0YngzdGdQVnF5alA0VTdWdG5vdHVsU2tEdHk2cEt4NUx5OVpoejVmRWQ5?= =?utf-8?B?VzRVVzVVZkxoL05FaWlOcU5uTitIL1BZNURYejZoN3R6cU1lam1HTnhZVWhK?= =?utf-8?B?Z0VoSElZQTBSYTcxVmlTL2o5LytzbHlvM3cwSzlWUERZK1VnbjIyM2R1N2RP?= =?utf-8?B?Nz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JxZTNyNFha?= =?utf-8?B?QkxGaEdlOGJwbHdsY1cxMlpscVhnRTlybDBSZzR6bWRBWDRhb3BleUQ5R3FO?= =?utf-8?B?bGt4Y0U2OVh2WFZkaG5JbWNwYjJBU1NiekxNOHMrZnFpZ2J0dVFWZC9LbFYw?= =?utf-8?B?ekIvMkcrTS8wZWZuMmxPcC81eVUvS1RWM3pVM0h3MWF3d1ZISjZSV2dibHZV?= =?utf-8?B?cHlYbnloeFA2ZmdoNC9kWkV3MjVPQ2VvLzNoQ0VLSUlDV2FRc2h2eVh2SlA1?= =?utf-8?B?U0xEWWlhb2tabTdKWVNIWVpwdFhkdFB3Sm4wVXdZcmpKLzJNNE1JVXFsYmIx?= =?utf-8?B?dzMzajBPOC83RE5sWXg5c2FkK0RrSlRFYUhDSWtua3RYNFkrcE9HNHhVcHk1?= =?utf-8?B?MC9TZmZIZWxCTWpvcW1tRGN1aE1hblZ1SHVJKzBHbkc3U2dGdXlJUm0xK25V?= =?utf-8?B?b2xpYlV4aEpnVVJKRUxMRndZbjVOQXpYamFMYnNydlZEbm1UNEpLaHhqOXFw?= =?utf-8?B?cERmeTFmWE4rczFxR3JXU1hwclV6VndxNmQ0SFU2ajN2K2sxMmVIYTViMkhr?= =?utf-8?B?VE1LSVpOQWVTMTEwWHB3akdIcFdlZWhmOTlwWVlyWUFteUE2elkvK1FxMHpQ?= =?utf-8?B?SUcyTFlWdzNCanRDTGJvcXF5bG9LYWVkK2EvVFMyVENhdFVhZm9DY3lQQU9H?= =?utf-8?B?b0E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 35a1a011-e9f8-4669-49df-08dbda34f116 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 17:15:12.3448 (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: ycIk1OUQhdVFs5vHBiV0og/HZLFtKFcu8fMP3hyGqh2IA8Q0LzWalJuPyWnk6U1NZ7oTkdFy+H2zZJjjUiztT7JzyV/brfRjLLw+VyRFqt4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7282 X-OriginatorOrg: intel.com 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 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. We can decide what the best approach is later on once kernel actually exposes the value to users. Only then will we know if it's possible to detect that exposure or not. /Bruce