DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/crypto: use formal array size macro
@ 2021-07-05 11:50 Rebecca Troy
  2021-07-06 12:18 ` [dpdk-dev] [EXT] " Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Rebecca Troy @ 2021-07-05 11:50 UTC (permalink / raw)
  To: dev; +Cc: ciara.power, Rebecca Troy, Declan Doherty

Replaces the use of local ARRAY_SIZE macro, which is not used
anywhere else, with the formal RTE_DIM macro for better
consistency in crypto unit test.

Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
---
 app/test/test_cryptodev.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 39db52b17a..b5ac5b048a 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -61,10 +61,6 @@
 #define IN_PLACE 0
 #define OUT_OF_PLACE 1
 
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#endif
-
 static int gbl_driver_id;
 
 static enum rte_security_session_action_type gbl_action_type =
@@ -8736,7 +8732,7 @@ test_PDCP_SDAP_PROTO_encap_all(void)
 	int err, all_err = TEST_SUCCESS;
 	const struct pdcp_sdap_test *cur_test;
 
-	size = ARRAY_SIZE(list_pdcp_sdap_tests);
+	size = RTE_DIM(list_pdcp_sdap_tests);
 
 	for (i = 0; i < size; i++) {
 		cur_test = &list_pdcp_sdap_tests[i];
@@ -8778,7 +8774,7 @@ test_PDCP_SDAP_PROTO_decap_all(void)
 	int err, all_err = TEST_SUCCESS;
 	const struct pdcp_sdap_test *cur_test;
 
-	size = ARRAY_SIZE(list_pdcp_sdap_tests);
+	size = RTE_DIM(list_pdcp_sdap_tests);
 
 	for (i = 0; i < size; i++) {
 		cur_test = &list_pdcp_sdap_tests[i];
-- 
2.25.1


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

* Re: [dpdk-dev] [EXT] [PATCH] test/crypto: use formal array size macro
  2021-07-05 11:50 [dpdk-dev] [PATCH] test/crypto: use formal array size macro Rebecca Troy
@ 2021-07-06 12:18 ` Akhil Goyal
  2021-07-07 14:40   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Akhil Goyal @ 2021-07-06 12:18 UTC (permalink / raw)
  To: Rebecca Troy, dev; +Cc: ciara.power, Declan Doherty, g.singh

> Replaces the use of local ARRAY_SIZE macro, which is not used
> anywhere else, with the formal RTE_DIM macro for better
> consistency in crypto unit test.
> 
> Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
> ---
Acked-by: Akhil Goyal <gakhil@marvell.com>

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

* Re: [dpdk-dev] [EXT] [PATCH] test/crypto: use formal array size macro
  2021-07-06 12:18 ` [dpdk-dev] [EXT] " Akhil Goyal
@ 2021-07-07 14:40   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2021-07-07 14:40 UTC (permalink / raw)
  To: Akhil Goyal, Rebecca Troy, dev; +Cc: ciara.power, Declan Doherty, g.singh

> 
> > Replaces the use of local ARRAY_SIZE macro, which is not used
> > anywhere else, with the formal RTE_DIM macro for better
> > consistency in crypto unit test.
> >
> > Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
> > ---
> Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2021-07-07 14:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 11:50 [dpdk-dev] [PATCH] test/crypto: use formal array size macro Rebecca Troy
2021-07-06 12:18 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-07-07 14:40   ` 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).