[v4,08/16] net/i40e: pack structures when building with MSVC

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


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff April 16, 2024, 12:05 a.m. UTC
  Add __rte_msvc_pack to all __rte_packed structs to cause packing
when building with MSVC.

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


diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index aa5dc61..28439e3 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -177,6 +177,7 @@  static inline uint64_t i40e_read64_addr(volatile void *addr)
 #define ARRAY_SIZE(arr) RTE_DIM(arr)
 /* memory allocation tracking */
 struct i40e_dma_mem {
 	void *va;
 	u64 pa;
@@ -188,6 +189,7 @@  struct i40e_dma_mem {
 			i40e_allocate_dma_mem_d(h, m, s, a)
 #define i40e_free_dma_mem(h, m) i40e_free_dma_mem_d(h, m)
 struct i40e_virt_mem {
 	void *va;
 	u32 size;