[v2,13/15] app/testpmd: pack structures when building with MSVC

Message ID 1711580958-20808-14-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series fix packing of structs when building with MSVC |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 27, 2024, 11:09 p.m. UTC
  Add __rte_msvc_pushpack(1) to all __rte_packed structs to cause packing
when building with MSVC.

Remove __rte_packed where it appears natural alignment without
packing would produce the same layout or the struct is internal.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 app/test-pmd/csumonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6711dda..f24c381 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -92,7 +92,7 @@  struct testpmd_offload_info {
 struct simple_gre_hdr {
 	uint16_t flags;
 	uint16_t proto;
-} __rte_packed;
+};
 
 static uint16_t
 get_udptcp_checksum(struct rte_mbuf *m, void *l3_hdr, uint16_t l4_off,