DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Akhil Goyal <gakhil@marvell.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Byron Marohn <byron.marohn@intel.com>,
	Conor Walsh <conor.walsh@intel.com>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	Dariusz Sosnowski <dsosnowski@nvidia.com>,
	David Hunt <david.hunt@intel.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Kirill Rybalchenko <kirill.rybalchenko@intel.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	Matan Azrad <matan@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Radu Nicolau <radu.nicolau@intel.com>,
	Ruifeng Wang <ruifeng.wang@arm.com>,
	Sameh Gobriel <sameh.gobriel@intel.com>,
	Sivaprasad Tummala <sivaprasad.tummala@amd.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Vamsi Attunuru <vattunuru@marvell.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Yipeng Wang <yipeng1.wang@intel.com>,
	Yuying Zhang <Yuying.Zhang@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v2 04/15] common/iavf: pack structures when building with MSVC
Date: Wed, 27 Mar 2024 16:09:07 -0700	[thread overview]
Message-ID: <1711580958-20808-5-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1711580958-20808-1-git-send-email-roretzla@linux.microsoft.com>

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/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


  parent reply	other threads:[~2024-03-27 23:09 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 21:05 [PATCH 00/15] fix packing of structs " Tyler Retzlaff
2024-03-20 21:05 ` [PATCH 01/15] eal: provide pack start macro for MSVC Tyler Retzlaff
2024-03-20 21:05 ` [PATCH 02/15] eal: pack structures when building with MSVC Tyler Retzlaff
2024-03-21 16:02   ` Bruce Richardson
2024-03-20 21:05 ` [PATCH 03/15] net: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 04/15] common/iavf: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 05/15] common/idpf: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 06/15] common/mlx5: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 07/15] dma/ioat: " Tyler Retzlaff
2024-03-21 16:13   ` Bruce Richardson
2024-03-27 22:51     ` Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 08/15] net/i40e: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 09/15] net/iavf: " Tyler Retzlaff
2024-03-21 16:26   ` Bruce Richardson
2024-03-20 21:06 ` [PATCH 10/15] net/ice: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 11/15] net/mlx5: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 12/15] net/octeon_ep: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 13/15] app/testpmd: " Tyler Retzlaff
2024-03-21 16:28   ` Bruce Richardson
2024-03-20 21:06 ` [PATCH 14/15] app/test: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 15/15] examples: " Tyler Retzlaff
2024-03-21 16:31   ` Bruce Richardson
2024-03-21 15:32 ` [PATCH 00/15] fix packing of structs " Stephen Hemminger
2024-03-21 15:46   ` Tyler Retzlaff
2024-03-27 23:09 ` [PATCH v2 " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 01/15] eal: provide pack start macro for MSVC Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 02/15] eal: pack structures when building with MSVC Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 03/15] net: " Tyler Retzlaff
2024-03-27 23:09   ` Tyler Retzlaff [this message]
2024-03-27 23:09   ` [PATCH v2 05/15] common/idpf: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 06/15] common/mlx5: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 07/15] dma/ioat: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 08/15] net/i40e: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 09/15] net/iavf: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 10/15] net/ice: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 11/15] net/mlx5: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 12/15] net/octeon_ep: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 13/15] app/testpmd: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 14/15] app/test: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 15/15] examples: " Tyler Retzlaff
2024-04-15 23:51 ` [PATCH v3 00/16] fix packing of structs " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 01/16] eal: provide pack start macro for MSVC Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 02/16] eal: pack structures when building with MSVC Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 03/16] net: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 04/16] common/iavf: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 05/16] common/idpf: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 06/16] common/mlx5: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 07/16] dma/ioat: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 08/16] net/i40e: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 09/16] net/iavf: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 10/16] net/ice: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 11/16] net/mlx5: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 12/16] net/octeon_ep: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 13/16] app/testpmd: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 14/16] app/test: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 15/16] examples: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 16/16] crypto/mlx5: " Tyler Retzlaff
2024-04-16  0:04 ` [PATCH v4 00/16] fix packing of structs " Tyler Retzlaff
2024-04-16  0:04   ` [PATCH v4 01/16] eal: provide pack start macro for MSVC Tyler Retzlaff
2024-04-16  0:04   ` [PATCH v4 02/16] eal: pack structures when building with MSVC Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 03/16] net: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 04/16] common/iavf: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 05/16] common/idpf: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 06/16] common/mlx5: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 07/16] dma/ioat: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 08/16] net/i40e: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 09/16] net/iavf: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 10/16] net/ice: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 11/16] net/mlx5: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 12/16] net/octeon_ep: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 13/16] app/testpmd: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 14/16] app/test: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 15/16] examples: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 16/16] crypto/mlx5: " Tyler Retzlaff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1711580958-20808-5-git-send-email-roretzla@linux.microsoft.com \
    --to=roretzla@linux.microsoft.com \
    --cc=Yuying.Zhang@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=byron.marohn@intel.com \
    --cc=conor.walsh@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=jingjing.wu@intel.com \
    --cc=kirill.rybalchenko@intel.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=radu.nicolau@intel.com \
    --cc=ruifeng.wang@arm.com \
    --cc=sameh.gobriel@intel.com \
    --cc=sivaprasad.tummala@amd.com \
    --cc=skori@marvell.com \
    --cc=suanmingm@nvidia.com \
    --cc=vattunuru@marvell.com \
    --cc=viacheslavo@nvidia.com \
    --cc=vladimir.medvedkin@intel.com \
    --cc=yipeng1.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).