From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11D13A046B for ; Thu, 27 Jun 2019 14:45:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42B4E4CA6; Thu, 27 Jun 2019 14:45:25 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B9D54326D for ; Thu, 27 Jun 2019 14:45:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 05:45:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,423,1557212400"; d="scan'208";a="313781803" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.252.3.102]) ([10.252.3.102]) by orsmga004.jf.intel.com with ESMTP; 27 Jun 2019 05:45:20 -0700 To: Bruce Richardson , dev@dpdk.org Cc: thomas@monjalon.net, jerinj@marvell.com References: <20190530212525.40370-1-bruce.richardson@intel.com> <20190627104055.8244-1-bruce.richardson@intel.com> <20190627104055.8244-9-bruce.richardson@intel.com> From: "Burakov, Anatoly" Message-ID: <90acd2bd-8f2e-852d-8336-df8f6faf2cda@intel.com> Date: Thu, 27 Jun 2019 13:45:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190627104055.8244-9-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 8/8] raw/ioat: add local API to perform copies X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 27-Jun-19 11:40 AM, Bruce Richardson wrote: > Add local APIs to trigger data copies, and retrieve handle values once > those copies are completed. Included are unit tests to validate the data > is copies correctly. > > Signed-off-by: Bruce Richardson > > --- > > V3: updated to use descriptor format in rte_ioat_spec.h > V2: test cases moved to self-test routine > --- > doc/guides/rawdevs/ioat_rawdev.rst | 100 ++++++++++++++++ > drivers/raw/ioat/Makefile | 1 + > drivers/raw/ioat/ioat_rawdev_test.c | 161 +++++++++++++++++++++++++- > drivers/raw/ioat/meson.build | 2 +- > drivers/raw/ioat/rte_ioat_rawdev.h | 169 +++++++++++++++++++++++++++- > 5 files changed, 428 insertions(+), 5 deletions(-) > > diff --git a/doc/guides/rawdevs/ioat_rawdev.rst b/doc/guides/rawdevs/ioat_rawdev.rst > index b908f31e0..22bb8a22c 100644 > --- a/doc/guides/rawdevs/ioat_rawdev.rst > +++ b/doc/guides/rawdevs/ioat_rawdev.rst > @@ -150,6 +150,106 @@ The following code shows how the device is configured in > Once configured, the device can then be made ready for use by calling the > ``rte_rawdev_start()`` API. > > +Performing Data Copies > +~~~~~~~~~~~~~~~~~~~~~~~ > + > +To perform data copies using IOAT rawdev devices, the functions > +``rte_ioat_enqueue_copy()`` and ``rte_ioat_do_copies()`` should be used. > +Once copies have been completed, the completion will be reported back when > +the application calls ``rte_ioat_completed_copies()``. > + > +The ``rte_ioat_enqueue_copy()`` function enqueues a single copy to the > +device ring for copying at a later point. The parameters to that function > +include the physical addresses of both the source and destination buffers, Physical or IOVA? > +as well as two "handles" to be returned to the user when the copy is > +completed. These handles can be arbitrary values, but two are provided so > +that the library can track handles for both source and destination on > +behalf of the user, e.g. virtual addresses for the buffers, or mbuf > +pointers if packet data is being copied. > + > +While the ``rte_ioat_enqueue_copy()`` function enqueues a copy operation on > +the device ring, the copy will not actually be performed until after the > + rte_mempool_free(pool); > free(snames); > free(stats); > free(ids); > return 0; > + > +err: > + rte_mempool_free(pool); > + free(snames); > + free(stats); > + free(ids); > + return -1; The goto is added a commit too late :D Otherwise, LGTM Acked-by: Anatoly Burakov -- Thanks, Anatoly