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 989DA42BCC; Mon, 29 May 2023 08:31:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9E57410D7; Mon, 29 May 2023 08:31:03 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id F20E640A4B for ; Mon, 29 May 2023 08:31:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685341862; x=1716877862; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=CS7GwwusGFu5s1Hlv4BGYu7laGAnbQ7tKuobCmHvezc=; b=YOv+76uWEedn+TeBAQi3XFAZltag0+aMDQIdZgRsCY0sSHVipww0UojI GdwiUBJOTsbTmKsKUu+wOk0IvblA80+n5QozzKCO+MKr12DPQOsWqbeQY OmrWdlEgAFRsRvx6QBsWUthZxg/04NsgeY94gvUKFV3drN0J2liYibv6q UC2jmCJTK9FAZAYHwYchOgcl8qwWY2/UgcgmMdSX9IV68msfEQjjGMb4G rfOybFPOOa7uWANz8NKk8eaToTjWUbuvw4/9BP5eExlO/cC0j7pFwR35A tNHan4qHNH0AippY4n+KFK2/DyG/1J3NOJd40ePAjtyzhB9mG3GkXqT1B w==; X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="339220240" X-IronPort-AV: E=Sophos;i="6.00,200,1681196400"; d="scan'208";a="339220240" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2023 23:30:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="705942845" X-IronPort-AV: E=Sophos;i="6.00,200,1681196400"; d="scan'208";a="705942845" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga002.jf.intel.com with ESMTP; 28 May 2023 23:30:46 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.23; Sun, 28 May 2023 23:30:46 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.23 via Frontend Transport; Sun, 28 May 2023 23:30:46 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) 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.23; Sun, 28 May 2023 23:30:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qqs/Zf6kTJEI0YjWUDpJ9HuWlNtVfbHsvBV7aSb7p2w4uh1DD9WkEZqBVbQQX/HHQ4O2GmBn9Vba5Ln5J/pK80dl8lPBn6HgJh/M5fSXGxSy8xqblAaIZSzpjD7ElBsjP1HMPTKyIsEi1Uuv/7mNpnEAl8d9HmMZGhfqn34YMXH/Zd1GBnrfaYe0p40xAIlKu7A91nOnQKfu5zcev6dJsNlAzIIW47Yg4AwIt9H0Ct9tHS8BL09doNV9vscUSLIwVIYl6XUTnOZF6sDSTOP4NM3UP9EMiBSs86/3/kW0CW1QEVycXa6ECwA8eUH5ttWEhDrwSfKm1lM/vNzhHlnSmw== 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=qQBx9pBNDSlDdAPIqd8szY1BFJ89D/ulwFcpESmhd/k=; b=I9mKanNoIu6TLKLBArEBdSRhSjHuGyqc0fURaN2R1p4rZECqbj9s/kRrJU/1KYo5vz6GJPoWE15tHcqLOvfJu4fFw7hxNW+MOIhuzKUGYMpnbbBue3igHQlxMaanAWp99i/OkY5v6rY7XskqhS7rgQJijqsDS2jTeVSsHcxjAC8N/16d8xVimnt2QuSTkQsZOO7BAX/uFKcY0CljU2v6eicSm9Ij1uzSqzg8tEUad/aiX8s9MgKUtBxPiv773nsCnMfVBrzDj2cX24xAnU5AABeJXMQ+fiBGdSlf3VJNcb+jUvbLU9oeo/oeadHXkKGddr7VwuPFPzwfHlIH1nl6Ag== 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 IA0PR11MB7838.namprd11.prod.outlook.com (2603:10b6:208:402::12) by CH3PR11MB7204.namprd11.prod.outlook.com (2603:10b6:610:146::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 06:30:44 +0000 Received: from IA0PR11MB7838.namprd11.prod.outlook.com ([fe80::25bd:1586:f523:bb3]) by IA0PR11MB7838.namprd11.prod.outlook.com ([fe80::25bd:1586:f523:bb3%6]) with mapi id 15.20.6433.022; Mon, 29 May 2023 06:30:44 +0000 Message-ID: <50284ff6-9b2d-94dd-25e8-c58feb3afa43@intel.com> Date: Mon, 29 May 2023 14:30:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.0 Subject: Re: [PATCH v3 2/4] bus/pci: avoid depending on private value in kernel source Content-Language: en-US To: Miao Li , CC: , , , , , Anatoly Burakov References: <20230515094124.722431-1-miao.li@intel.com> <20230525163116.682000-1-miao.li@intel.com> <20230525163116.682000-3-miao.li@intel.com> From: "Cao, Yahui" In-Reply-To: <20230525163116.682000-3-miao.li@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SG2PR06CA0183.apcprd06.prod.outlook.com (2603:1096:4:1::15) To IA0PR11MB7838.namprd11.prod.outlook.com (2603:10b6:208:402::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA0PR11MB7838:EE_|CH3PR11MB7204:EE_ X-MS-Office365-Filtering-Correlation-Id: a657e75e-4080-4a46-cfb1-08db600e3b13 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cnsehN7o/jT2uvc5sjCmiOo4qLwmDLM/LKYny45K3++N3CLlgq3qXRfGi/2w9o205eRPMdzFb0fBpia3ajbxEKtHMFuyDTPO20cLH7xAgvZ1o29M7lU3A2ZPpT13QaFSfpmyLDvuPh1bz5QOEw5DPa4v2XjgiPOagd70hUlJYkDOvPRu1gQXmNPdYMwIYIUhOkUWNmJBlFCCqtJyqzZW9Os7xZ8n1OfKVYrzBE/T1N2JTk1BpP8r6FlIhD5dTuR1QKONk5bsBLpyL8k0mq0LwbW4W86aOgXbnLMwzCGK3SQLRo23sNFAALfQVyrwQA+Jy+GC+DuE7D7NRINYFcPruhD2plcLW3NaC+PkWWPkwmP6a51XX178pOP6uGMeW5Dq75l7Qc6hbyTAhbhggT+t4W3gATfL53KXFIoipGehJ6qYqtT8/TkPhaGBjt5XtlCKjO+xeBmxtURNgfEmBxTFGUHh6iqgoC8Mpy6CiIufeMvUia9ugHA/Fn/8XKZ18N5YFHeD9IzlR4ZArpMe07RcAbbDF3TExP7cDQhzGwnguapXiaboFZuxaMlEpjnH1sjxhM6o1jHApDF7fClpWJpYR0T0JgUkK5mcwINLtdTnHZ02QY7/LXX2o82H3Mmhh4k3X5im7fDD7CoYGUUrW3ujYg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA0PR11MB7838.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(396003)(376002)(39860400002)(346002)(136003)(366004)(451199021)(31686004)(82960400001)(478600001)(38100700002)(86362001)(66946007)(66476007)(83380400001)(2616005)(66556008)(31696002)(4326008)(4744005)(2906002)(6666004)(6512007)(6506007)(53546011)(6486002)(186003)(26005)(316002)(41300700001)(36756003)(5660300002)(107886003)(8936002)(8676002)(966005)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SDA4WnRpb01HeEZYY0JmVlg5cEZUbGdIWnFxZmtoeFpzSGgweGdrRnVCbDJL?= =?utf-8?B?L2FkdHpiTlR3SS8rWGtuSHM5cytnYWh6a1QxZm02aHV2QUpEdXd3dU9HU0c4?= =?utf-8?B?U1hnaWJVQitTQW1FWDVZajVhYjFINHlSRGFZZDlQZmh5cVR6dUhLZVRRWGxj?= =?utf-8?B?M2dQWVQrM3R0NUxxUWJKU3V4dnpLT3dXb0Vndm4rdElSd1ljNzJRTVBHbWdY?= =?utf-8?B?TzVFTWJiWGZFNnpiOURRelF4OE5mM29iS1daV2dQK1R3QzN3TUlFL1MrdElv?= =?utf-8?B?YnNiK3l4cDFzSjVRc2Z0TGsrc0pEVDJZY0lVelBCNnJMeVdUL1RqWVNmekxB?= =?utf-8?B?U1M4eFd5dXRubWtDZkNUMnZOVlErZDE4VUdjZU14S2JobnVnRHE2WitxbWp6?= =?utf-8?B?L2kvNDBBMk9RYUZ1amg5SzBDZTEvcmpVQllRcV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kvVEFCZ3oxM0ZpTE96V21QRm1LODhaa1d0SWo1V0xH?= =?utf-8?B?Ty9nemhuejYwY0pkQVpHODNTc0wrb1hMQzV2ZThHSDg3UTBjK1I1MVEzU1Uy?= =?utf-8?B?K2FRejdUcU5wRmxPa29xTmtOSlBnSzVLYjQ0azlDNEhKKzcvYzJCMTlQVWgv?= =?utf-8?B?eVRQa1VWeC9paG5LZDRwNlJLK0s1RjVqK0dsQVpxK0tGSi83bDBsQ2VPbThD?= =?utf-8?B?ZHBYNFJiL2U5c3FyaG9Gajd4ZUo1d1VLV3c5aHVVT2g1VHRRdEp5SG9WcEpk?= =?utf-8?B?YjBaL2hSWEkzWC9DVjdHbFhSNjZZVFhoQTZReHAxV0t4UlgyMW10eGVoL3Bm?= =?utf-8?B?enIydlQ2OXJBeXdKWFpnVXRRbFR1L0o1ZWcvczJPbk5iemFNc3F3aUUrRWEw?= =?utf-8?B?YVA1b04wMHowamRrcnlQOWo2Q29VM21SQmRBalk5VjQ0UDRjcVNhK0JheWFF?= =?utf-8?B?cGh4NEtyVlM4MlR1U1FnazRVRjBGV1RibkxVSmNub1dWelNTamJuVEpqcW96?= =?utf-8?B?VHo1QnJmUEtGN3pmWEdCVnlvTFltR0NVNzhZL2R3d1BSRUp2UmpJSjYvcVJE?= =?utf-8?B?NDgzNXlNNllzMlNOTzRXV3lVUUFpVnJVMU14ZDlmRDR4NG90UHhtd3BZN0ds?= =?utf-8?B?bkZhTmNSNEN3T1ROZ01ZUGtpakFBVUFpMllibnpxWWJqMmhubG1XOS81SVd6?= =?utf-8?B?K3R2Yk9ZV3VwM2V1eUVzaytod05vNjdtNmRyNXRrbXhqclFXS0p3RE5sQ1N1?= =?utf-8?Q?TRbGvNbGYw7whcSS/uZgYVlWG?= X-MS-Exchange-CrossTenant-Network-Message-Id: a657e75e-4080-4a46-cfb1-08db600e3b13 X-MS-Exchange-CrossTenant-AuthSource: IA0PR11MB7838.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 06:30:44.3739 (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: mxuVM9dl67URQXUtPEK+sQCPC8kNo1966FXH1jSJzWlenaSa25zDCQeyLyVaWq4+jifXbOQMH8khWKXJBafFug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7204 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 5/26/2023 12:31 AM, Miao Li wrote: > From: Chenbo Xia > > The value 40 used in VFIO_GET_REGION_ADDR() is a private value > (VFIO_PCI_OFFSET_SHIFT) defined in Linux kernel source [1]. It > is not part of VFIO API, and we should not depend on it. > > [1] https://github.com/torvalds/linux/blob/v6.2/include/linux/vfio_pci_core.h > > Signed-off-by: Chenbo Xia > --- > drivers/bus/pci/linux/pci.c | 4 +- > drivers/bus/pci/linux/pci_init.h | 4 +- > drivers/bus/pci/linux/pci_vfio.c | 197 +++++++++++++++++++++++-------- > drivers/bus/pci/private.h | 9 ++ > lib/eal/include/rte_vfio.h | 1 - > 5 files changed, 159 insertions(+), 56 deletions(-) > Acked-by: Yahui Cao