From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 419CD45D3C; Tue, 19 Nov 2024 05:36:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61B2F4270A; Tue, 19 Nov 2024 05:36:23 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 308A7402BC for ; Tue, 19 Nov 2024 05:36:16 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D488C20DF166; Mon, 18 Nov 2024 20:36:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D488C20DF166 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731990974; bh=ciI5ElPgJxFMfCSGL8bYS4Lzls9t7fRHy/puGoc+mPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gYVmrsC1gAeTuKXxOMysnS9ZzOXIYOkrS398Ur33vayzPJSNu5ql6T1cL4n5NQhCO znLLVMJdqop/ob10w9e62PzdHjcc1yk0TkAcnac5nL+fjGB9ahXXCMg2AUmERZfsEj VNZ4Q+lGt6I4lSQ8toBphyc9GuoMtt9Aq0BdsklM= From: Andre Muezerie 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 09/16] net/iavf: pack structures when building with MSVC Date: Mon, 18 Nov 2024 20:35:34 -0800 Message-Id: <1731990941-10001-10-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Tyler Retzlaff Add __rte_msvc_pack 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 --- drivers/net/iavf/iavf_ipsec_crypto.h | 4 +++- drivers/net/iavf/iavf_rxtx.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_ipsec_crypto.h b/drivers/net/iavf/iavf_ipsec_crypto.h index 49f9202aca..0637ce21d6 100644 --- a/drivers/net/iavf/iavf_ipsec_crypto.h +++ b/drivers/net/iavf/iavf_ipsec_crypto.h @@ -11,12 +11,14 @@ +__rte_msvc_pack struct iavf_tx_ipsec_desc { union { struct { __le64 qw0; __le64 qw1; }; + __rte_msvc_pack struct { __le16 l4payload_length; __le32 esn; @@ -97,7 +99,7 @@ struct iavf_ipsec_crypto_pkt_metadata { uint8_t next_proto; /* Next Protocol (8b/1B) */ uint32_t esn; /* Extended Sequence Number (32b/4B) */ -} __rte_packed; +}; /** * Inline IPsec Crypto offload is supported diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 4850b9e381..7efbee7c3e 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -53,7 +53,7 @@ static uint16_t geneve_udp_port = RTE_GENEVE_DEFAULT_PORT; struct simple_gre_hdr { uint16_t flags; uint16_t proto; -} __rte_packed; +}; /* structure that caches offload info for the current packet */ struct offload_info { -- 2.47.0.vfs.0.3