From patchwork Mon Mar 18 18:17:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Prakash Shukla X-Patchwork-Id: 138465 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EC81543CE8; Mon, 18 Mar 2024 19:17:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C59CE40289; Mon, 18 Mar 2024 19:17:44 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 880B14027F for ; Mon, 18 Mar 2024 19:17:43 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42I9mBGa010536; Mon, 18 Mar 2024 11:17:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=pfpt0220; bh=n84biAAc tuQdBFIBLG/vLS1ek1mfoj5HjsYjQhJbwbM=; b=eNuh3DLUyafXsGVL3NnULz3r F9Z8/5s1OLYxqtAenBJcegZa9OqbmdvkhKeAjR77SC6XWUljkre4uE1OgqWQddKT isAF3QrNMAiDVUDlHdODiot+MIRMNvZDHkwjmJ/QnpheGjQrtJggE6NzUrrZ5mtR 9iNRCtgWbS0cU9xrzs17Z4oDr52AsglHdtYN30cvmIY5rlJE1fSND2jM78a8BooC I/PfSnzh9DEGXoeBLsw3zmrMXjucGLt8TBtzQKCEwXRFIHVFQXeHo8tjR5ODFVjN gtyrW9f+esx/B0XBm4GomMxCuuOa1rBaqtT20praaDhFsEo7LsWJ2dfM/yFrOg== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wxka4skph-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Mar 2024 11:17:42 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.32; Mon, 18 Mar 2024 11:17:41 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1258.32 via Frontend Transport; Mon, 18 Mar 2024 11:17:41 -0700 Received: from cavium-OptiPlex-5090-BM14.. (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id 297593F7044; Mon, 18 Mar 2024 11:17:38 -0700 (PDT) From: Amit Prakash Shukla To: Cheng Jiang , Chengwen Feng CC: , , , , , Amit Prakash Shukla Subject: [PATCH] doc: add dma perf feature details Date: Mon, 18 Mar 2024 23:47:30 +0530 Message-ID: <20240318181730.2725829-1-amitprakashs@marvell.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-GUID: 5mXv0BTstgTFJgrg0E9ioLbB4Y8VHoh9 X-Proofpoint-ORIG-GUID: 5mXv0BTstgTFJgrg0E9ioLbB4Y8VHoh9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-18_12,2024-03-18_03,2023-05-22_02 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 Update dma perf test document with below support features: 1. Memory-to-device and device-to-memory copy. 2. Skip support. 3. Scatter-gather support. Signed-off-by: Amit Prakash Shukla --- doc/guides/tools/dmaperf.rst | 89 ++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 25 deletions(-) diff --git a/doc/guides/tools/dmaperf.rst b/doc/guides/tools/dmaperf.rst index 9e3e78a6b7..4a5702a628 100644 --- a/doc/guides/tools/dmaperf.rst +++ b/doc/guides/tools/dmaperf.rst @@ -5,27 +5,23 @@ dpdk-test-dma-perf Application ============================== The ``dpdk-test-dma-perf`` tool is a Data Plane Development Kit (DPDK) application -that enables testing the performance of DMA (Direct Memory Access) devices available within DPDK. -It provides a test framework to assess the performance of CPU and DMA devices -under various scenarios, such as varying buffer lengths. -Doing so provides insight into the potential performance -when using these DMA devices for acceleration in DPDK applications. +that evaluates the performance of DMA (Direct Memory Access) devices accessible in DPDK environment. +It provides a benchmark framework to assess the performance of CPU and DMA devices +under various combinations, such as varying buffer lengths, scatter-gather copy, copying in remote +memory etc. It helps in evaluating performance of DMA device as hardware acceleration vehicle in +DPDK application. -It supports memory copy performance tests for now, -comparing the performance of CPU and DMA automatically in various conditions -with the help of a pre-set configuration file. +In addition, this tool supports memory-to-memory, memory-to-device and device-to-memory copy tests, +to compare the performance of CPU and DMA capabilities under various conditions with the help of a +pre-set configuration file. Configuration ------------- -This application uses inherent DPDK EAL command-line options -as well as custom command-line options in the application. -An example configuration file for the application is provided -and gives the meanings for each parameter. - -Here is an extracted sample from the configuration file -(the complete sample can be found in the application source directory): +Along with EAL command-line arguments, this application supports various parameters for the +benchmarking through a configuration file. An example configuration file is provided below along +with the application to demonstrate all the parameters. .. code-block:: ini @@ -53,14 +49,35 @@ Here is an extracted sample from the configuration file lcore = 3, 4 eal_args=--in-memory --no-pci + [case3] + skip=1 + type=DMA_MEM_COPY + direction=mem2dev + vchan_dev=raddr=0x200000000,coreid=1,pfid=2,vfid=3 + dma_src_sge=4 + dma_dst_sge=1 + mem_size=10 + buf_size=64,8192,2,MUL + dma_ring_size=1024 + kick_batch=32 + src_numa_node=0 + dst_numa_node=0 + cache_flush=0 + test_seconds=2 + lcore_dma=lcore10@0000:00:04.2, lcore11@0000:00:04.3 + eal_args=--in-memory --file-prefix=test + The configuration file is divided into multiple sections, each section represents a test case. -The four variables ``mem_size``, ``buf_size``, ``dma_ring_size``, and ``kick_batch`` -can vary in each test case. -The format for this is ``variable=first,last,increment,ADD|MUL``. -This means that the first value of the variable is 'first', -the last value is 'last', -'increment' is the step size, -and 'ADD|MUL' indicates whether the change is by addition or multiplication. +The four mandatory variables ``mem_size``, ``buf_size``, ``dma_ring_size``, and ``kick_batch`` +can vary in each test case. The format for this is ``variable=first,last,increment,ADD|MUL``. +This means that the first value of the variable is 'first', the last value is 'last', +'increment' is the step size, and 'ADD|MUL' indicates whether the change is by addition or +multiplication. + +The variables for mem2dev and dev2mem copy are ``direction``, ``vchan_dev`` and can vary in each +test case. If the direction is not configured, the default is mem2mem copy. + +For scatter-gather copy test ``dma_src_sge``, ``dma_dst_sge`` must be configured. Each case can only have one variable change, and each change will generate a scenario, so each case can have multiple scenarios. @@ -69,10 +86,32 @@ and each change will generate a scenario, so each case can have multiple scenari Configuration Parameters ~~~~~~~~~~~~~~~~~~~~~~~~ +``skip`` + To skip a test-case, must be configured as ``1`` + ``type`` The type of the test. Currently supported types are ``DMA_MEM_COPY`` and ``CPU_MEM_COPY``. +``direction`` + The direction of data transfer. + Currently supported directions: + + * ``mem2mem`` - memory to memory copy + + * ``mem2dev`` - memory to device copy + + * ``dev2mem`` - device to memory copy + +``vchan_dev`` + Comma separated bus related parameters for ``mem2dev`` and ``dev2mem`` copy. + +``dma_src_sge`` + Number of source segments for scatter-gather. + +``dma_dst_sge`` + Number of destination segments for scatter-gather. + ``mem_size`` The size of the memory footprint. @@ -131,6 +170,6 @@ with the same name as the configuration file with the addition of ``_result.csv` Limitations ----------- -Currently, this tool only supports memory copy performance tests. -Additional enhancements are possible in the future -to support more types of tests for DMA devices and CPUs. +DMA copy to/from remote memory address has following limitations: + + * ``vchan_dev`` config will be same for all the configured DMA devices.