Skip to contentSkip to conversation

cperf: fix crypto perf out-of-place mempool alloc

PATCH Superseded Kai Ji 5 participants 7 messages May 20, 2021 – Jun 29, 2021

lore
Share & tools
lore

Kai Ji

author
#0 lore raw

PATCH 1/1 cperf: fix crypto perf out-of-place mempool alloc

Add in missing rte_mbuf size in mempool allocation for out-of-place op.

Fixes bf9d6702eca9 ("app/crypto-perf: use single mempool")
---
 app/test-crypto-perf/cperf_test_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-crypto-perf/cperf_test_common.c +1 -1
index 058e0ba564..12925c7f22 100644
@@ -194,7 +194,7 @@ 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;
+		obj_size += max_size + sizeof(struct rte_mbuf);
 	}
 
 	*pool = rte_mempool_create_empty(pool_name,
Signature · 13 lines
2.17.1

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
Acked-by on v1 1/1
#1 lore raw
Quoted 32 lines

-----Original Message-----
From: Ji, Kai <[email protected]>
Sent: Thursday, May 20, 2021 4:07 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Ji, Kai <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Subject: [dpdk-dev v1] cperf: fix crypto perf out-of-place mempool alloc

Add in missing rte_mbuf size in mempool allocation for out-of-place op.

Fixes bf9d6702eca9 ("app/crypto-perf: use single mempool")
---
 app/test-crypto-perf/cperf_test_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-crypto- renamed from app/test-crypto-perf/cperf_test_common.c +0 -0

perf/cperf_test_common.c
index 058e0ba564..12925c7f22 100644

app/test-crypto-perf/cperf_test_common.c +1 -1
@@ -194,7 +194,7 @@ 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;
+		obj_size += max_size + sizeof(struct rte_mbuf);
 	}
 
Quoted 3 lines

*pool = rte_mempool_create_empty(pool_name,
--
2.17.1

#2 lore raw
Quoted 43 lines

-----Original Message-----
From: Zhang, Roy Fan <[email protected]>
Sent: Friday, May 21, 2021 10:05 AM
To: Ji, Kai <[email protected]>; [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>
Subject: RE: [dpdk-dev v1] cperf: fix crypto perf out-of-place mempool alloc

Quoted 34 lines

-----Original Message-----
From: Ji, Kai <[email protected]>
Sent: Thursday, May 20, 2021 4:07 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Ji, Kai <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Subject: [dpdk-dev v1] cperf: fix crypto perf out-of-place mempool alloc

Add in missing rte_mbuf size in mempool allocation for out-of-place op.

Fixes bf9d6702eca9 ("app/crypto-perf: use single mempool")
---
 app/test-crypto-perf/cperf_test_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/app/test-crypto- perf/cperf_test_common.c index
058e0ba564..12925c7f22 100644

app/test-crypto-perf/cperf_test_common.c +1 -1
@@ -194,7 +194,7 @@ 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;
+		obj_size += max_size + sizeof(struct rte_mbuf);
 	}
 
Quoted 5 lines
Quoted 3 lines

*pool = rte_mempool_create_empty(pool_name,
--
2.17.1

#3 lore raw
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines

Add in missing rte_mbuf size in mempool allocation for out-of-place op.

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

Given the root cause is 3 years old, it is probably not urgent enough to be merged in the last day of 21.05.
I won't take any risk at this stage.

#4 lore raw

Hi Thomas,

Sure, no problem. Thanks.
Congrats on 21.05 release!

Regards,
Fan

Quoted 22 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, May 21, 2021 4:37 PM
To: Zhang, Roy Fan <[email protected]>; Ji, Kai <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v1] cperf: fix crypto perf out-of-place mempool alloc

Quoted 8 lines
Quoted 7 lines
Quoted 6 lines

Add in missing rte_mbuf size in mempool allocation for out-of-place op.

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

Given the root cause is 3 years old, it is probably not urgent enough to be merged in the last day of 21.05.
I won't take any risk at this stage.

author
#5 lore raw

PATCH v2 1/1 test/crypto-perf: fix crypto perf out-of-place mempool alloc

In reply to Kai Ji

Add in missing rte_mbuf size in mempool allocation for out-of-place op.

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

---
v2:
-- commit message update

app/test-crypto-perf/cperf_test_common.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-crypto-perf/cperf_test_common.c +1 -1
index 058e0ba564..12925c7f22 100644
@@ -194,7 +194,7 @@ 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;
+		obj_size += max_size + sizeof(struct rte_mbuf);
 	}
 
 	*pool = rte_mempool_create_empty(pool_name,
Signature · 1 line
2.17.1
Applied
#6 lore raw

Re: [dpdk-dev] [EXT] [dpdk-dev v2] test/crypto-perf: fix crypto perf out-of-place mempool alloc

Quoted 11 lines

Add in missing rte_mbuf size in mempool allocation for out-of-place op.

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

---
v2:
-- commit message update

Applied to dpdk-next-crypto

Thanks.