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 BDA3F43E80; Tue, 16 Apr 2024 02:05:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA42540A81; Tue, 16 Apr 2024 02:05:23 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BFBFE40647 for ; Tue, 16 Apr 2024 02:05:15 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 15E4520FD43F; Mon, 15 Apr 2024 17:05:14 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 15E4520FD43F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1713225915; bh=6vAZIqm95iFE8Dig4Bc4UzirlaLEgn+OiNgyHbGfsyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CaA5XXfCvnOLsvrsf2Kz6jh5PPAPFkC51UEB1pYcxL1uue95CpDQFoCx+TICeSEhU J/DlCJXKLnKcJTKXrwhMd0mRIUNwYp9ierw1DMMLKL1jipPXwTuRp1ktmrL/eUV4jT LFb/Lt4X6B2QJCrObhvggCNyUglfM7F1DYcsjrTY= From: Tyler Retzlaff To: dev@dpdk.org Cc: Akhil Goyal , Aman Singh , Anatoly Burakov , Bruce Richardson , Byron Marohn , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Jerin Jacob , Jingjing Wu , Kirill Rybalchenko , Konstantin Ananyev , Matan Azrad , Ori Kam , Radu Nicolau , Ruifeng Wang , Sameh Gobriel , Sivaprasad Tummala , Suanming Mou , Sunil Kumar Kori , Vamsi Attunuru , Viacheslav Ovsiienko , Vladimir Medvedkin , Yipeng Wang , Yuying Zhang , Yuying Zhang , Tyler Retzlaff Subject: [PATCH v4 04/16] common/iavf: pack structures when building with MSVC Date: Mon, 15 Apr 2024 17:05:01 -0700 Message-Id: <1713225913-20792-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1713225913-20792-1-git-send-email-roretzla@linux.microsoft.com> References: <1710968771-16435-1-git-send-email-roretzla@linux.microsoft.com> <1713225913-20792-1-git-send-email-roretzla@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 Add __rte_msvc_pack to all __rte_packed structs to cause packing when building with MSVC. Signed-off-by: Tyler Retzlaff --- drivers/common/iavf/iavf_osdep.h | 2 ++ drivers/common/iavf/virtchnl_inline_ipsec.h | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/drivers/common/iavf/iavf_osdep.h b/drivers/common/iavf/iavf_osdep.h index 263d924..1fb057c 100644 --- a/drivers/common/iavf/iavf_osdep.h +++ b/drivers/common/iavf/iavf_osdep.h @@ -158,6 +158,7 @@ } while (0) /* memory allocation tracking */ +__rte_msvc_pack struct iavf_dma_mem { void *va; u64 pa; @@ -165,6 +166,7 @@ struct iavf_dma_mem { const void *zone; } __rte_packed; +__rte_msvc_pack struct iavf_virt_mem { void *va; u32 size; diff --git a/drivers/common/iavf/virtchnl_inline_ipsec.h b/drivers/common/iavf/virtchnl_inline_ipsec.h index 2f4bf15..feb0f44 100644 --- a/drivers/common/iavf/virtchnl_inline_ipsec.h +++ b/drivers/common/iavf/virtchnl_inline_ipsec.h @@ -109,6 +109,7 @@ enum inline_ipsec_ops { }; /* Not all valid, if certain field is invalid, set 1 for all bits */ +__rte_msvc_pack struct virtchnl_algo_cap { u32 algo_type; @@ -132,6 +133,7 @@ struct virtchnl_algo_cap { } __rte_packed; /* vf record the capability of crypto from the virtchnl */ +__rte_msvc_pack struct virtchnl_sym_crypto_cap { u8 crypto_type; u8 algo_cap_num; @@ -142,6 +144,7 @@ struct virtchnl_sym_crypto_cap { * VF pass virtchnl_ipsec_cap to PF * and PF return capability of ipsec from virtchnl. */ +__rte_msvc_pack struct virtchnl_ipsec_cap { /* max number of SA per VF */ u16 max_sa_num; @@ -172,6 +175,7 @@ struct virtchnl_ipsec_cap { } __rte_packed; /* configuration of crypto function */ +__rte_msvc_pack struct virtchnl_ipsec_crypto_cfg_item { u8 crypto_type; @@ -203,6 +207,7 @@ struct virtchnl_ipsec_sym_crypto_cfg { * PF create SA as configuration and PF driver will return * an unique index (sa_idx) for the created SA. */ +__rte_msvc_pack struct virtchnl_ipsec_sa_cfg { /* IPsec SA Protocol - AH/ESP */ u8 virtchnl_protocol_type; @@ -298,6 +303,7 @@ struct virtchnl_ipsec_sa_cfg { * VF send configuration of index of SA to PF * PF will update SA according to configuration */ +__rte_msvc_pack struct virtchnl_ipsec_sa_update { u32 sa_index; /* SA to update */ u32 esn_hi; /* high 32 bits of esn */ @@ -310,6 +316,7 @@ struct virtchnl_ipsec_sa_update { * flag bitmap indicate all SA or just selected SA will * be destroyed */ +__rte_msvc_pack struct virtchnl_ipsec_sa_destroy { /* All zero bitmap indicates all SA will be destroyed. * Non-zero bitmap indicates the selected SA in @@ -325,6 +332,7 @@ struct virtchnl_ipsec_sa_destroy { * VF send this SA configuration to PF using virtchnl; * PF read SA and will return configuration for the created SA. */ +__rte_msvc_pack struct virtchnl_ipsec_sa_read { /* SA valid - invalid/valid */ u8 valid; @@ -431,6 +439,7 @@ struct virtchnl_ipsec_sa_read { #define VIRTCHNL_IPSEC_INBOUND_SPD_TBL_IPV6 (1) /* Add allowlist entry in IES */ +__rte_msvc_pack struct virtchnl_ipsec_sp_cfg { u32 spi; u32 dip[4]; @@ -459,6 +468,7 @@ struct virtchnl_ipsec_sp_cfg { /* Delete allowlist entry in IES */ +__rte_msvc_pack struct virtchnl_ipsec_sp_destroy { /* 0 for IPv4 table, 1 for IPv6 table. */ u8 table_id; @@ -494,6 +504,7 @@ struct virtchnl_ipsec_resp { }; /* Internal message descriptor for VF <-> IPsec communication */ +__rte_msvc_pack struct inline_ipsec_msg { u16 ipsec_opcode; u16 req_id; -- 1.8.3.1