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 55E00A0A0C; Thu, 15 Apr 2021 10:07:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3DA71620D9; Thu, 15 Apr 2021 10:07:31 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 7A0671620D2 for ; Thu, 15 Apr 2021 10:07:30 +0200 (CEST) IronPort-SDR: /twiUCRwYbESGl0rVvmeE1DgKAfZ4H2DSkR+/UEuGZeK26pCxlaR0yjIf/BAvch+A4MiKHUmnA 3gxruwxeKAlA== X-IronPort-AV: E=McAfee;i="6200,9189,9954"; a="194836874" X-IronPort-AV: E=Sophos;i="5.82,223,1613462400"; d="scan'208";a="194836874" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2021 01:07:26 -0700 IronPort-SDR: WtbROUB0FlbD6uSZIgtJTj0ZisQFEZrsvo8KJfgB8ndn96M7yLwrsa1RHMOsA1XTGzmhggPLTM fb4U6XpjIK4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,223,1613462400"; d="scan'208";a="461531207" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP; 15 Apr 2021 01:07:26 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 15 Apr 2021 01:07:25 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Thu, 15 Apr 2021 01:07:24 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Thu, 15 Apr 2021 01:07:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AZntuIp2gxOzDY1b8/nwX41spcGf2WRXE0Mggu+fkD/Ks7uYZ9wjLCJOiZR5GuO3K1aQwT8TTgHoOadWdflvKzLHVpiVfYB8r6Ye8/uPm5kIsLGb1rmojTXr5IomrZ66+E+bb0N0mjMGkKMYcimnr+11y3eZ0AOYRElTIBRcFtL+Qo0R8PZqCnHjM+uUmFFNYUgiHpT3xZTEDiAtEaGBiS16p6br6GG/xjHgRNRifLKI91neTZUdy01VjvbMvntFaXe0qt5QoojiML086JyWXCMrPdsbl2MoxdUlokn0gMbXqV0gOlQfMk9ShlhIfMW1ydqpTIYT5fGZ+MJK1hUBww== 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=D4R7WFJpM5ZeHDQu5CoAd7mB0QUskAhWE/0wRHPjoVc=; b=lx6uKAkaM6T4YVAOOCZd6FugrucPyJAa1Bn/N4a8jTqGnSEgr2sw0cdiWTagvDBD/UGcEggEtL3bJSjbLJkUMiDlks+XmsddX/GYSmQ3ttOthR/oeBmZkTJ1512Pyq8TE+UPHbtxzhEXaharyQoZL5q72eGoVnx/zy31rLawH/YHzwyfprXixbw/OzHlNfJekm/azz0irIJGIQOa1Di6N6mgGhK3WRWivPjBTQl1O2V8v6KPzmnkbySAnXoWOeE9+wb8kI9S+6faYiUslTQTnLup4t+CTopfyaexeH0YWhON0YoUsHQhvHIwFAXa4Sv1VoOefuS/hsQc4uUV5hG3iw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D4R7WFJpM5ZeHDQu5CoAd7mB0QUskAhWE/0wRHPjoVc=; b=GMTuKN4d3YzZqrmHIX5nJryrYz2AlyOMpTF7AwJP47VMuhLCuQSANu7JBvegfxjx6IB8T9ow0gpxDAT5qvY5OSqa07y/82fP34kh84belyP+85pdW7njOgn/hvbMv7v2KIGvj7WQij94D6W1uPsiEDLK7YCIhZLRCuvQPVuLaes= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN9PR11MB5306.namprd11.prod.outlook.com (2603:10b6:408:137::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 08:06:44 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::2dfc:3be2:c305:6346]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::2dfc:3be2:c305:6346%6]) with mapi id 15.20.4020.023; Thu, 15 Apr 2021 08:06:44 +0000 From: "Wang, Haiyue" To: Thomas Monjalon , "Xueming(Steven) Li" CC: "dev@dpdk.org" , Asaf Penso , Parav Pandit , Ray Kinsella , "david.marchand@redhat.com" , "Yigit, Ferruh" , "andrew.rybchenko@oktetlabs.ru" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v1] bus/auxiliary: introduce auxiliary bus Thread-Index: AQHXMBSKvCrREl25EkK71KLI/BpYYKq1Ms4ggAAD6QCAAAAr4IAAAkmAgAABL4CAAAEGsA== Date: Thu, 15 Apr 2021 08:06:44 +0000 Message-ID: References: <20210311130113.31382-1-xuemingl@nvidia.com> <4194128.XUg4IPFSnV@thomas> In-Reply-To: <4194128.XUg4IPFSnV@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.0.76 authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.54] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4545cf8f-61c0-41aa-9f9b-08d8ffe5690b x-ms-traffictypediagnostic: BN9PR11MB5306: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5nmm1Nz67PoAXIeU/e2Ns6PgYmX0+j00EnhhO/EeBOHItl3AXd4CfEsVr8pd1ow52D+ANu1zQUKNM8iMndGN+iZPKDbOqTbvm/tFqi9IdZpsiBjLRgcpUldRkhPq3fqHNG0UP6D567EKzL16NPkVRkETZAJUyt58SoTd/+inl5xxSVWTTfv0eNaODRmzNHwsYVkt1sEkp4I+v2kkRjxwzw1tLpyFWGtF5SGEFk2VuokLm8ykx/7H9ZAqb07AM7wAIi55R1MYNPpkaSs97oIKjnryk37GC3W9R04YHMCtjj/xh5EzNDovF2YaZL3wj+AluVrQB2czNp5Fn1GVpN79xjuM532mD1IlhsJRVHkuwDhGUafbq3EC/9z0c6RnhQoB/9MM9aou30hHdYyH81Zly3ejDTN6oGPqbKFVwlglVVj0KUFIkQ27F362QTr03PZjyh6c8OLd7kIUs8w948eVF5HTWZRpFjf3CssR6H55+BcSt413UcMNij1DovFjqd5DTWO+4u+1w6ASYSTYvPOhx5t/kUfx0VrH8fP5w4qakp4JzqW1lNJdtemPTRrm8/9nFiP5UYX/I/hm6bzWrgW/+foRAmw23tklviawi43pP4uILsabvnjROGBk0Ejun+F0BnJEKsLXLFNQ6y7ixSGZYPobfPVHt8C6zuZpJXxA1lqJd73O6lPnBHoXgjTN+Qoj x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(39860400002)(366004)(346002)(376002)(396003)(316002)(9686003)(38100700002)(54906003)(52536014)(6506007)(66946007)(66556008)(110136005)(7696005)(76116006)(26005)(71200400001)(53546011)(478600001)(64756008)(66476007)(33656002)(966005)(66446008)(55016002)(122000001)(2906002)(86362001)(186003)(83380400001)(5660300002)(4326008)(8676002)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?jUnZMpA47DcpFU3LfRCvF8hLrH25UyPJCtqIXGW+zBQQcJVj/JqfP9y5Dg1P?= =?us-ascii?Q?hsPMJb8uDky7iIy+EN3S6iqS6+2ZY4SJ0gjBn4SAqwOT2gVGYi92548gFlqX?= =?us-ascii?Q?FVw1Jh9KEsdmBbsjYZ3ziDrkorlWWctN5qSuvEz9Y+8CI2eguIROAZJ2gqLX?= =?us-ascii?Q?swiwKZwdxtCWYAmLa3cfnGv9N71XriZuNi/UXrrUwKQQC8qubo/r/MuUzCJn?= =?us-ascii?Q?viPMB81YbjcGR9XrxazcNuR0Wvo3v7927kYQxRw+H3OqXpsb9dfl6JCf2xvI?= =?us-ascii?Q?AFqp1uZuRblbjjUnjRLIckwadD8qIcd074PHzBRr08dHPSyzgGBIhz/1qank?= =?us-ascii?Q?UdrpTrh/sTdQvHSAoH+Trlh6UDo6izSiHHP/M3TEX+iAofEpCQ3BSdnaRdB8?= =?us-ascii?Q?piSDfs5liOHrUeTKu0pCJwCPSi/LRoMr4t3PbTYApVnHSe5S8uKgVKhqaJB5?= =?us-ascii?Q?HnDq3JVnODFp4cnB1ccFw/jIulSCOawwU2ky3xVHihpCzreOnEhdLzYuG6eW?= =?us-ascii?Q?B9iMy7tVmJqOL3WQfsYt0bubKYMp5O60GJngpD2uZR2qJqaGmQn/SDw2oGly?= =?us-ascii?Q?lJj+kVTQwvNJW6gQ094iPKN0JC1ylAb9BY+aXN9hyDme7OelXbJqn7J7va+a?= =?us-ascii?Q?UZ/al0RMasFZWbOIwgd0N1JOYupkqIbmUk8kM5INb2Cvs7UIcnANIQpy8+7q?= =?us-ascii?Q?cGtwHAFRHkQ9e9TQb+LkzIaksYD2xJ4rFG9uiHmlP4+jGbyHB03izAY+9gaq?= =?us-ascii?Q?PH+akwgd5kOb6gnQDd5GFA2e0hxuHg1EsDPDQ3Xuc1rg1oq9v167C7IMkd9L?= =?us-ascii?Q?hpTsUfr3SrSlnZdVeFXD8aCQ1KoIzPe7m9AUv3vBOQeTM/TUHqSxHw9rX6Qw?= =?us-ascii?Q?MLncXjf0Ab+L2MAs8gBYevro1vO5odwoJdaLDXZMtN9P3VE774u4nhWc40Hg?= =?us-ascii?Q?8QBoMKHpg+WKLnjYugEFUy/iIeCpArw57mCYX+Yo1jqjt96OUxQly28XQ0Pa?= =?us-ascii?Q?OBmTJHWwaNig76tzI6WrrMSVijbFNktGJg7O4LL1oWKKE1gDSGnYSJnOCinW?= =?us-ascii?Q?zj9FWS0JorK96f9KI1CsPfbkAxh3U/PmqxEG4VszIH+FAzX/WWdLjj+mYr9Q?= =?us-ascii?Q?UTBqvkVITl6Wygg6F15ff1/g3votAAwjXnnYW3Rzn0I/Q5McCPFSXRrVwEbw?= =?us-ascii?Q?GcxFGZj9wkp61801FDhmra/27fiRVAY5Pa8S//SZU/PK40FlKWPH6PhwaScZ?= =?us-ascii?Q?EIdBsLSIyoMAAwABGQ7irpHnvh0DRqQMWcX+keoxP5OEHt8Tfrf+Q0LEH7SY?= =?us-ascii?Q?aRQ=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: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4545cf8f-61c0-41aa-9f9b-08d8ffe5690b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2021 08:06:44.6898 (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: Km6FKLgR8XNWV8ve7QnD7ChQuzz3PWREzlioHQw74A+MF/eh+KoREVoj1ceHYu5paYQkAoI8pAiJdSTGifazrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5306 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1] bus/auxiliary: introduce auxiliary bus 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" > -----Original Message----- > From: Thomas Monjalon > Sent: Thursday, April 15, 2021 15:59 > To: Wang, Haiyue ; Xueming(Steven) Li > Cc: dev@dpdk.org; Asaf Penso ; Parav Pandit ; Ray Kinsella > ; david.marchand@redhat.com; Yigit, Ferruh ; > andrew.rybchenko@oktetlabs.ru; olivier.matz@6wind.com > Subject: Re: [dpdk-dev] [PATCH v1] bus/auxiliary: introduce auxiliary bus >=20 > 15/04/2021 09:55, Xueming(Steven) Li: > > From: Wang, Haiyue > > > From: Xueming(Steven) Li > > > > From: Wang, Haiyue > > > > > From: dev On Behalf Of Xueming Li > > > > > > +/** > > > > > > + * A structure describing an auxiliary driver. > > > > > > + */ > > > > > > +struct rte_auxiliary_driver { > > > > > > + TAILQ_ENTRY(rte_auxiliary_driver) next; /**< Next in list. */ > > > > > > + struct rte_driver driver; /**< Inherit core driver= . */ > > > > > > + struct rte_auxiliary_bus *bus; /**< Auxiliary bus refer= ence. */ > > > > > > + auxiliary_match_t *match; /**< Device match functi= on. */ > > > > > > + auxiliary_probe_t *probe; /**< Device Probe functi= on. */ > > > > > > + auxiliary_remove_t *remove; /**< Device Remove funct= ion. */ > > > > > > + auxiliary_dma_map_t *dma_map; /**< Device dma map func= tion. */ > > > > > > + auxiliary_dma_unmap_t *dma_unmap; /**< Device dma unmap fu= nction. */ > > > > > > > > > > These API type can be pointer type defined, then no need "*": > > > > > > > > > > typedef int (*auxiliary_dma_unmap_t)(struct rte_auxiliary_device = *dev, > > > > > void *addr, uint64_t iova, size_t len); > > > > > > > > > > auxiliary_dma_unmap_t dma_unmap; > > > > > > > > > > Like: > > > > > https://patchwork.dpdk.org/project/dpdk/patch/20210331224547.2217= 759 > > > > > -1-thomas@monjalon.net/ > > > > > > > > > > typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, > > > > > void *addr, uint64_t iova, size_t len); > > > > > > > > Thanks, is there a reason to prefer pointer type? > > > > > > Good practice to make code beautiful ? ;-) >=20 > Honestly, I am not sure which one is better, > having the pointer type hidden in the typedef or explicit? I got this style from 'struct eth_dev_ops', Steven can make the final decis= ion, just a suggestion. >=20 > > > > Thoma's patch looks good, will rebase on it once accepted. > > > > > > I mean the function type is defined as pointer type. > > Yes, I'm talking another topic :) > > His patch makes dma map/unmap higher level to rte_bus, so that no need = to define the api again here. >=20 > I think my patch will be abandoned. >=20