[v4,11/16] net/mlx5: pack structures when building with MSVC
Checks
Commit Message
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 | 5 +++++
drivers/net/mlx5/mlx5_hws_cnt.h | 1 +
drivers/net/mlx5/mlx5_utils.h | 4 ++++
5 files changed, 12 insertions(+)
@@ -300,6 +300,7 @@ struct mlx5dr_action_dest_attr {
};
};
+__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;
@@ -221,6 +221,7 @@ struct mlx5_dev_spawn_data {
}
/** 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;
@@ -658,6 +658,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. */
@@ -812,6 +813,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. */
@@ -830,6 +832,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. */
@@ -1231,6 +1234,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. */
@@ -1304,6 +1308,7 @@ enum {
#endif
/** HWS flow struct. */
+__rte_msvc_pack
struct rte_flow_hw {
/** The table flow allcated from. */
struct rte_flow_template_table *table;
@@ -133,6 +133,7 @@ enum {
};
/* HWS counter age parameter. */
+__rte_msvc_pack
struct mlx5_hws_age_param {
uint32_t timeout; /* Aging timeout in seconds (atomically accessed). */
uint32_t sec_since_last_hit;
@@ -118,6 +118,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. */
@@ -128,6 +129,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. */
@@ -138,6 +140,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. */
@@ -148,6 +151,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. */