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 BA5F8425F5; Tue, 19 Sep 2023 04:33:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E70B40278; Tue, 19 Sep 2023 04:33:29 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id E1D1F4003C for ; Tue, 19 Sep 2023 04:33:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695090808; x=1726626808; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=YMVcPBTqBFNx7k8+rytEdS2rUmZMNTouyMUesvnPTns=; b=ecpbIip148blDxmnJLR7sPmn7lmQvaddCNRDSKekc9PNgTlNfVadyVQ5 DbbGFQURK/ZDy8/OQ0eVWNrAOGRRpO6Wt2RnPuNifX1VojAWrg43NykEv GHmBVzPs36WNxCrPeusJmUZmYwcYGdq0BnHe2j9OG4bBFnImMiaUBYAiD iqd/hJr//X0d8ivln2lpdyh12a3q3X6Ic5F4nuKAZf5x4mAQG4J/rmjRW DqngTtHl1g6UWbN3tNBu/Pl2wK6l18rVgXV5ozRf1EwOWCwrXtLWfUBsn 677NJdvW9xhHOasOy0T3wGaorqmjBuiwCIGRbG1sV1FcrvfRZRa+moVlY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="360089820" X-IronPort-AV: E=Sophos;i="6.02,158,1688454000"; d="scan'208";a="360089820" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 19:33:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="775374307" X-IronPort-AV: E=Sophos;i="6.02,158,1688454000"; d="scan'208";a="775374307" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Sep 2023 19:33:26 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.32; Mon, 18 Sep 2023 19:33:25 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.32; Mon, 18 Sep 2023 19:33:25 -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.32 via Frontend Transport; Mon, 18 Sep 2023 19:33:25 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.171) 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.32; Mon, 18 Sep 2023 19:33:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eEmD7fiVuRhZNk3bk09x59Nc6y1s62PtY85g4CMXwIlhzDMAluTGklHFp4Ta9sSEZzPIHknPhMm92H2bfaf3Lm3j5ZpoiIy4qXXUZOktE7iy0QxK4PvKdtX9Hq/koG3vlGoZ84vB+AcgYygeTOf8Bna5hs5iulqqITIVRtWPu9tR1J43441Ak8brHHXa7wsZBY+Hog8U4ftMvRbbYkPVgcMFV8TBeDN26IWz697+NuPQ/FtoEwv2FWTY7Cf/VF78OAMgU9UoP+Lqh+PQeH3/JLmV60ybZAMzNOTb5N/cFW5x/q4sEUoV3nsVWtzngLNbfUEVjb+ESwu5zJuYEshisw== 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=993kFgHwF33EJIrMCoXxoj3+eZske16iTxK7G5O9TNw=; b=ZvIZJKTx//7YiNIXzDDbYpuSGKSRpoLeBRA7fYrdHjnZYaG3xqQPTfw1QBazvjAjyldydQmubUC39z/itkbXLfgWbxuDKwq7Bq5agprgnwigCd/aTNhC45k4n/MNMLRqjBYk07CowGYoyOV+EpRlDMmojIzjdhGt9A+HmVby8Io1Sfr6CR8czzQd5DX6CaN6O5VgLaX3UIYjtJPCIHiCXSPR75AM4s3UT/feUBUTwYeqIT2GwLPZJzCqs7sV04tQDiq1dqf5JQD22wry2sPIaHftpJxPwT208hWsE8/dKvj125QXkVej7yZUt3PnXh/xdjsYsKncE3HRCB4wJ+dzhw== 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 DS7PR11MB7692.namprd11.prod.outlook.com (2603:10b6:8:ef::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.23; Tue, 19 Sep 2023 02:33:22 +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.6792.026; Tue, 19 Sep 2023 02:33:22 +0000 From: "Xia, Chenbo" To: David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , "ferruh.yigit@amd.com" , "nipun.gupta@amd.com" , "Richardson, Bruce" , "Burakov, Anatoly" , Jay Zhou , "Sevincer, Abdullah" , Julien Aube , Rahul Lakkireddy , "Guo, Junfeng" , Jeroen de Borst , Rushil Gupta , Joshua Washington , Dongdong Liu , Yisen Zhuang , "Maxime Coquelin" , Gaetan Rivet Subject: RE: [PATCH v3 04/15] bus/pci: find PCI capability Thread-Topic: [PATCH v3 04/15] bus/pci: find PCI capability Thread-Index: AQHZ5wgpOk24LfGdy0qDkPcoNGmAAbAhdSXg Date: Tue, 19 Sep 2023 02:33:22 +0000 Message-ID: References: <20230803075038.307012-1-david.marchand@redhat.com> <20230914123615.1705654-1-david.marchand@redhat.com> <20230914123615.1705654-5-david.marchand@redhat.com> In-Reply-To: <20230914123615.1705654-5-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_|DS7PR11MB7692:EE_ x-ms-office365-filtering-correlation-id: 1af4e27e-c274-47b1-025b-08dbb8b8cb3d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1/H82MfDauj2sbnIstjBYSqL57eKa1NlYT4m+QbhD3KGC36/3zhdc33m5LIUyM6ZUA98cGUEBzzZFv1nrTm7z9zaz3EU7i+FfZxm/Hn1xw9fi5iMv4a41vHUsmt8h/GaUjWWIgT3QzqOxTaz0mTrWcsp+ndyglWGZ6JYQb3BBODP87it0BHIBWo6AzguItbHCyTPoZtns2vtJfItpW4em+4K40fTbFdJSciv3cMCybZFzxRNV2WgcvSSyr2uv/DCWY5AW66gzBD67zpQsyXUxMOpz2us3r6HZSxwz7rhR6gRrodneyhMHxUdISlrYBq+SJewRv/wXmvrv9KpYhBncEqlEoHwyGjDf7Erq5sXk7uvF2c7uU+hj5/gCGaSNanFzL5OHSYr1MT2dmebZfxbWqvWtYv0wU36H0yqFaEQIaSTVWGEKN/fNzmmjmVFwzaoCl+1Hb7zaFgXuiiu+PW4JgUqs0Z8JJlN4Gc/muqKaLrXBJohEAhfbieVZNnYEh1AUIf87lGLzmHF3WkP7/YbKrbgoQsP40N5otdENn4XR7uflRmEhOxclrABssWF90Dt/EZSplITeJuCza0Jjsyzq7Zo6nKu5quDFTfz3DmLKQfHM/7QunAYc/0MZ/HjlSDa 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)(39860400002)(376002)(346002)(136003)(396003)(366004)(451199024)(186009)(1800799009)(55016003)(5660300002)(7696005)(6506007)(53546011)(86362001)(64756008)(9686003)(54906003)(316002)(66946007)(38100700002)(41300700001)(38070700005)(66476007)(110136005)(66556008)(76116006)(66446008)(71200400001)(478600001)(82960400001)(8936002)(8676002)(52536014)(26005)(33656002)(2906002)(4326008)(122000001)(83380400001)(7416002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?77RYulQsbW9qJeiAPJLNHG2whyDMGcP8DQNf2KEYIS1W9c84SYPUOlzq6+WA?= =?us-ascii?Q?y2eg3OoMJ4BV53xBAXYvTjuPqEox88+Ou+3IGf/sTnLeU3/VGb7xMh9TQ/f1?= =?us-ascii?Q?A8Y2axQy4LFdcGpPxcW2zNs5di9QkM+8jTkvjpYfmA/XU2Il93zj1z33d/a/?= =?us-ascii?Q?BAYEMQpo+z8KgwKVc9v84tPNS/2TF4xsTOCs3cmEhgeNzrPOuhuYZybWP1H0?= =?us-ascii?Q?AXvmw2KBqAWKkSbhZ7n1QZR7i615eMxD6apv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CdxrPldp9OgBbTYPrRwoPyldvSbqs7idVaf5FFsdhQDrRqfQQYwW?= =?us-ascii?Q?wIE3DSohFxFJzTszka2FYCo82PP0y3iUMbSLVT5u3iYlsAEEU8C9buzi43xw?= =?us-ascii?Q?+vCa4i6sq8hMVnGyfdpjV1XzL97VrWeZRPtVK8wfui1WuKFKsXxS+zBgA7uv?= =?us-ascii?Q?TMYhYbaKZtsOO5pgerTVizzKSE1ZWBqrNCQu6f00Et+LkZKpavBkkE0R1hJQ?= =?us-ascii?Q?M3vZIac1EV8CbM77gvmHt01q8NHEusoSS7F50wTEilgjayWTEIhT4FKETqdh?= =?us-ascii?Q?CHqvtEFjTF0LemP8H55f7y70AVe+QUsbh7Sm4IHagaeUdXSziaV6WhP5Y/Zq?= =?us-ascii?Q?G1YIpk5s2Sa4pOYb7OIMV7sRrMUfo+VOMqfg6n1DoGYB19vCM0N9hnvGCF3P?= =?us-ascii?Q?mXOfDLolgxKGI+pgyg8V2ARugM6TzKTTL+2+sUIj?= 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: 1af4e27e-c274-47b1-025b-08dbb8b8cb3d X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2023 02:33:22.5840 (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: vuvq8p6+FoZBSU4bIQxl2B8Bt3oWmaCPt/IH0ZU46Zr2xvuCyA8qDcKVqevUwKTPGSKwfni+lm45GHeqt8byHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7692 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: Thursday, September 14, 2023 8:36 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; ferruh.yigit@amd.com; Xia, Chenbo > ; nipun.gupta@amd.com; Richardson, Bruce > ; Burakov, Anatoly ; > Jay Zhou ; Sevincer, Abdullah > ; Julien Aube ; Rahul > Lakkireddy ; Guo, Junfeng > ; Jeroen de Borst ; Rushil > Gupta ; Joshua Washington ; > Dongdong Liu ; Yisen Zhuang > ; Maxime Coquelin ; > Gaetan Rivet > Subject: [PATCH v3 04/15] bus/pci: find PCI capability >=20 > Introduce two helpers so that drivers stop reinventing the wheel when it > comes to finding capabilities in a device PCI configuration space. > Use it in existing drivers. >=20 > Note: > - base/ drivers code is left untouched, only some wrappers in cxgbe > are touched, > - bnx2x maintained a per device cache of capabilities, this code has been > reworked to only cache the capabilities used in this driver, >=20 > Acked-by: Bruce Richardson > Signed-off-by: David Marchand > --- > Changes since v2: > - added rte_pci_find_next_capability for vendor capa used with virtio, >=20 > Changes since v1: > - updated commitlog, > - separated VFIO changes for using standard PCI helper in a separate > patch, > - marked new experimental symbols with current version, > - reordered defines in rte_pci.h, >=20 > --- > drivers/bus/pci/linux/pci_vfio.c | 74 ++++-------------- > drivers/bus/pci/pci_common.c | 54 +++++++++++++ > drivers/bus/pci/rte_bus_pci.h | 53 +++++++++++++ > drivers/bus/pci/version.map | 5 ++ > drivers/crypto/virtio/virtio_pci.c | 57 +++++--------- > drivers/event/dlb2/pf/dlb2_main.c | 42 +--------- > drivers/net/bnx2x/bnx2x.c | 41 +++++----- > drivers/net/cxgbe/base/adapter.h | 28 +------ > drivers/net/gve/gve_ethdev.c | 46 ++--------- > drivers/net/gve/gve_ethdev.h | 4 - > drivers/net/hns3/hns3_ethdev_vf.c | 79 +++---------------- > drivers/net/virtio/virtio_pci.c | 121 ++++++----------------------- > lib/pci/rte_pci.h | 12 +++ > 13 files changed, 223 insertions(+), 393 deletions(-) >=20 Reviewed-by: Chenbo Xia =20