[78/83] app/test-mldev: move alignment attribute on types

Message ID 1710949096-5786-79-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded
Delegated to: David Marchand
Headers
Series move alignment attribute on types |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 20, 2024, 3:38 p.m. UTC
  Move location of __rte_aligned(a) to new conventional location. The new
placement between {struct,union} and the tag allows the desired
alignment to be imparted on the type regardless of the toolchain being
used for both C and C++. Additionally, it avoids confusion by Doxygen
when generating documentation.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 app/test-mldev/test_device_ops.h       | 4 ++--
 app/test-mldev/test_inference_common.h | 4 ++--
 app/test-mldev/test_model_ops.h        | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
  

Patch

diff --git a/app/test-mldev/test_device_ops.h b/app/test-mldev/test_device_ops.h
index be78b17..2e0173e 100644
--- a/app/test-mldev/test_device_ops.h
+++ b/app/test-mldev/test_device_ops.h
@@ -9,9 +9,9 @@ 
 
 #include "test_common.h"
 
-struct test_device {
+struct __rte_cache_aligned test_device {
 	/* common data */
 	struct test_common cmn;
-} __rte_cache_aligned;
+};
 
 #endif /* TEST_DEVICE_OPS_H */
diff --git a/app/test-mldev/test_inference_common.h b/app/test-mldev/test_inference_common.h
index 3f4ba32..1c9ad90 100644
--- a/app/test-mldev/test_inference_common.h
+++ b/app/test-mldev/test_inference_common.h
@@ -37,7 +37,7 @@  struct ml_core_args {
 	uint64_t end_cycles;
 };
 
-struct test_inference {
+struct __rte_cache_aligned test_inference {
 	/* common data */
 	struct test_common cmn;
 
@@ -59,7 +59,7 @@  struct test_inference {
 	struct rte_ml_dev_xstats_map *xstats_map;
 	uint64_t *xstats_values;
 	int xstats_size;
-} __rte_cache_aligned;
+};
 
 bool test_inference_cap_check(struct ml_options *opt);
 int test_inference_opt_check(struct ml_options *opt);
diff --git a/app/test-mldev/test_model_ops.h b/app/test-mldev/test_model_ops.h
index 19645a1..83bfd76 100644
--- a/app/test-mldev/test_model_ops.h
+++ b/app/test-mldev/test_model_ops.h
@@ -9,12 +9,12 @@ 
 
 #include "test_model_common.h"
 
-struct test_model_ops {
+struct __rte_cache_aligned test_model_ops {
 	/* common data */
 	struct test_common cmn;
 
 	/* test specific data */
 	struct ml_model model[ML_TEST_MAX_MODELS];
-} __rte_cache_aligned;
+};
 
 #endif /* TEST_MODEL_OPS_H */