l2fwd-crypto: align private data size to cache size
PATCH 1/1 l2fwd-crypto: align private data size to cache size
From: Gagandeep Singh <[email protected]>
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.
--- app/proc-info/main.c | 2 +- examples/l2fwd-crypto/main.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
app/proc-info/main.c +1 -1
@@ -1406,7 +1406,7 @@ main(int argc, char **argv)/* If no port mask was specified, then show non-owned ports */ if (enabled_port_mask ==0 ) { RTE_ETH_FOREACH_DEV(i) - enabled_port_mask =1ul << i; + enabled_port_mask |= 1ul << i; }for (i =0 ; i <RTE_MAX_ETHPORTS ; i++) {
examples/l2fwd-crypto/main.c +2 -1
@@ -2711,7 +2711,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" );
Signature · 1 line
2.17.1
PATCH 1/1 l2fwd-crypto: align private data size to cache size
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.
--- app/proc-info/main.c | 2 +- examples/l2fwd-crypto/main.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
I believe proc-info change is added by mistake in this patch. Please fix this.
PATCH v2 1/1 l2fwd-crypto: align private data size to cache size
In reply to Hemant AgrawalFrom: Gagandeep Singh <[email protected]>
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.
--- examples/l2fwd-crypto/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
examples/l2fwd-crypto/main.c +2 -1
@@ -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" );
Signature · 1 line
2.17.1
Quoted 8 lines
From: Gagandeep Singh <[email protected]>
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 <[email protected]>---
Applied to dpdk-next-crypto
Thanks.