[v2,10/15] net/ice: pack structures when building with MSVC

Message ID 1711580958-20808-11-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded
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.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/net/ice/base/ice_osdep.h | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index 0e14b93..087dc6a 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -187,6 +187,7 @@ 
 #define BITS_PER_BYTE       8
 
 /* memory allocation tracking */
+__rte_msvc_pack
 struct ice_dma_mem {
 	void *va;
 	u64 pa;
@@ -194,6 +195,7 @@  struct ice_dma_mem {
 	const void *zone;
 } __rte_packed;
 
+__rte_msvc_pack
 struct ice_virt_mem {
 	void *va;
 	u32 size;