From 6e90229e22e6906b90c82c0c137f68d9c2968bf5 Mon Sep 17 00:00:00 2001 From: Rebecca Troy Date: Mon, 5 Jul 2021 11:50:30 +0000 Subject: [PATCH] test/crypto: use formal array size macro 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 Acked-by: Akhil Goyal --- 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 2fa720d7b2..31201d93e1 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 = @@ -8737,7 +8733,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]; @@ -8779,7 +8775,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.20.1