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 CEDF1A0C48; Wed, 16 Jun 2021 10:16:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B9214067A; Wed, 16 Jun 2021 10:16:19 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 98C2B40140 for ; Wed, 16 Jun 2021 10:16:17 +0200 (CEST) IronPort-SDR: vAQqgfY3LBIaahHx6VfFGUSB7zlXVQG4MSSLqWL3yfds6O0PzMKz1rMOrCBhDS3Qe0OpBOGBrN 3ZKsNnb+eBNA== X-IronPort-AV: E=McAfee;i="6200,9189,10016"; a="206094376" X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="206094376" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2021 01:16:16 -0700 IronPort-SDR: AsCReeDoGHkOoJfiE189ll04KGTa+VDlFRekFey63W/2elbfccCxX17XKErf7h+h0pCBDVXfy5 J0oXzT9hD7Sg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="415672544" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga007.fm.intel.com with ESMTP; 16 Jun 2021 01:16:16 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 16 Jun 2021 01:16:15 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Wed, 16 Jun 2021 01:16:15 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Wed, 16 Jun 2021 01:16:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xs52vI2A+ZOvJkiPol+9IDby19ef25SKKw0vKn8/S+1g5m4bEV9sa8Q/gRhTRqVTu1DMWnINIc2N5TjlPb3FdGcERALxjuhFnjJ+x/YDfQ+ixPAarR4156T3JhL9EaWJbXtr3flOlhTixw9KMIeel8Jxjfvs2QpLbYW7fp6vAvVT+oeLxwQkqvss3bhlJZyhYuP0paty8f6sL2846+jNLF/44W+d/IWFpTP30OmPX+Ovxjv84RZ/jFWNtJGTdIaW+07TprRJFHjSc5AW9jxIH8C+dAT70etJJPaQSykrZ/pp+XVARDjp74kKXwdBhGxxRYBx9l1FItcWsHiBFYrF7Q== 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=w7FzPw4IJ3oJT7Yn4VF+0Ep9kyezhBjRewTW3TGLLLk=; b=jnKAZTIG6tFvGhvA7KtTAi4jVuE7cJLOEJsQ01QdrKrpubrIPyZmmGsuDss3XW1sj4N5xMq4AimKjwqprged0GMMusghnFBSyJNQMEKGUUH15nUbmZL+fda1oD8mLLxS2jorqLbD94r8j1g5gF1oL3AVjFUu3CdDQ3ygc+nLsUBNJkYv94z5LZkzGogRMGrlik9Zvx4rWFB/akCnNJvNUHHx/gmNXBb3aYU2AtmN4ECsl5fxYEX3dAnJmNJV7LBtl7kw9wT9V9cjotIBPpbPQJ+S58o1bYi9rCaly7ItcesuvU7KNArXyScfH7uY8hJm3upHJ6IKtYNHhD2Cc83xcQ== 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=w7FzPw4IJ3oJT7Yn4VF+0Ep9kyezhBjRewTW3TGLLLk=; b=lrhE1kPheyO5hXgzwrqCqpptjritSmiDQ/x5uMdXfIq+mc7D6Z+9Qq58KfyAzYfUaHSMCSt9rHKFeh3DU7c4N2WZX5NaswUznK1SbV2sDCHB9U2w5ojnguRilVJ7bAdvfu3PdriblhtqInwZo4RmXzFON7BkglevyCpVYCbJlUc= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN7PR11MB2737.namprd11.prod.outlook.com (2603:10b6:406:b0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Wed, 16 Jun 2021 08:16:08 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::8807:6661:e425:102]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::8807:6661:e425:102%7]) with mapi id 15.20.4219.026; Wed, 16 Jun 2021 08:16:08 +0000 From: "Wang, Haiyue" To: "Richardson, Bruce" CC: Chengwen Feng , "thomas@monjalon.net" , "Yigit, Ferruh" , "dev@dpdk.org" , "nipun.gupta@nxp.com" , "hemant.agrawal@nxp.com" , "maxime.coquelin@redhat.com" , "honnappa.nagarahalli@arm.com" , "jerinj@marvell.com" , "david.marchand@redhat.com" , "jerinjacobk@gmail.com" , "Xia, Chenbo" Thread-Topic: [dpdk-dev] [RFC PATCH] dmadev: introduce DMA device library Thread-Index: AQHXYeoG0smDTq5tREKq6aLKQC/efqsV5cNwgABi8ICAAAMBoA== Date: Wed, 16 Jun 2021 08:16:08 +0000 Message-ID: References: <1623763327-30987-1-git-send-email-fengchengwen@huawei.com> In-Reply-To: Accept-Language: zh-CN, 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: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fd43793a-4497-4d59-1d61-08d9309efe7c x-ms-traffictypediagnostic: BN7PR11MB2737: 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:2733; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uA7hcdsarBUfo/BEeB4I4FKdDIBeJoD/duivdoX8c8OtcePAqJ/dNsLYJpxRb81P6hhe+RDOK1kkLxkDgC5lDj3X96JD438tbc9v2AJ+OQkVtsjc+I/vJeS8tLC/Y14ibAmcezA47/HsZUmPRWZ0DbfesNIdV3RCX4/Gzwlo5RFYoBBmOx7ZnV7NzDQJYN7sQpnFlhTTRLadFOrokklQFKpHWtf62muCXbqrav11Nrn2FvsNJjfeTZq82Aqo7wBic4bmN62eOGvLpWpGdnWxkx+L1SCrhcDVvbjARTu7Ct256ENOjbgoDlnwM1O2Hzg5z3uP4+q6wpGKw/hhE3DUwk1McJCOPXbdFcLTUN/mTqJH8QIp10R6W07N5lhFl5hFy7zs5CPKARPtx2h65SudfD67JbNzaYr9/pq7JULsPkGY8ZxCz9HShpqknWenvc2iY9yR/gx8GSOBqqKNvQavvVMcY940b8A1zhT9pNbki0+NoQqn0ek5P1O22OVxwbXsrCapj30zYXyxPqAMYmtJNwpxcezGD7uCfG6Zp3oV5OA9v4xFgkUVdrL/Zx9HmOF4bwKf2yloL8ZWGHL9N7xgF/9MJWHl5Ipacl28z7Ge1q3c25oNeZuKKkJxjPe7DsoNc5qoLq7A+NgV4bmBv5dO/w== 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:(366004)(396003)(346002)(376002)(39860400002)(136003)(6636002)(55016002)(66446008)(64756008)(66556008)(66476007)(107886003)(8936002)(7696005)(76116006)(9686003)(66946007)(86362001)(83380400001)(478600001)(8676002)(122000001)(38100700002)(5660300002)(6506007)(53546011)(186003)(316002)(7416002)(71200400001)(52536014)(33656002)(4326008)(54906003)(26005)(2906002)(6862004)(21314003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?C/2pxyMqJHLAwRMNEkBFiE2DHon+zCq7C/Q4pUUX2nrapxpVyuKyTSsoQ/jy?= =?us-ascii?Q?wzQL1Si6BndGhhm7QmP0AqhdFnrUpdxZRnb6RkOw8HhCfjly27aJePdRlpMa?= =?us-ascii?Q?aianeVcXs4ZlNb5rKJg5I/gXnO3tvH+mEZl/JUZEs77jobO6XxGyOoOGRRfG?= =?us-ascii?Q?biSQSjVsg5/1f7M9tPIZPVLMvXd/ysQFjzbudlhajfchlVV2+uZinI/8qYm4?= =?us-ascii?Q?vUkYPp8IQxUxRiuKt5vJ4A4rA4GtbS8Orz9TnemcxP82K6xkKrbjUcd45bHV?= =?us-ascii?Q?uKnxD7ix6QgRk+CTs+/27sIJUVtqqkrOMqaYBjz5wZKFPHPMSKCkKaVrNmUS?= =?us-ascii?Q?C6gbaKCPkS5p9GDUMCFclzVdGXJi9+6xHgCcTuHqmROgh3ovYbimrOlHQN4B?= =?us-ascii?Q?mYDvDRgp6pKvgS+WMVy64VqVLVwPAFY90Fp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=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: fd43793a-4497-4d59-1d61-08d9309efe7c X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2021 08:16:08.1179 (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: Zg5KABGYDqTJid/9CDKDAK6S1/uUs5LOyebFtPexnT/hZSr1F87pCTvSfuiFM5SDTHMfTrsmJFeQj4xZbjtSWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2737 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC PATCH] dmadev: introduce DMA device library 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: Richardson, Bruce > Sent: Wednesday, June 16, 2021 16:05 > To: Wang, Haiyue > Cc: Chengwen Feng ; thomas@monjalon.net; Yigit, = Ferruh > ; dev@dpdk.org; nipun.gupta@nxp.com; hemant.agraw= al@nxp.com; > maxime.coquelin@redhat.com; honnappa.nagarahalli@arm.com; jerinj@marvell.= com; > david.marchand@redhat.com; jerinjacobk@gmail.com; Xia, Chenbo > Subject: Re: [dpdk-dev] [RFC PATCH] dmadev: introduce DMA device library >=20 > On Wed, Jun 16, 2021 at 03:17:51AM +0100, Wang, Haiyue wrote: > > > -----Original Message----- > > > From: dev On Behalf Of Chengwen Feng > > > Sent: Tuesday, June 15, 2021 21:22 > > > To: thomas@monjalon.net; Yigit, Ferruh > > > Cc: dev@dpdk.org; nipun.gupta@nxp.com; hemant.agrawal@nxp.com; maxime= .coquelin@redhat.com; > > > honnappa.nagarahalli@arm.com; jerinj@marvell.com; david.marchand@redh= at.com; Richardson, Bruce > > > ; jerinjacobk@gmail.com > > > Subject: [dpdk-dev] [RFC PATCH] dmadev: introduce DMA device library > > > > > > This patch introduces 'dmadevice' which is a generic type of DMA > > > device. > > > > > > The APIs of dmadev library exposes some generic operations which can > > > enable configuration and I/O with the DMA devices. > > > > > > Signed-off-by: Chengwen Feng > > > --- > > > lib/dmadev/rte_dmadev.h | 531 ++++++++++++++++++++++++++++++++++= ++++++++++ > > > lib/dmadev/rte_dmadev_pmd.h | 384 ++++++++++++++++++++++++++++++++ > > > 2 files changed, 915 insertions(+) > > > create mode 100644 lib/dmadev/rte_dmadev.h > > > create mode 100644 lib/dmadev/rte_dmadev_pmd.h > > > > > > diff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h > > > new file mode 100644 > > > index 0000000..ca7c8a8 > > > --- /dev/null > > > +++ b/lib/dmadev/rte_dmadev.h > > > @@ -0,0 +1,531 @@ > > > +/* SPDX-License-Identifier: BSD-3-Clause > > > + * Copyright 2021 HiSilicon Limited. > > > + */ > > > + > > > +#ifndef _RTE_DMADEV_H_ > > > +#define _RTE_DMADEV_H_ > > > + > > > +/** > > > + * @file rte_dmadev.h > > > + * > > > + * DMA (Direct Memory Access) device APIs. > > > + * > > > + * Defines RTE DMA Device APIs for DMA operations and its provisioni= ng. > > > + */ > > > + > > > +#ifdef __cplusplus > > > +extern "C" { > > > +#endif > > > + > > > +#include > > > +#include > > > +#include > > > +#include > > > + > > > +/** > > > + * @warning > > > + * @b EXPERIMENTAL: this API may change without prior notice. > > > + * > > > + * Get the total number of DMA devices that have been successfully > > > + * initialised. > > > + * > > > + * @return > > > + * The total number of usable DMA devices. > > > + */ > > > +__rte_experimental > > > +uint16_t > > > +rte_dmadev_count(void); > > > + > > > +/** > > > + * @warning > > > + * @b EXPERIMENTAL: this API may change without prior notice. > > > + * > > > + * Get the device identifier for the named DMA device. > > > + * > > > + * @param name > > > + * DMA device name to select the DMA device identifier. > > > + * > > > + * @return > > > + * Returns DMA device identifier on success. > > > + * - <0: Failure to find named DMA device. > > > + */ > > > +__rte_experimental > > > +int > > > +rte_dmadev_get_dev_id(const char *name); > > > + > > > > Like 'struct rte_pci_device', 'struct rte_vdev_device', and new introdu= ced > > 'struct rte_auxiliary_device', have the "rte_xxx_device" name style, > > How about 'struct rte_dma_device' name ? >=20 > One difference is that the pci, vdev and auxiliary devices are all device= s > types on a bus, rather than devices in a functional class like ethdev, > rawdev, eventdev. I think what is here is fine for now - if you feel >From this point of view, yes, it's fine. Thanks, Bruce. > strongly we can revisit later.