diff mbox series

[v2] l2fwd-crypto: align private data size to cache size

Message ID 20210409125621.24921-1-hemant.agrawal@nxp.com (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers show
Series [v2] l2fwd-crypto: align private data size to cache size | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/checkpatch success coding style OK

Commit Message

Hemant Agrawal April 9, 2021, 12:56 p.m. UTC
From: Gagandeep Singh <g.singh@nxp.com>

L2fwd-crypto is passing 24b private data size while packet
pool creation. This patch aligns that private data size
to cache line size for better performance results.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 examples/l2fwd-crypto/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Akhil Goyal April 13, 2021, 1 p.m. UTC | #1
> From: Gagandeep Singh <g.singh@nxp.com>
> 
> L2fwd-crypto is passing 24b private data size while packet
> pool creation. This patch aligns that private data size
> to cache line size for better performance results.
> 
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---
Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.
diff mbox series

Patch

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index a96cb94cc4..0ee3e1470a 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2691,7 +2691,8 @@  main(int argc, char **argv)
 
 	/* create the mbuf pool */
 	l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 512,
-			sizeof(struct rte_crypto_op),
+			RTE_ALIGN(sizeof(struct rte_crypto_op),
+				RTE_CACHE_LINE_SIZE),
 			RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
 	if (l2fwd_pktmbuf_pool == NULL)
 		rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");