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 D7213A0562; Tue, 4 May 2021 13:30:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6618340147; Tue, 4 May 2021 13:30:49 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2087.outbound.protection.outlook.com [40.107.244.87]) by mails.dpdk.org (Postfix) with ESMTP id CC24440141 for ; Tue, 4 May 2021 13:30:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MRY8TibZNrHU8F/Cx93mZw59jZlct9/VNHOkOZmQttnm8VET/hGebJV1hFmDpG28WEqCgNrNdI8NZwBPNLGzvFahqfAdnLVQ8TMELTc8Va8rOkaDfboheFlrVqSna4vQ1RFtIiybntM0/d5DR0ypSe+O06ZOtutC6Xhh4V0N6bQWIpTChBQ20HyTHa2MROyRwXgQ2dNPEvo5CCiZhGTETlJlsiEtkEgi2jg+VHuvTmVCGUjT/P1gQo2cGc8qmWkMW3s2Uf+UdEh6Fuf78dyfDdRc56fKiU+1G1AJFWG+bEvPY0zWgsY+6Jxwz3D206zPhXaUZqwxu42a6FNLroWPIA== 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-SenderADCheck; bh=DV0Mg9l2OlnVg0QZh5BIWed4iZAIUEy1E31m0duY6Ko=; b=FYK2HA3Cru40ISWZSvIqx5ygyRk4k/E/K0/WGGBX4j7E+Chawr/O3FVUu0qX6BWVro1KA1uKrsLlk8Or4jIrqaOIF+V3MDe0GmWx8F8xUPN+zDBYRJcOIAiTrniWDs2xksiOsnRgHSWUkKkUqDXyRx9jyMNQ/9gLKHwOp87q2jN56au1/GZtgPpdZCQ6HWpPV33C/cAx3qvhbawvoV2xvsX0N6Y9zAsfb9SK8WCr0JbI57e86aUwDqtMN1uq8EaZR0MZhnAv8vafPkF/Plms76rXT7ecKzFQfsW0k2dWa3UC4Lx23y9L8LaNVvq8JtkgCw1TtPpgxi4lJf5SIZzcmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DV0Mg9l2OlnVg0QZh5BIWed4iZAIUEy1E31m0duY6Ko=; b=Kq+IdZdi6QajyY4GW0eqfZcyUlYj1SNnXqaCOlqTtw3dYSlNg8wKOcw9G30t1myKtHzDPm/wJYDorsldGaPjAz2Yp7X/WoHJnvAVmprWdDQn7hchXzs9HR+pPyqJiNYNHConEXpCCygZRqkUGjiMMPoJsSjb2ktfN5mSgQdNHqhXk3DotZs5p00e7sJnCCzGfpoE5mN/7gQSbztQWLBvxpldfNIwKAFA4oPDPHsXMQC8EnHLSPhbmMnnr3OduKIY+g/SO9NIoU/ZN1YPjaEiYgDGEDsr57OpALGp9ZqlFmIPmlo+z6KN5sF7caQLgp6u2rSz1QFF8VKst58NZ/Iu6g== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5135.namprd12.prod.outlook.com (2603:10b6:5:392::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.35; Tue, 4 May 2021 11:30:46 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::70df:ef1e:d98c:ce4]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::70df:ef1e:d98c:ce4%6]) with mapi id 15.20.4108.025; Tue, 4 May 2021 11:30:45 +0000 From: Matan Azrad To: NBU-Contact-Thomas Monjalon , Shiri Kuzin CC: "dev@dpdk.org" , "gakhil@marvell.com" , Suanming Mou Thread-Topic: [dpdk-dev] [PATCH v2 12/16] common/mlx5: share get ib device match function Thread-Index: AQHXPQ6h4C1Thoi/P0KI98GdzlIoqarTLeyAgAAI9MA= Date: Tue, 4 May 2021 11:30:45 +0000 Message-ID: References: <20210408204849.9543-1-shirik@nvidia.com> <20210429154335.2820028-1-matan@nvidia.com> <20210429154335.2820028-13-matan@nvidia.com> <1674943.THMBtb7gHN@thomas> In-Reply-To: <1674943.THMBtb7gHN@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [79.179.60.21] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fae37d66-785a-414e-2daf-08d90ef00f35 x-ms-traffictypediagnostic: DM4PR12MB5135: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cREiN9K4Zhx8PF+4qpRR+DeY4Mg9HsurzrgfCNrfZO1NItVpT6HjxNWKMUm3ETk6vrZeBeJ/8NSUcgWFKr1SmS7I7HdY59pHmN8aJ1hR8ivl18eWPAsbwBD3MQYr5eYYi1D6TOzNE4MAfoGvBaZbbxRO7fhcpoI11d2gVwhLKHStFZE1Zk4wKUCd6juBw6Z4omV10SfBcfHIjbtcXLtvSlRwiP7Q3Wwb5CReHUqK+IPe7r+vdGTMZLMvMQ0Ax5GvF8M+/2VXq01vL5ZFyh+wJeEmQodLG/DDPy8u5sTgSFxQZ76DCgQMDJJ9aWZlcxTniABVI6mGRBZ0cceE+xRtr/iOLi9ZGRAsaVvT3MD3mumhFdrTEL2WhFDtwfwrbiA9a3P00yHYL0zCd0MbC6nJMHMD/VO6GTyXabon7lNZvAhMslqroMWHrcV/fBWkgV+NVb7wH1V1a/nY8ayqsifqJseEMCyOT/udXcg9vnaXZH3k7qhiOks3/zimtavipGjAq6Lp4RQWs8YbhYhGWJpwbEqYi7/QL1jQbEZMg5egvFk+x1HEx9dMuKNAZjO4pfndlM2mipSzRGji39xBJdVq5WxCf/cCRIQmCAFsGewusqg= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(346002)(39860400002)(396003)(136003)(55016002)(478600001)(8676002)(186003)(33656002)(8936002)(86362001)(52536014)(2906002)(66556008)(71200400001)(122000001)(107886003)(110136005)(76116006)(316002)(54906003)(64756008)(4326008)(66446008)(6506007)(26005)(5660300002)(9686003)(7696005)(38100700002)(83380400001)(66946007)(66476007)(6636002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?EYX5lapRgUwD/MlKTmhabRHdFSBDe3AmGblgWeEgO8g6xULrs+wey3BSYjjH?= =?us-ascii?Q?AXrIJC9MNhov+EUWg6xUEvD5l7Af+1wB/M0hppHPmk0EH4W8ViBvfl28K+rc?= =?us-ascii?Q?Xql6hXflKQ/RWZGJXZjcDreHnl61L7qZiSv5tXKK7uCGTI9bHUv41oYXL1QQ?= =?us-ascii?Q?yFsrQF0kp5MCKZrk0HwthKnQ3K5oqsIDticlFDKVrUAjHmF76uZBzpnwWbqu?= =?us-ascii?Q?rpJMtPwmcUXVjAilWb68mQYvFIHUQ5GurXz+KXLhJIpuQeElmEvPmOrgJylM?= =?us-ascii?Q?9RlrqDunNi6Qq/sNDNXDN9hSg1n/Fb8I6x0pgKiydhdychNL6axbOlygtHi5?= =?us-ascii?Q?mF1/ATnoIsIqrA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ii?Q?2uzo2jNw8b3Q+bQFlkN5oQZKproTwHfH0yvlsEBB9mMJfvS2b2QKEiQ+vTZ0?= =?us-ascii?Q?RLE=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fae37d66-785a-414e-2daf-08d90ef00f35 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2021 11:30:45.8275 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BiYSeathZAm2zAJ+ZjbeEKMmPIsVnAiIVmnUm6Kw5VQe0jkEkZbLEuqPUQ5oibCE92HC9tDn9hGGEf6YHINb4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5135 Subject: Re: [dpdk-dev] [PATCH v2 12/16] common/mlx5: share get ib device match function 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 Sender: "dev" Hi Thomas From: Thomas Monjalon > 29/04/2021 17:43, Matan Azrad: > > From: Shiri Kuzin > > > > The get_ib_device_match function iterates over the list of ib devices > > returned by the get_device_list glue function and returns the ib > > device matching the provided address. > > > > Since this function is in use by several drivers, in this patch we > > share the function in common part. > > > > Signed-off-by: Shiri Kuzin > > Acked-by: Matan Azrad > > --- > > --- a/drivers/common/mlx5/linux/mlx5_common_os.c > > +++ b/drivers/common/mlx5/linux/mlx5_common_os.c > > +struct ibv_device * > > +mlx5_os_get_ib_device_match(struct rte_pci_addr *addr) >=20 > It would be better as mlx5_get_pci_ibv_device() in > drivers/common/mlx5/mlx5_common_pci.c > Just need to forward declare struct ibv_device in > drivers/common/mlx5/mlx5_common.h This is what is done internally for > sub-functions. struct ibv_device Is linux only, defined in Verbs library. So, no need it in OS common place. > > --- a/drivers/common/mlx5/mlx5_common.h > > +++ b/drivers/common/mlx5/mlx5_common.h > > @@ -18,6 +18,7 @@ > > > > #include "mlx5_prm.h" > > #include "mlx5_devx_cmds.h" > > +#include "mlx5_common_os.h" > > > > /* Reported driver name. */ > > #define MLX5_PCI_DRIVER_NAME "mlx5_pci" > > @@ -215,6 +216,7 @@ enum mlx5_class { > > MLX5_CLASS_VDPA =3D RTE_BIT64(1), > > MLX5_CLASS_REGEX =3D RTE_BIT64(2), > > MLX5_CLASS_COMPRESS =3D RTE_BIT64(3), > > + MLX5_CLASS_CRYPTO =3D RTE_BIT64(4), > > }; >=20 > This change has nothing to do in this patch I think. >=20 Yes, will handle in v3. > > --- a/drivers/common/mlx5/version.map > > +++ b/drivers/common/mlx5/version.map > > @@ -111,6 +111,7 @@ INTERNAL { > > mlx5_os_reg_mr; > > mlx5_os_umem_reg; > > mlx5_os_umem_dereg; > > + mlx5_os_get_ib_device_match; # WINDOWS_NO_EXPORT >=20 > Please keep alphabetical order. Sure.