From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id CC4B745D3C;
	Tue, 19 Nov 2024 05:37:06 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 9059D42790;
	Tue, 19 Nov 2024 05:36:25 +0100 (CET)
Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
 by mails.dpdk.org (Postfix) with ESMTP id 44A75406B8
 for <dev@dpdk.org>; Tue, 19 Nov 2024 05:36:16 +0100 (CET)
Received: by linux.microsoft.com (Postfix, from userid 1213)
 id C64F020DF163; Mon, 18 Nov 2024 20:36:14 -0800 (PST)
DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C64F020DF163
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
 s=default; t=1731990974;
 bh=dQPjvHxi1lC1qRlQxCVfJVgHDT6OYoD3CeK3g6olB9Y=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=i18gcFPYdVdmJ8/BqQIQVq5dCuB3PFHynJtlFKvp6kEeE1t7PAJC2au9OJkbd8W9U
 Oc8hQuTja39jsjGIrzAqWAKoJeo1+mmR7vrvbw349Ro1qaUOeEtn+WpjkGFIqafrlk
 jBL6RkMt9SePJAPL2aMygism0D/ky3ty/lz2I8g4=
From: Andre Muezerie <andremue@linux.microsoft.com>
To: roretzla@linux.microsoft.com
Cc: Yuying.Zhang@intel.com, aman.deep.singh@intel.com,
 anatoly.burakov@intel.com, bruce.richardson@intel.com,
 byron.marohn@intel.com, conor.walsh@intel.com,
 cristian.dumitrescu@intel.com, david.hunt@intel.com, dev@dpdk.org,
 dsosnowski@nvidia.com, gakhil@marvell.com, jerinj@marvell.com,
 jingjing.wu@intel.com, kirill.rybalchenko@intel.com,
 konstantin.v.ananyev@yandex.ru, matan@nvidia.com, orika@nvidia.com,
 radu.nicolau@intel.com, ruifeng.wang@arm.com, sameh.gobriel@intel.com,
 sivaprasad.tummala@amd.com, skori@marvell.com, stephen@networkplumber.org,
 suanmingm@nvidia.com, vattunuru@marvell.com, viacheslavo@nvidia.com,
 vladimir.medvedkin@intel.com, yipeng1.wang@intel.com
Subject: [PATCH v5 08/16] net/i40e: pack structures when building with MSVC
Date: Mon, 18 Nov 2024 20:35:33 -0800
Message-Id: <1731990941-10001-9-git-send-email-andremue@linux.microsoft.com>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1731990941-10001-1-git-send-email-andremue@linux.microsoft.com>
References: <1710968771-16435-1-git-send-email-roretzla@linux.microsoft.com>
 <1731990941-10001-1-git-send-email-andremue@linux.microsoft.com>
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

From: Tyler Retzlaff <roretzla@linux.microsoft.com>

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 8960206d8b..af8756b7d8 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 */
+__rte_msvc_pack
 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)
 
+__rte_msvc_pack
 struct i40e_virt_mem {
 	void *va;
 	u32 size;
-- 
2.47.0.vfs.0.3