DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue
@ 2024-01-03  4:00 Suanming Mou
  2024-01-03  4:00 ` [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation Suanming Mou
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Suanming Mou @ 2024-01-03  4:00 UTC (permalink / raw)
  To: ciara.power; +Cc: dev

This commit fixes the bugs in multi-segment size calculation.

*** BLURB HERE ***

Suanming Mou (2):
  app/test-crypto-perf: fix copy segment size calculation
  app/test-crypto-perf: fix dst_mbuf size calculation

 app/test-crypto-perf/cperf_test_common.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation
  2024-01-03  4:00 [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Suanming Mou
@ 2024-01-03  4:00 ` Suanming Mou
  2024-02-01 13:16   ` Suanming Mou
  2024-01-03  4:00 ` [PATCH 2/2] app/test-crypto-perf: fix dst_mbuf " Suanming Mou
  2024-02-29 17:01 ` [EXT] [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Akhil Goyal
  2 siblings, 1 reply; 6+ messages in thread
From: Suanming Mou @ 2024-01-03  4:00 UTC (permalink / raw)
  To: ciara.power; +Cc: dev

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@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] app/test-crypto-perf: fix dst_mbuf size calculation
  2024-01-03  4:00 [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Suanming Mou
  2024-01-03  4:00 ` [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation Suanming Mou
@ 2024-01-03  4:00 ` Suanming Mou
  2024-02-29 17:01 ` [EXT] [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Akhil Goyal
  2 siblings, 0 replies; 6+ messages in thread
From: Suanming Mou @ 2024-01-03  4:00 UTC (permalink / raw)
  To: ciara.power; +Cc: dev

If crypto device requires headroom and tailroom, the mbuf
of dst in out-of-place should reserve the headroom and
tailroom as well, otherwise there will be no enough room
for dst mbuf.

Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
 app/test-crypto-perf/cperf_test_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 8faf832527..c773dd48df 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -229,7 +229,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,
 				(mbuf_size * segments_nb);
 		params.dst_buf_offset = *dst_buf_offset;
 		/* Destination buffer will be one segment only */
-		obj_size += max_size + sizeof(struct rte_mbuf);
+		obj_size += max_size + sizeof(struct rte_mbuf) +
+			options->headroom_sz + options->tailroom_sz;
 	}
 
 	*pool = rte_mempool_create_empty(pool_name,
-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation
  2024-01-03  4:00 ` [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation Suanming Mou
@ 2024-02-01 13:16   ` Suanming Mou
  0 siblings, 0 replies; 6+ messages in thread
From: Suanming Mou @ 2024-02-01 13:16 UTC (permalink / raw)
  To: ciara.power, anoobj; +Cc: dev

Hi,

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

> -----Original Message-----
> From: Suanming Mou <suanmingm@nvidia.com>
> Sent: Wednesday, January 3, 2024 12:00 PM
> To: ciara.power@intel.com
> Cc: dev@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@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [EXT] [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue
  2024-01-03  4:00 [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Suanming Mou
  2024-01-03  4:00 ` [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation Suanming Mou
  2024-01-03  4:00 ` [PATCH 2/2] app/test-crypto-perf: fix dst_mbuf " Suanming Mou
@ 2024-02-29 17:01 ` Akhil Goyal
  2024-02-29 17:03   ` Akhil Goyal
  2 siblings, 1 reply; 6+ messages in thread
From: Akhil Goyal @ 2024-02-29 17:01 UTC (permalink / raw)
  To: Suanming Mou, ciara.power; +Cc: dev

> This commit fixes the bugs in multi-segment size calculation.
> 
> Suanming Mou (2):
>   app/test-crypto-perf: fix copy segment size calculation
>   app/test-crypto-perf: fix dst_mbuf size calculation
> 
>  app/test-crypto-perf/cperf_test_common.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
Series Acked-by: Akhil Goyal <gakhil@marvell.com>
Applied to dpdk-next-crypto

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [EXT] [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue
  2024-02-29 17:01 ` [EXT] [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Akhil Goyal
@ 2024-02-29 17:03   ` Akhil Goyal
  0 siblings, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2024-02-29 17:03 UTC (permalink / raw)
  To: Suanming Mou, ciara.power; +Cc: dev, stable



> -----Original Message-----
> From: Akhil Goyal
> Sent: Thursday, February 29, 2024 10:31 PM
> To: Suanming Mou <suanmingm@nvidia.com>; ciara.power@intel.com
> Cc: dev@dpdk.org
> Subject: RE: [EXT] [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue
> 
> > This commit fixes the bugs in multi-segment size calculation.
> >
> > Suanming Mou (2):
> >   app/test-crypto-perf: fix copy segment size calculation
> >   app/test-crypto-perf: fix dst_mbuf size calculation
> >
> >  app/test-crypto-perf/cperf_test_common.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> Series Acked-by: Akhil Goyal <gakhil@marvell.com>
> Applied to dpdk-next-crypto

Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-29 17:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-03  4:00 [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Suanming Mou
2024-01-03  4:00 ` [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation Suanming Mou
2024-02-01 13:16   ` Suanming Mou
2024-01-03  4:00 ` [PATCH 2/2] app/test-crypto-perf: fix dst_mbuf " Suanming Mou
2024-02-29 17:01 ` [EXT] [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Akhil Goyal
2024-02-29 17:03   ` Akhil Goyal

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).