[PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation

Suanming Mou suanmingm at nvidia.com
Thu Feb 1 14:16:54 CET 2024


Hi,

I saw other crypto perf fixes are reviewed, any chance to take a look at this series?

> -----Original Message-----
> From: Suanming Mou <suanmingm at nvidia.com>
> Sent: Wednesday, January 3, 2024 12:00 PM
> To: ciara.power at intel.com
> Cc: dev at dpdk.org
> Subject: [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation
> 
> For the case crypto device requires headroom and tailroom, the segment_sz in
> options also contains the headroom_sz and tailroom_sz, but mbuf's data_len is
> user's segment_sz without headroom_sz and tailroom_sz. That means the data
> size to be copied should use user's segment_sz instead of options->segment_sz.
> 
> This commit fixes the copy segment size calculation.
> 
> Fixes: 14864c4217ce ("test/crypto-perf: populate mbuf in latency test")
> 
> Signed-off-by: Suanming Mou <suanmingm at nvidia.com>
> ---
>  app/test-crypto-perf/cperf_test_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-
> perf/cperf_test_common.c
> index ad2076dd2e..8faf832527 100644
> --- a/app/test-crypto-perf/cperf_test_common.c
> +++ b/app/test-crypto-perf/cperf_test_common.c
> @@ -271,7 +271,7 @@ cperf_mbuf_set(struct rte_mbuf *mbuf,
>  		const struct cperf_options *options,
>  		const struct cperf_test_vector *test_vector)  {
> -	uint32_t segment_sz = options->segment_sz;
> +	uint32_t segment_sz = options->segment_sz - options->headroom_sz -
> +options->tailroom_sz;
>  	uint8_t *mbuf_data;
>  	uint8_t *test_data;
>  	uint32_t remaining_bytes = options->max_buffer_size;
> --
> 2.34.1



More information about the dev mailing list