[30/83] net/softnic: move alignment attribute on types

Message ID 1710949096-5786-31-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:37 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>
---
 drivers/net/softnic/rte_eth_softnic_internals.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h
index a1c2309..d3975da 100644
--- a/drivers/net/softnic/rte_eth_softnic_internals.h
+++ b/drivers/net/softnic/rte_eth_softnic_internals.h
@@ -123,7 +123,7 @@  struct softnic_thread {
 /**
  * Data plane threads: context
  */
-struct softnic_thread_data {
+struct __rte_cache_aligned softnic_thread_data {
 	struct rte_swx_pipeline *p[THREAD_PIPELINES_MAX];
 	uint32_t n_pipelines;
 
@@ -132,7 +132,7 @@  struct softnic_thread_data {
 	uint64_t timer_period; /* Measured in CPU cycles. */
 	uint64_t time_next;
 	uint64_t iter;
-} __rte_cache_aligned;
+};
 
 /**
  * PMD Internals