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 D03CB42526; Wed, 6 Sep 2023 15:04:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF866402C6; Wed, 6 Sep 2023 15:04:17 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 062C1402BE for ; Wed, 6 Sep 2023 15:04:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694005456; x=1725541456; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=L+PRId3IUHs5xbj4FEho5PQ+P6CrGKSqy8yqMtdT4As=; b=oA7axNFMJaV4kwPAzF+Wa457uM5bKYChn3FTGQBlms66L+G1MOHA+tVX +c09Kv1pLwDYE1PzvDNTDWXuX4ssGZKRdiIQdUJrLDKQ6Y/fBcWud2VeA w2H9rjnNb7M2zpeA1Jp07li9Jpy/t84Y6I+zM9aB7YaIw8bnMaD0m7Brr FiFbx4m/pbUncWm3i7fWPCsDV1DwpuliPCzGnwzF0g8O9Uu3CJwxZU97a wa2QhUzI24N5kfuysscQuykliUWQ+cS+5QLPlb7dlxltocDlJ1h9EsRry rzZqVfbdlBY6eVjKTAQ8E9ERkusZud67FEn1X2UgZtQEtxx6BJdGSawH1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="441034422" X-IronPort-AV: E=Sophos;i="6.02,232,1688454000"; d="scan'208";a="441034422" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 06:03:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="691277568" X-IronPort-AV: E=Sophos;i="6.02,232,1688454000"; d="scan'208";a="691277568" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Sep 2023 06:03:05 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 6 Sep 2023 06:03:05 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.27 via Frontend Transport; Wed, 6 Sep 2023 06:03:05 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.108) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Wed, 6 Sep 2023 06:03:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kxwCqOuIOPR6jUr6g1NBqHXGvPXy2DDHkXFlM8Y37StRUk0Iabsq/U0PL9LDVRyWzhxMM/8IELKSF1W+0jYi9thVXKtPK+u6GYyPmcdi/8aWN1D8lW0kHeRlniA3q99sXFt6z3HND4OZqKXPj0olxl244QbQGNoH4wIh8n5AZQeHcM+VSEHgL5C64AG+xi+y9UsK3t8Xz7ira8KBmr9Nn0Q9Sj9rfqPqOHB4vdwOoBzDWKU2ND5te2FYvMhgzqjmGRK/1rZLtFNkPKjMQ+aijyXY0MQK6udL76vMAlD4hqxHG9oeFSyAEe0ImLI2n9Gg9sjvbjjXI3jwsk3yIubDKg== 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=pBPyRrdE9M8HQo/yhWHaj89tkAaPKpiaWpvVwrmLWMg=; b=PJj4rwDlzFAP9mbGfEpn9WGHn891W90u975vPx2jPUywj1VZ+zMebmwT72ZMCLhzgqVIwE+0dSzCgsypkyVTG9BLQPoq+iiT8wgQM5JSG+gQonUAI/p/FKd7c7fM7cjFNSAW+N+MniaaEcqnBI2NnN7p4ccIlOLuLAAe8XB1fhxZh0sRFNnojg+rWYE2bNpoHaZilPccNNlGVMMtHzM8BhlCeDK2puYmXSdlSSFb/Ti/83us3EiUDZ7HNjauadXBDqqXfcCfIPhjAcBowWoiYQH/0mQInN97wspUpk5PKD/yLP45qz1Nou6uMAl6EzKHSH3QqqOTP4Oafw+fpVuAHQ== 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 Received: from CH3PR11MB8362.namprd11.prod.outlook.com (2603:10b6:610:175::6) by BL1PR11MB6050.namprd11.prod.outlook.com (2603:10b6:208:392::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.33; Wed, 6 Sep 2023 13:02:57 +0000 Received: from CH3PR11MB8362.namprd11.prod.outlook.com ([fe80::88c2:332c:5e8a:25e]) by CH3PR11MB8362.namprd11.prod.outlook.com ([fe80::88c2:332c:5e8a:25e%7]) with mapi id 15.20.6745.030; Wed, 6 Sep 2023 13:02:56 +0000 From: "Xia, Chenbo" To: David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , "ferruh.yigit@amd.com" , "nipun.gupta@amd.com" , "Richardson, Bruce" Subject: RE: [PATCH v2 02/15] bus/pci: add const to some experimental API Thread-Topic: [PATCH v2 02/15] bus/pci: add const to some experimental API Thread-Index: AQHZ1CO4QNb6Ln2Dg0WQBVuA7/3wC7AN3JaQ Date: Wed, 6 Sep 2023 13:02:56 +0000 Message-ID: References: <20230803075038.307012-1-david.marchand@redhat.com> <20230821113549.3191921-1-david.marchand@redhat.com> <20230821113549.3191921-3-david.marchand@redhat.com> In-Reply-To: <20230821113549.3191921-3-david.marchand@redhat.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH3PR11MB8362:EE_|BL1PR11MB6050:EE_ x-ms-office365-filtering-correlation-id: 22b18ead-f32a-4420-52cd-08dbaed9970f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wiglqWPy11l6JcV8EnuS6QYlGjwxNuzBroOqih4o7R219/96NWFdqUUfA5ONOx4VJOkgIyqytuEg+vb0McFrpfJOUjiVHKDjHIVCM1i0/eiYwXHGilVPGH/lEb9pURl7Tf7nftIPoiEebOkFlbyCqwSz2WVG6Gzgb5Jbi+MIYJNUsuvcM92AZ4/B/E/RnrSNgOG4HKK/jspjklSLoX9dVp0nrVQr9SzLi8iGU23FVkFEhj7NYYJ2tVvO7lhNVZ+U549mraDJrXRo8TYYXWfiHY/LtJyjuwEKHD16EqkWcTDzfLgG3SkxI742iRKnL5EJrjtrOvCopV13Vo7wLkeXDJP3UOQWhKaQIZpvp26QCyQcWWST/L0jDXssIEoHBx718eK0Fr6NcW5u7NyDoJ2H2oo5ltaIVO2Q+dVf4OXGT9SzJgHDv4IctJlgc0Fiv/dMqQf/ZdPwYaGTjGfgdghXZd1+M2PVV5stv4Cje/9+nJCxA2rd2m2GYkpchj3CznMiRT1SWyVoqfx8zIS/alsxGlWojHjVoCKDXdQW37kAA2DueYlvmltVNJNquveFNgKzgLWZggfnq5oowfQh7vcoR/gsmLyB1WjNxdFWpgozTY8Ix8Gkxt6fyhPJbUUqa/At x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR11MB8362.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(366004)(346002)(396003)(376002)(39860400002)(451199024)(186009)(1800799009)(2906002)(83380400001)(33656002)(8676002)(9686003)(107886003)(6506007)(7696005)(8936002)(86362001)(53546011)(71200400001)(52536014)(82960400001)(38100700002)(5660300002)(122000001)(38070700005)(478600001)(4326008)(110136005)(316002)(76116006)(66446008)(66556008)(66476007)(66946007)(64756008)(54906003)(41300700001)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?b3LvzKuwSv25/EGvfPhtyDCxIDfVrnhkbelfPmKyTx4ihA/xEoenoOER/YHy?= =?us-ascii?Q?+b6ev8BYVMjva9XnAgcnN8dVQIdhr/XdKKvJlWDKYZASGZCfHb3ju5Eb1c9j?= =?us-ascii?Q?kipTEXoUVAb6/z0ApnNPv3DvkfeFp/b3FZMiGm7ryRoY3SXy0ibxBxFP0EDG?= =?us-ascii?Q?vwReswjXzaQk39qitazlDXijwFvXq682Tke/F64y1jS93jzr+UZCi6fhQvS3?= =?us-ascii?Q?OKSDppPGkSF0OTtYZpVHxzsU6Na2lhHj8ha6lGb5yeidXsZyBbHwxcHD5gOl?= =?us-ascii?Q?GDClUM3bdi8lsZAWBkOUlvQmmjBvt9r3WV46jzuhW7yQ+MSHtEXKJOkOTHG2?= =?us-ascii?Q?/L8ccOTM4Zhjeap56V3y7NtJhicWC7eassgil2NBaiF/z9hQsKobDyWueGUb?= =?us-ascii?Q?rTdh6gAftLtr2QAmW7g4m8foutRDtU+5r0BE62RBqcPELg9+yMGk7o1Msob4?= =?us-ascii?Q?IaXiJpbmqzTtoklKlH0P/1bTz6O1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hY0UbiiYtiRPdr3u/jBQ7NuT2GlqADQv3NFxejU5LvWWEqpniKeLkgyY?= =?us-ascii?Q?4VfmpDHOJoTX28shx58cNlPlHz1N6auEmx/+d1k7BV0BoSYPsJVbGYTOAH7S?= =?us-ascii?Q?vAepHCcXqkKtTBK9z9AjjzbP7kuBCxVoU53mpxWVfqKy5Ou+AzoXIMaPQA?= =?us-ascii?Q?=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH3PR11MB8362.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22b18ead-f32a-4420-52cd-08dbaed9970f X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2023 13:02:56.8043 (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: aYsZV4TScguHvs+ay6USJuWldmvxsBm3ua2CkmgKvl7dNF7WfzoMyV6jEO2KosnSwLGW65DJXKYsz2JGfVbMCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB6050 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 > -----Original Message----- > From: David Marchand > Sent: Monday, August 21, 2023 7:36 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; ferruh.yigit@amd.com; Xia, Chenbo > ; nipun.gupta@amd.com; Richardson, Bruce > > Subject: [PATCH v2 02/15] bus/pci: add const to some experimental API >=20 > Those functions are fine with a const on the device pointer. >=20 > Signed-off-by: David Marchand > Acked-by: Bruce Richardson > --- > drivers/bus/pci/pci_common.c | 4 ++-- > drivers/bus/pci/rte_bus_pci.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c > index 52404ab0fe..382b0b8946 100644 > --- a/drivers/bus/pci/pci_common.c > +++ b/drivers/bus/pci/pci_common.c > @@ -814,7 +814,7 @@ rte_pci_get_iommu_class(void) > } >=20 > off_t > -rte_pci_find_ext_capability(struct rte_pci_device *dev, uint32_t cap) > +rte_pci_find_ext_capability(const struct rte_pci_device *dev, uint32_t > cap) > { > off_t offset =3D RTE_PCI_CFG_SPACE_SIZE; > uint32_t header; > @@ -857,7 +857,7 @@ rte_pci_find_ext_capability(struct rte_pci_device *de= v, > uint32_t cap) > } >=20 > int > -rte_pci_set_bus_master(struct rte_pci_device *dev, bool enable) > +rte_pci_set_bus_master(const struct rte_pci_device *dev, bool enable) > { > uint16_t old_cmd, cmd; >=20 > diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.= h > index 9d59c4aef3..75d0030eae 100644 > --- a/drivers/bus/pci/rte_bus_pci.h > +++ b/drivers/bus/pci/rte_bus_pci.h > @@ -85,7 +85,7 @@ void rte_pci_dump(FILE *f); > * =3D 0: Device does not support it. > */ > __rte_experimental > -off_t rte_pci_find_ext_capability(struct rte_pci_device *dev, uint32_t > cap); > +off_t rte_pci_find_ext_capability(const struct rte_pci_device *dev, > uint32_t cap); >=20 > /** > * Enables/Disables Bus Master for device's PCI command register. > @@ -99,7 +99,7 @@ off_t rte_pci_find_ext_capability(struct rte_pci_device > *dev, uint32_t cap); > * 0 on success, -1 on error in PCI config space read/write. > */ > __rte_experimental > -int rte_pci_set_bus_master(struct rte_pci_device *dev, bool enable); > +int rte_pci_set_bus_master(const struct rte_pci_device *dev, bool enable= ); >=20 > /** > * Read PCI config space. > -- > 2.41.0 Reviewed-by: Chenbo Xia =20