doc: add limitation in using segment-sz in crypto-perf

Message ID 20250516121043.145572-1-gakhil@marvell.com (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers
Series doc: add limitation in using segment-sz in crypto-perf |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/aws-unit-testing success Unit Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Akhil Goyal May 16, 2025, 12:10 p.m. UTC
When segment-sz is given as parameter,
use buffer-sz in descending order.
The reason is, same scatter gather buffer list is being used
for all packet sizes which is initialized once in the beginning.
Now if a small packet case is run first,
mbuf SG list will be trimmed to a smaller number of SG and
rest of the SGs are lost resulting in segfault.
Buffers cannot be re-initialized as that will come in datapath and
will be costly.
So to workaround this, if segment-sz is passed as argument,
use values in buffer-sz in descending order.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 doc/guides/tools/cryptoperf.rst | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Anoob Joseph May 16, 2025, 2:41 p.m. UTC | #1
> Subject: [PATCH] doc: add limitation in using segment-sz in crypto-perf
> 
> When segment-sz is given as parameter,
> use buffer-sz in descending order.
> The reason is, same scatter gather buffer list is being used for all packet sizes
> which is initialized once in the beginning.
> Now if a small packet case is run first, mbuf SG list will be trimmed to a smaller
> number of SG and rest of the SGs are lost resulting in segfault.
> Buffers cannot be re-initialized as that will come in datapath and will be costly.
> So to workaround this, if segment-sz is passed as argument, use values in
> buffer-sz in descending order.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Hemant Agrawal May 19, 2025, 6:03 a.m. UTC | #2
> -----Original Message-----
> From: Anoob Joseph <anoobj@marvell.com>
> Sent: 16 May 2025 20:11
> To: Akhil Goyal <gakhil@marvell.com>; dev@dpdk.org
> Cc: suanmingm@nvidia.com; kai.ji@intel.com; Hemant Agrawal
> <hemant.agrawal@nxp.com>; brian.dooley@intel.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: RE: [PATCH] doc: add limitation in using segment-sz in crypto-perf
> Importance: High
> 
> > Subject: [PATCH] doc: add limitation in using segment-sz in
> > crypto-perf
> >
> > When segment-sz is given as parameter, use buffer-sz in descending
> > order.
> > The reason is, same scatter gather buffer list is being used for all
> > packet sizes which is initialized once in the beginning.
> > Now if a small packet case is run first, mbuf SG list will be trimmed
> > to a smaller number of SG and rest of the SGs are lost resulting in segfault.
> > Buffers cannot be re-initialized as that will come in datapath and will be
> costly.
> > So to workaround this, if segment-sz is passed as argument, use values
> > in buffer-sz in descending order.
> >
> > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  
Akhil Goyal May 21, 2025, 2:11 p.m. UTC | #3
> > Subject: [PATCH] doc: add limitation in using segment-sz in crypto-perf
> >
> > When segment-sz is given as parameter,
> > use buffer-sz in descending order.
> > The reason is, same scatter gather buffer list is being used for all packet sizes
> > which is initialized once in the beginning.
> > Now if a small packet case is run first, mbuf SG list will be trimmed to a smaller
> > number of SG and rest of the SGs are lost resulting in segfault.
> > Buffers cannot be re-initialized as that will come in datapath and will be costly.
> > So to workaround this, if segment-sz is passed as argument, use values in
> > buffer-sz in descending order.
> >
> > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>

Applied to dpdk-next-crypto
  

Patch

diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.rst
index e53e2d0ebf..a3d35f6a50 100644
--- a/doc/guides/tools/cryptoperf.rst
+++ b/doc/guides/tools/cryptoperf.rst
@@ -139,6 +139,7 @@  The following are the application command-line options:
 * ``--segment-sz <n>``
 
         Set the size of the segment to use, for Scatter Gather List testing.
+        Use list of values in buffer-sz in descending order if segment-sz is used.
         By default, it is set to the size of the maximum buffer size, including the digest size,
         so a single segment is created.