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 95041A0C54; Fri, 3 Sep 2021 17:13:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FE31410D7; Fri, 3 Sep 2021 17:13:16 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 4915A40E78 for ; Fri, 3 Sep 2021 17:13:14 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10096"; a="219505427" X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="219505427" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2021 08:13:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="429009071" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga006.jf.intel.com with ESMTP; 03 Sep 2021 08:13:12 -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.2242.12; Fri, 3 Sep 2021 08:13:12 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.2242.12; Fri, 3 Sep 2021 08:13:12 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 3 Sep 2021 08:13:12 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) 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.2242.10; Fri, 3 Sep 2021 08:13:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BjKRzS8BTFUGrvKEvFwGFCh6aciTZR6L+JMz7OIqBgVK/iS4YiDvwMLijwkSUZTjheW9S2AkFpU8dNdDsPsmiatYcJjeUzoCpQ3dch0hfJrJ1aiXDSMgI0Asiu/j5AHQGR7ZqmMtXUEva2NZ8l2/gqi2Lvmk+qB1BGS7zmnMtMY+uQJAiEiW5SEnxBrrY0aP/wxhiRTLsN2lZy1TuDw2FM9Fbo8rEDlwYxnja1zns1axPTkNowF34fmV1JLj7cMxWggXm+fp3/1nD6mLOoEEk+nfaUuJ6rM8GA3I9MUJRL6FrivFwqV7Hn2Kv6uJfdyPK+07ICj8C3yDkXJcS7AMUQ== 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; bh=9834GEmMUryP/yN0bcWdbOzSkL7TCZ6MYI1UQU86eA0=; b=i6JucJlU1EMdrEctDUgG620e08hPXIyCQwHhiv5juEWyLYTYD2GHR/8W7xiogCg4J3eMHfyNEUCPC+Q9dlAH5GtlhT9372s9F77Yn1I9E2eybZv4F08A0cuABn4/a1Sja470yhNIKdL27HxY/VEpSTKpPmq4Dsfbpq2/Fp0o9ujoHtbOgfGqKed0D3g5MNEqk96WnOzd5xCK6M5SdZNOdLvBiV8W2P1uQogsPQulAGhP7dobS2o0s83Ss7p/xhy6+vS2z/vlGBmUCTNb4k8yxbyMVUGxHsgnpsS0AwLwNopBqqJkQBXOhvVczR1PWDHx9874V8D4Fu9y5vwHGLf08w== 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=9834GEmMUryP/yN0bcWdbOzSkL7TCZ6MYI1UQU86eA0=; b=GPDXzTT3IR7zWGJBbJ5H77g9gUt5wHNZDWgyQT3chHYxwdZfOr99iLtswsAL2/NLqCdrA0ZYhre59mkYz+cQ+bml5/9P/OhIBTNyW2An33nIp2tZCwAfVy3UAdrgBp3OsXckgRzcw5EZ2SKMDfrRSCL01BeISnljLgzRYKF9V/w= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5055.namprd11.prod.outlook.com (2603:10b6:a03:2d9::10) by SJ0PR11MB4941.namprd11.prod.outlook.com (2603:10b6:a03:2d2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17; Fri, 3 Sep 2021 15:13:08 +0000 Received: from SJ0PR11MB5055.namprd11.prod.outlook.com ([fe80::78d4:6f82:aa87:c271]) by SJ0PR11MB5055.namprd11.prod.outlook.com ([fe80::78d4:6f82:aa87:c271%5]) with mapi id 15.20.4478.022; Fri, 3 Sep 2021 15:13:08 +0000 To: Chengwen Feng , , , , , , CC: , , , , , , , , , , References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <1630588395-2804-1-git-send-email-fengchengwen@huawei.com> <1630588395-2804-2-git-send-email-fengchengwen@huawei.com> From: Kevin Laatz Message-ID: <2c8abc9e-def1-8286-157b-b5af08dd4e33@intel.com> Date: Fri, 3 Sep 2021 16:13:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: <1630588395-2804-2-git-send-email-fengchengwen@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: DB6P195CA0015.EURP195.PROD.OUTLOOK.COM (2603:10a6:4:cb::25) To SJ0PR11MB5055.namprd11.prod.outlook.com (2603:10b6:a03:2d9::10) MIME-Version: 1.0 Received: from [192.168.1.15] (109.79.29.175) by DB6P195CA0015.EURP195.PROD.OUTLOOK.COM (2603:10a6:4:cb::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Fri, 3 Sep 2021 15:13:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0025ae0b-ea9a-4e35-dfee-08d96eed566f X-MS-TrafficTypeDiagnostic: SJ0PR11MB4941: 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:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zgw5fQJAtB2eaH+ssdcDj3zbrsFZ6In1vV3tcTtebyysvQOgW/so9X7dCk6dcnO70qNmfp7PBUJ3hkzYnIQWql7Z5u1oWGIP6pSr+vcHoz/W1oFXRNRMqOHgQfNtaKUmwfgaB+jkLNIWzGjGHvxWzD3X7Jmj/AcODgGtFcd2ybzJupUxKsx1u9QerkW0gGXQLiUCCWB++93woYGE9lo6Q8VXFZD/fx9geC1Z2WbIDtZ+5JclHxHe7mUkv6fZOLlSVXXl+/a7zm5Y7XQhV0orObt+N33RZHYZpHqbd0PfEji/EI625imV5EGkTC42bxOJ3ysyo+6/Drz3yLCN59AKEgpJQtBknmtNQoDaM0Fvfkj/xpV15mKpDMPTIwCJ3NngaP7tPhhn4Z7TINWNjzVmtJ5dTOZwolLJgC877ZwLwDdsZVzVMlu98QeOVfGu8OspC9elCaehq3dHW4JbpQclg78MonPEdF0zZ+u++aBeI7xcZYVamdKKLLjsytU/CYmzyLqg6x3Pg2daxR6eo7hlBB/ymdZ0ycpKZ/bAvja5p6x4pTzNexFirW3TuZjUu8JvZyzS4Bx6skXCZP+YGyvDKiJuNARsiInoo7EdapTsGz2xpUC4QFxg6oJzK3bNfkVs4H54zVG8IL4hGFrbk/OjeG7TdaaO1CUnCNYslgQc8m8TTDDH+5NlzeVJVZ/X6+2cMHEItLIGepvmEVSH/GufgrzCxeyfIrlfPnnDReTAJzk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5055.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(376002)(396003)(346002)(366004)(5660300002)(316002)(6666004)(478600001)(31696002)(16576012)(4326008)(86362001)(31686004)(107886003)(66476007)(83380400001)(66574015)(26005)(66556008)(186003)(6486002)(2616005)(36756003)(44832011)(8936002)(956004)(2906002)(8676002)(53546011)(38100700002)(66946007)(7416002)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bkx2a3loY3lhazc4em5iRmdxR0dzMFZrMUxGb2IxZWNDekxWSHRWSGpHSzdh?= =?utf-8?B?WUhKYVFyU3dCV2VJRWZhMjFYV3hRakZCZGpNbld3em1DeldPVG80Um1JRVV6?= =?utf-8?B?TDNBeS9teHo1U1FUM0h1QjJ2T0xsNHlaRDREMjRRczRzdHZNNzAyQU44ZTg2?= =?utf-8?B?dytTNndjK3dLMmYzbVhLS1MxZ0V6eHhXUS9MRmZLWXkxTzJpcGVsZ1UxW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mV0l4d0pzL1o1cVBrdW16?= =?utf-8?B?MzJuWGgwK3RPaEx4TjBDbDV2OGNyYjRuY3Nid2crYlNWSXJGdkt2N28yYnBT?= =?utf-8?B?anI3ZEQyc1o4QmxrbGZ1eXZtSDc1NWFaWFdzVDV4OGJENjVWRVAzdXE5UW0v?= =?utf-8?B?eU93VnZxWWQwR1ZJNjZodTVNQ0owSnJFUFR5dnRFSkdUOWorWnVydDFrRVRP?= =?utf-8?B?K1ZQRzFOMUFIcEd4TmV1T1pnMEJpWlNtVnM5dWp0QlEyVHE3SmVtNlQvQk1a?= =?utf-8?B?ZlFIeGZFRWF6RUhLcytnbXIzQzdPU3hTMXY0aEZpaUNsVnpJODkxSkYxdXVU?= =?utf-8?B?L3VaLzFOU0lsN3pFV0tTbDVFOUJHV2xleGEyMitxNWdoRnk3bE9GMzlxMW92?= =?utf-8?B?NkpxRkpuakY0Q1IwVVhlZkliTEJRWWNJRDRwQzRXOEw3NmJPVHJ4ZDJsSUNv?= =?utf-8?B?a0RubC90Mk82ZEVEWnphcHF3YjArM3BYQXErUm55SmlZM2VseDNvblZOVmRT?= =?utf-8?B?U1F2N1lQa0lTMldNNDVoYXRFVjM0aG5jSGFzVUJBTTNHSG1ybU9rTjk3Q2dw?= =?utf-8?B?bzUwY1ZKOG5lYmYzTlN4QXBtV1ZhWVBUUkNVdHB0TDFjM24rVW1yMGFZd1Ft?= =?utf-8?Q?ZmkzsAilx2JP7GSzKUiD6VHVEKn6UpokEb1Oy+S?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0025ae0b-ea9a-4e35-dfee-08d96eed566f X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5055.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2021 15:13:08.8472 (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: K8K74f+DiZ9/1NCmFJpENeFWsIHPJf93rv7YEBB+UDO1648iIosb+wJbDgSN9K5eoLEquMoHD0TO5iSXeldszA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4941 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v19 1/7] dmadev: introduce DMA device library public APIs 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" On 02/09/2021 14:13, Chengwen Feng wrote: > The 'dmadevice' is a generic type of DMA device. > > This patch introduce the 'dmadevice' public APIs which expose generic > operations that can enable configuration and I/O with the DMA devices. > > Maintainers update is also included in this patch. > > Signed-off-by: Chengwen Feng > Acked-by: Bruce Richardson > Acked-by: Morten Brørup > Acked-by: Jerin Jacob > --- > MAINTAINERS | 4 + > doc/api/doxy-api-index.md | 1 + > doc/api/doxy-api.conf.in | 1 + > doc/guides/rel_notes/release_21_11.rst | 5 + > lib/dmadev/meson.build | 4 + > lib/dmadev/rte_dmadev.h | 949 +++++++++++++++++++++++++++++++++ > lib/dmadev/version.map | 24 + > lib/meson.build | 1 + > 8 files changed, 989 insertions(+) > create mode 100644 lib/dmadev/meson.build > create mode 100644 lib/dmadev/rte_dmadev.h > create mode 100644 lib/dmadev/version.map > > + > +/** > + * rte_dma_direction - DMA transfer direction defines. > + */ No need to have the struct name in the comment. > +enum rte_dma_direction { > + RTE_DMA_DIR_MEM_TO_MEM, > + /**< DMA transfer direction - from memory to memory. > + * > + * @see struct rte_dmadev_vchan_conf::direction > + */ > + RTE_DMA_DIR_MEM_TO_DEV, > + /**< DMA transfer direction - from memory to device. > + * In a typical scenario, the SoCs are installed on host servers as > + * iNICs through the PCIe interface. In this case, the SoCs works in > + * EP(endpoint) mode, it could initiate a DMA move request from memory > + * (which is SoCs memory) to device (which is host memory). > + * > + * @see struct rte_dmadev_vchan_conf::direction > + */ > + RTE_DMA_DIR_DEV_TO_MEM, > + /**< DMA transfer direction - from device to memory. > + * In a typical scenario, the SoCs are installed on host servers as > + * iNICs through the PCIe interface. In this case, the SoCs works in > + * EP(endpoint) mode, it could initiate a DMA move request from device > + * (which is host memory) to memory (which is SoCs memory). > + * > + * @see struct rte_dmadev_vchan_conf::direction > + */ > + RTE_DMA_DIR_DEV_TO_DEV, > + /**< DMA transfer direction - from device to device. > + * In a typical scenario, the SoCs are installed on host servers as > + * iNICs through the PCIe interface. In this case, the SoCs works in > + * EP(endpoint) mode, it could initiate a DMA move request from device > + * (which is host memory) to the device (which is another host memory). > + * > + * @see struct rte_dmadev_vchan_conf::direction > + */ > +}; > + > +/** > + * enum rte_dmadev_port_type - DMA access port type defines. > + * > + * @see struct rte_dmadev_port_param::port_type > + */ > +enum rte_dmadev_port_type { > + RTE_DMADEV_PORT_NONE, > + RTE_DMADEV_PORT_PCIE, /**< The DMA access port is PCIe. */ > +}; > + > + > +/** > + * rte_dmadev_stats - running statistics. > + */ No need to have the struct name in the comment. Maybe "Operation statistic counters"? > +struct rte_dmadev_stats { > + uint64_t submitted; > + /**< Count of operations which were submitted to hardware. */ > + uint64_t completed; > + /**< Count of operations which were completed. */ > + uint64_t errors; > + /**< Count of operations which failed to complete. */ > +}; The comments here are a little ambiguous, it would be better to explicitly mention that "errors" is a subset of "completed" and not an independent statistic. > + > +/** > + * rte_dmadev_sge - can hold scatter-gather DMA operation request entry. > + */ No need to have the struct name in the comment. > +struct rte_dmadev_sge { > + rte_iova_t addr; /**< The DMA operation address. */ > + uint32_t length; /**< The DMA operation length. */ > +}; > + Apart from the minor comments, LGTM. Reviewed-by: Kevin Laatz