DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] l2fwd-crypto: align private data size to cache size
@ 2021-02-23  6:13 Hemant Agrawal
  2021-04-05 18:52 ` Akhil Goyal
  2021-04-09 12:56 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
  0 siblings, 2 replies; 4+ messages in thread
From: Hemant Agrawal @ 2021-02-23  6:13 UTC (permalink / raw)
  To: dev, declan.doherty; +Cc: Gagandeep Singh

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>
---
 app/proc-info/main.c         | 2 +-
 examples/l2fwd-crypto/main.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index b9587f7de..2ca685f86 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -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++) {
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 656b14036..23a398043 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -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");
-- 
2.17.1


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

* [dpdk-dev] [PATCH] l2fwd-crypto: align private data size to cache size
  2021-02-23  6:13 [dpdk-dev] [PATCH] l2fwd-crypto: align private data size to cache size Hemant Agrawal
@ 2021-04-05 18:52 ` Akhil Goyal
  2021-04-09 12:56 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
  1 sibling, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2021-04-05 18:52 UTC (permalink / raw)
  To: hemant.agrawal; +Cc: declan.doherty, dev, g.singh, gakhil

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



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

* [dpdk-dev] [PATCH v2] l2fwd-crypto: align private data size to cache size
  2021-02-23  6:13 [dpdk-dev] [PATCH] l2fwd-crypto: align private data size to cache size Hemant Agrawal
  2021-04-05 18:52 ` Akhil Goyal
@ 2021-04-09 12:56 ` Hemant Agrawal
  2021-04-13 13:00   ` [dpdk-dev] [EXT] " Akhil Goyal
  1 sibling, 1 reply; 4+ messages in thread
From: Hemant Agrawal @ 2021-04-09 12:56 UTC (permalink / raw)
  To: dev, gakhil; +Cc: Gagandeep Singh

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

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");
-- 
2.17.1


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

* Re: [dpdk-dev] [EXT] [PATCH v2] l2fwd-crypto: align private data size to cache size
  2021-04-09 12:56 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
@ 2021-04-13 13:00   ` Akhil Goyal
  0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2021-04-13 13:00 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: Gagandeep Singh

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

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

end of thread, other threads:[~2021-04-13 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23  6:13 [dpdk-dev] [PATCH] l2fwd-crypto: align private data size to cache size Hemant Agrawal
2021-04-05 18:52 ` Akhil Goyal
2021-04-09 12:56 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2021-04-13 13:00   ` [dpdk-dev] [EXT] " 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).