From: Amit Prakash Shukla <amitprakashs@marvell.com>
To: Cheng Jiang <honest.jiang@foxmail.com>,
Chengwen Feng <fengchengwen@huawei.com>
Cc: <dev@dpdk.org>, <jerinj@marvell.com>, <vattunuru@marvell.com>,
<anoobj@marvell.com>, <gmuthukrishn@marvell.com>,
Amit Prakash Shukla <amitprakashs@marvell.com>
Subject: [PATCH] doc: add dma perf feature details
Date: Mon, 18 Mar 2024 23:47:30 +0530 [thread overview]
Message-ID: <20240318181730.2725829-1-amitprakashs@marvell.com> (raw)
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 <amitprakashs@marvell.com>
---
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.
--
2.34.1
next reply other threads:[~2024-03-18 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 18:17 Amit Prakash Shukla [this message]
2024-03-18 18:45 ` [PATCH v2] " Amit Prakash Shukla
2024-03-19 9:03 ` [PATCH] " zhoumin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240318181730.2725829-1-amitprakashs@marvell.com \
--to=amitprakashs@marvell.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=gmuthukrishn@marvell.com \
--cc=honest.jiang@foxmail.com \
--cc=jerinj@marvell.com \
--cc=vattunuru@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).