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 7A825A0C45; Tue, 21 Sep 2021 18:26:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62F2F40151; Tue, 21 Sep 2021 18:26:04 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id DD6544003C for ; Tue, 21 Sep 2021 18:26:02 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10114"; a="220213449" X-IronPort-AV: E=Sophos;i="5.85,311,1624345200"; d="scan'208";a="220213449" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2021 09:26:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,311,1624345200"; d="scan'208";a="518269568" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP; 21 Sep 2021 09:26:00 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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; Tue, 21 Sep 2021 09:26:00 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 21 Sep 2021 09:26:00 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.49) 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.12; Tue, 21 Sep 2021 09:25:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YlBGR44pgf23Hu7k/BXpB0fjvH0sdmffVmOeYPNbYd4X03NbBPtkLUlVJRx75xYOP1O68a/jB+rhgdQ3R2HIW7xfIHOJUbJm5iorNOY8nuuYjP2z9MxYig9Y2PNBEt25eAxmxTgpgDy/xzg0DP6hzik6tRCGCzSuNr9GgO4TmpU9exxEHiB58BIcdXySW0UrrGgnSu0RS7oCFOJcMq+7CdTZDWiJHNbPQOWLLr3Mw1hDPhCRo1HgFVMQY6ZpXcnm/CFwkAoJ3sSmhkCgQKV0Vb0UvZXUdVbGI/2FjIbKFpZxgvixxvbG7Y46UETCxNGcPwmeauSGpncqJw4f1OT/iA== 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=l5pcJU8sLoPcakBzBo9JAVP14fVTtYDT6rbKEXYTYeA=; b=BM4I3LeQPeAkl3yHn2H42kqUgtnn7HXmIo2ZsnjZ0TOFUfEBS5cWZnJCd5asuYhM4gTx9GzWl0omwwXP1OF1uddHsE7wQWEA45lBfYwhNt1KFzcPHFWOWN8KXbuMm+FgLBcfQO1b7eB5EYgqXAckj2spGQkyejuwC+ct5OI3EICcLMB/n7a8K8YjvDfB9niNPhX4ji+wH+RhQrjTsA4H2uih33d5BGJLukqdXaCQqawkheQEVJn82SXSX02dDGdZ0gJ3QC7DYw3KlO8xZrc2bAZHzW0WKv5UCv2ScvMgxxGwN+iLzBUb9sB7R4pcu7dPtpw/qAHitl9/3sxUUqMSBA== 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=l5pcJU8sLoPcakBzBo9JAVP14fVTtYDT6rbKEXYTYeA=; b=vx21mQuINkCSGQFzPb5jQOlyv5/lDawZtu8cny7e04PbCpy/CyogcU0eCt5Z1CCVvXRCyBbpHlsY+cds7I3Vnippv4ryDE67amZxNljcXRPD9NhtBiv5SigzYPMxXDjAzKLyCed+TipMr4QaTbtgeidBaZb4kcRU1tNNWso3AYA= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5207.namprd11.prod.outlook.com (2603:10b6:510:32::15) by PH0PR11MB5062.namprd11.prod.outlook.com (2603:10b6:510:3e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Tue, 21 Sep 2021 16:25:57 +0000 Received: from PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::9578:a4b5:2716:fbaa]) by PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::9578:a4b5:2716:fbaa%6]) with mapi id 15.20.4523.018; Tue, 21 Sep 2021 16:25:57 +0000 To: Bruce Richardson CC: , , , References: <20210827172550.1522362-1-conor.walsh@intel.com> <20210917154227.737554-1-conor.walsh@intel.com> <20210917154227.737554-7-conor.walsh@intel.com> From: Conor Walsh Message-ID: <81924878-1e70-4841-d376-68cde1cfdd8f@intel.com> Date: Tue, 21 Sep 2021 17:25:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-ClientProxiedBy: DB6PR07CA0190.eurprd07.prod.outlook.com (2603:10a6:6:42::20) To PH0PR11MB5207.namprd11.prod.outlook.com (2603:10b6:510:32::15) MIME-Version: 1.0 Received: from [192.168.1.20] (109.77.147.22) by DB6PR07CA0190.eurprd07.prod.outlook.com (2603:10a6:6:42::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.6 via Frontend Transport; Tue, 21 Sep 2021 16:25:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8f7a7018-d361-40d6-6b5c-08d97d1c7dd0 X-MS-TrafficTypeDiagnostic: PH0PR11MB5062: 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:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tV2TmHmM1kvlnqUWxBOIiDMdLIgjdE2rdDYwifg91EzNix1L3fA15LmdOpFpK2bwtdUjHXdTXj7nTeSBqk95Lkje8UBAHX4X6PLF7lQs+JIt38r3UiPbduds4ttMJsiBo60J0gDRbmvybDvrhJGdkCwIQvf4N7vsx+HZ4QszpJg9sfg78GQLzbStQRx5FbT3IZ8wTOJMmriP6JbRpB7KtG89WaFEZBl/k+jRiOqSLhC+tLeFHvEr3e/u6gKDYM2jA7fuFtIY3VlTd5/BNEaxTZSVD9r4iWHTk9U0xOVUKdeMWxJxR8Dczew4IAAkhbpMgQnT8qtqQQZXS/NEtiXzcRzLVjEX9iTbgr3Xjth0Vw93O4Xa2Q7y7ElNmefbmYz5oN60riIQSZx4m+d2zjqed7oyvQvxXLZ6PrZwPXaNPwPiKJGrayVeh0h7ntDmUWDyehLqNVaQMFBTGl3WcGpV4YAarPOcQ1jG8b1RqUIbc3sEnhs221zt8yQ7D30VlT2Z1xfxn9wClBZDhlE9pNadG/q5YGOZBFY3gbtJ1u1iBD2gr3opyKN1CjQ0gP72EzqF1XO96Am95rDUHDt+BEfiP/rVfnMq5t8C0zNEo1xaJqlDFbFhRA2W2RzPHW5vKHvGV0ekgNhdIojnU5DRoZpY/R5bhPfdtBU/rHkzYap6kqK40doM9lVE6Whc3KnRXEGBBx8QxdGtbBOrSPFlV73nyOOEJfCgTahNsq6hhOCuol8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5207.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(36756003)(66946007)(83380400001)(37006003)(6666004)(6636002)(5660300002)(86362001)(6862004)(8676002)(38100700002)(316002)(16576012)(66556008)(44832011)(8936002)(66476007)(31686004)(53546011)(6486002)(4326008)(508600001)(956004)(31696002)(2616005)(26005)(186003)(2906002)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZHNXU0tRTGhXSTRSN0dDeCs2Qk1KbTlpclV1c25FS3RhZlNkaHpBNkg4N1py?= =?utf-8?B?RFpBZE4wS2xpOFdKVlFSYTZ0Rys5SVN1VloxbkhqWmNjMVBvb3FURlhHdTZm?= =?utf-8?B?NWtOY2YyV1EvNUNGd053YksxQ0djUHhRRmZCRjYzNElkemhnS1N2VWtOT1hP?= =?utf-8?B?NTdGWkdYL1Ztcm9QeVFmNzBLdHVocWZCOHM2VmhEbjBPVEhmMktHdkw5L2Mv?= =?utf-8?B?dk9OdittM1VQb04vTVJYa2FGWTY3bUJEUUdOM2VVd1hPN1J3dlNEOFdJdWRI?= =?utf-8?B?Zk12MitETVkxdlhWZ1NnMk9nYldJOTE4TnpwQ3htU2V1MUpRZU5CUjNodU5Q?= =?utf-8?B?TEFNN2NQRTZLTFpqdlpZdWdXRmtqZ0pQV2lzWFArdDg2dnkxZHl4L2hZTmli?= =?utf-8?B?NmVrR0l1U0NVTjhyb3RSUGYxZXFM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WRoeE5xVFpCYkkxL3FZcEhVRFFPVlRPa2F2eHJ3?= =?utf-8?B?ZU8vcDNKQno2ejBwSzhURG94NktVZk0xR0tRRkc3bVhkdzQ5TVZJQzlVR2ky?= =?utf-8?B?c2JFZVlFdEtBTXIxOGZXQWdnS09RMkRQbXkrc1lFdFdpczlOOWJkTzFVdmlQ?= =?utf-8?B?WGI5WEUzQWJEMVlsb0tNbHgxd0RlSWRwUVNFRFM0YVlVUnQ1bTJJZ29Td0pP?= =?utf-8?B?UWl6MytvU2xCYzF3aXVXd1BPTlFhOTRZbFNWaEdLVUUvRUR4UmZjd1cyMThm?= =?utf-8?B?d3lmOEFQNys3TG10cU15bjlIUzVhZ3ZUZjYyOE1pTHNtYmhhS21MZ3daMUhR?= =?utf-8?B?WlA5WUNJSWN2MkY5Q3h5bm52SG1obENaWW84MUJRaXR4a05uUTNNbDBlOXAz?= =?utf-8?Q?hijrdVR2clgf8r/IbSnPaiuK0oA3cT/qtYsKgzn?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8f7a7018-d361-40d6-6b5c-08d97d1c7dd0 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5207.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2021 16:25:57.5312 (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: N6xgK1ze3IdsiGAz0tcTqke3Rsc8YPpJyCnAlwNzMuAbX4plalUsnLxpOFY30KI5If9TUHK5kzm+zmmedmzYCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5062 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 06/11] dma/ioat: add data path job submission functions 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 20/09/2021 14:36, Bruce Richardson wrote: > On Fri, Sep 17, 2021 at 03:42:22PM +0000, Conor Walsh wrote: >> Add data path functions for enqueuing and submitting operations to >> IOAT devices. >> >> Signed-off-by: Conor Walsh >> Reviewed-by: Kevin Laatz >> --- >> doc/guides/dmadevs/ioat.rst | 54 ++++++++++++++++++++ >> drivers/dma/ioat/ioat_dmadev.c | 92 ++++++++++++++++++++++++++++++++++ >> 2 files changed, 146 insertions(+) >> >> diff --git a/doc/guides/dmadevs/ioat.rst b/doc/guides/dmadevs/ioat.rst >> index a64d67bf89..2464207e20 100644 >> --- a/doc/guides/dmadevs/ioat.rst >> +++ b/doc/guides/dmadevs/ioat.rst >> @@ -89,3 +89,57 @@ The following code shows how the device is configured in ``test_dmadev.c``: >> >> Once configured, the device can then be made ready for use by calling the >> ``rte_dma_start()`` API. >> + >> +Performing Data Copies >> +~~~~~~~~~~~~~~~~~~~~~~~ >> + >> +To perform data copies using IOAT dmadev devices, the functions >> +``rte_dma_copy()`` and ``rte_dma_submit()`` should be used. Alternatively >> +``rte_dma_copy()`` can be called with the ``RTE_DMA_OP_FLAG_SUBMIT`` flag >> +set. >> + >> +The ``rte_dma_copy()`` function enqueues a single copy to the >> +device ring for copying at a later point. The parameters to the function >> +include the device ID of the desired device, the virtual DMA channel required >> +(always 0 for IOAT), the IOVA addresses of both the source and destination >> +buffers, the length of the data to be copied and any operation flags. The >> +function will return the index of the enqueued job which can be use to >> +track that operation. >> + >> +While the ``rte_dma_copy()`` function enqueues a copy operation on the device >> +ring, the copy will not actually be performed until after the application calls >> +the ``rte_dma_submit()`` function. This function informs the device hardware >> +of the elements enqueued on the ring, and the device will begin to process them. >> +It is expected that, for efficiency reasons, a burst of operations will be >> +enqueued to the device via multiple enqueue calls between calls to the >> +``rte_dma_submit()`` function. If desired you can pass the >> +``RTE_DMA_OP_FLAG_SUBMIT`` flag when calling ``rte_dma_copy()`` and this will >> +tell the device to perform the enqueued operation and any unperformed operations >> +before it. The ``RTE_DMA_OP_FLAG_SUBMIT`` flag can be passed instead of calling >> +the ``rte_dma_submit()`` function for example on the last enqueue of the burst. >> + >> +The following code from demonstrates how to enqueue a burst of copies to the >> +device and start the hardware processing of them: >> + >> +.. code-block:: C >> + >> + for (i = 0; i < BURST_SIZE; i++) { >> + if (rte_dma_copy(dev_id, vchan, rte_mbuf_data_iova(srcs[i]), >> + rte_mbuf_data_iova(dsts[i]), COPY_LEN, 0) < 0) { >> + PRINT_ERR("Error with rte_dma_copy for buffer %u\n", i); >> + return -1; >> + } >> + } >> + if (rte_dma_submit(dev_id, vchan) < 0) { >> + PRINT_ERR("Error with performing operations\n", i); >> + return -1; >> + } >> + >> +Filling an Area of Memory >> +~~~~~~~~~~~~~~~~~~~~~~~~~~ >> + >> +The driver also has support for the ``fill`` operation, where an area >> +of memory is overwritten, or filled, with a short pattern of data. >> +Fill operations can be performed in much the same was as copy operations >> +described above, just using the ``rte_dma_fill()`` function rather >> +than the ``rte_dma_copy()`` function. > Similar to the feedback on the idxd driver, I think we need to see how much > of this text is already present in the generic dmadev documentation and > re-use or reference that. If it's not present, then these patches should > add it to the common doc, not a separate driver-specific doc. > > /Bruce I will work with Kevin to rewrite these to reduce the amount of duplication between our drivers and for future drivers in the next version. Thanks, Conor.