[31/83] net/tap: move alignment attribute on types

Message ID 1710949096-5786-32-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/tap/tap_bpf.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/tap/tap_bpf.h b/drivers/net/tap/tap_bpf.h
index 0d38bc1..d843792 100644
--- a/drivers/net/tap/tap_bpf.h
+++ b/drivers/net/tap/tap_bpf.h
@@ -50,7 +50,7 @@  enum bpf_map_type {
 };
 
 /* union of anonymous structs used with TAP BPF commands */
-union bpf_attr {
+union __rte_aligned(8) bpf_attr {
 	/* BPF_MAP_CREATE command */
 	struct {
 		__u32	map_type;
@@ -84,7 +84,7 @@  enum bpf_map_type {
 		__u32		kern_version;
 		__u32		prog_flags;
 	};
-} __rte_aligned(8);
+};
 
 #ifndef __NR_bpf
 # if defined(__i386__)