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 11/16] net/mlx5: pack structures when building with MSVC
Date: Mon, 18 Nov 2024 20:35:36 -0800 [thread overview]
Message-ID: <1731990941-10001-12-git-send-email-andremue@linux.microsoft.com> (raw)
In-Reply-To: <1731990941-10001-1-git-send-email-andremue@linux.microsoft.com>
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/mlx5/hws/mlx5dr.h | 1 +
drivers/net/mlx5/mlx5.h | 1 +
drivers/net/mlx5/mlx5_flow.h | 4 ++++
drivers/net/mlx5/mlx5_hws_cnt.h | 1 +
drivers/net/mlx5/mlx5_utils.h | 4 ++++
5 files changed, 11 insertions(+)
diff --git a/drivers/net/mlx5/hws/mlx5dr.h b/drivers/net/mlx5/hws/mlx5dr.h
index 3668ab9fcf..6539af27bb 100644
--- a/drivers/net/mlx5/hws/mlx5dr.h
+++ b/drivers/net/mlx5/hws/mlx5dr.h
@@ -328,6 +328,7 @@ union mlx5dr_crc_encap_entropy_hash_ip_field {
};
};
+__rte_msvc_pack
struct mlx5dr_crc_encap_entropy_hash_fields {
union mlx5dr_crc_encap_entropy_hash_ip_field dst;
union mlx5dr_crc_encap_entropy_hash_ip_field src;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 89d277b523..1ca52bfe69 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -235,6 +235,7 @@ mlx5_is_probed_port_on_mpesw_device(struct mlx5_dev_spawn_data *spawn)
}
/** Data associated with socket messages. */
+__rte_msvc_pack
struct mlx5_flow_dump_req {
uint32_t port_id; /**< There are plans in DPDK to extend port_id. */
uint64_t flow_id;
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index bcc2782460..4d40866539 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -673,6 +673,7 @@ struct mlx5_flow_dv_tag_resource {
};
/* Modify resource structure */
+__rte_msvc_pack
struct mlx5_flow_dv_modify_hdr_resource {
struct mlx5_list_entry entry;
void *action; /**< Modify header action object. */
@@ -831,6 +832,7 @@ struct mlx5_flow_dv_dest_array_resource {
/** Device flow handle structure for DV mode only. */
+__rte_msvc_pack
struct mlx5_flow_handle_dv {
/* Flow DV api: */
struct mlx5_flow_dv_matcher *matcher; /**< Cache to matcher. */
@@ -849,6 +851,7 @@ struct mlx5_flow_handle_dv {
} __rte_packed;
/** Device flow handle structure: used both for creating & destroying. */
+__rte_msvc_pack
struct mlx5_flow_handle {
SILIST_ENTRY(uint32_t)next;
struct mlx5_vf_vlan vf_vlan; /**< Structure for VF VLAN workaround. */
@@ -1250,6 +1253,7 @@ struct mlx5_flow_attr {
};
/* Flow structure. */
+__rte_msvc_pack
struct rte_flow {
uint32_t dev_handles;
/**< Device flow handles that are part of the flow. */
diff --git a/drivers/net/mlx5/mlx5_hws_cnt.h b/drivers/net/mlx5/mlx5_hws_cnt.h
index d8da9dfcdd..7479da7c5e 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.h
+++ b/drivers/net/mlx5/mlx5_hws_cnt.h
@@ -133,6 +133,7 @@ enum {
};
/* HWS counter age parameter. */
+__rte_msvc_pack
struct __rte_cache_aligned mlx5_hws_age_param {
RTE_ATOMIC(uint32_t) timeout; /* Aging timeout in seconds (atomically accessed). */
RTE_ATOMIC(uint32_t) sec_since_last_hit;
diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h
index f933daf03c..081678fa43 100644
--- a/drivers/net/mlx5/mlx5_utils.h
+++ b/drivers/net/mlx5/mlx5_utils.h
@@ -115,6 +115,7 @@ struct mlx5_l3t_level_tbl {
};
/* L3 word entry table data structure. */
+__rte_msvc_pack
struct mlx5_l3t_entry_word {
uint32_t idx; /* Table index. */
uint64_t ref_cnt; /* Table ref_cnt. */
@@ -125,6 +126,7 @@ struct mlx5_l3t_entry_word {
} __rte_packed;
/* L3 double word entry table data structure. */
+__rte_msvc_pack
struct mlx5_l3t_entry_dword {
uint32_t idx; /* Table index. */
uint64_t ref_cnt; /* Table ref_cnt. */
@@ -135,6 +137,7 @@ struct mlx5_l3t_entry_dword {
} __rte_packed;
/* L3 quad word entry table data structure. */
+__rte_msvc_pack
struct mlx5_l3t_entry_qword {
uint32_t idx; /* Table index. */
uint64_t ref_cnt; /* Table ref_cnt. */
@@ -145,6 +148,7 @@ struct mlx5_l3t_entry_qword {
} __rte_packed;
/* L3 pointer entry table data structure. */
+__rte_msvc_pack
struct mlx5_l3t_entry_ptr {
uint32_t idx; /* Table index. */
uint64_t ref_cnt; /* Table ref_cnt. */
--
2.47.0.vfs.0.3
next prev parent reply other threads:[~2024-11-19 4:37 UTC|newest]
Thread overview: 93+ 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-10-07 1:14 ` Stephen Hemminger
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 ` [PATCH v2 04/15] common/iavf: " Tyler Retzlaff
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
2024-11-19 4:35 ` [PATCH v5 00/16] fix packing of structs " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 01/16] eal: provide pack start macro for MSVC Andre Muezerie
2024-11-19 8:32 ` Morten Brørup
2024-11-19 4:35 ` [PATCH v5 02/16] eal: pack structures when building with MSVC Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 03/16] net: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 04/16] common/iavf: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 05/16] common/idpf: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 06/16] common/mlx5: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 07/16] dma/ioat: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 08/16] net/i40e: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 09/16] net/iavf: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 10/16] net/ice: " Andre Muezerie
2024-11-19 4:35 ` Andre Muezerie [this message]
2024-11-19 4:35 ` [PATCH v5 12/16] net/octeon_ep: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 13/16] app/testpmd: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 14/16] app/test: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 15/16] examples: " Andre Muezerie
2024-11-19 4:35 ` [PATCH v5 16/16] crypto/mlx5: " Andre Muezerie
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=1731990941-10001-12-git-send-email-andremue@linux.microsoft.com \
--to=andremue@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=roretzla@linux.microsoft.com \
--cc=ruifeng.wang@arm.com \
--cc=sameh.gobriel@intel.com \
--cc=sivaprasad.tummala@amd.com \
--cc=skori@marvell.com \
--cc=stephen@networkplumber.org \
--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).