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 EFEBD45D3C; Tue, 19 Nov 2024 05:37:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAC60427C6; Tue, 19 Nov 2024 05:36:32 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7CD3F40E39 for ; Tue, 19 Nov 2024 05:36:16 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id F179620DF168; Mon, 18 Nov 2024 20:36:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F179620DF168 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731990975; bh=XB8xRfesAs2rj+D9BpEK3OaMP7HEOpC/DDfaM2Cg+t4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5eEoyTGNj4SpHLDtdH+tok1E1beSQPVC+Q1URVdOLyD2laD5PkE2+8C2wN6zuoqr yjWzP2aTokCxwp7AJXz644uLpZuY7sFAXYpnrqrca49MCxyaZtEFPX8YrEi4db+tt7 ENGbaQQNY/c3V0846EHQ2a61GNzpL+luGLq30dbE= 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 11/16] net/mlx5: pack structures when building with MSVC Date: Mon, 18 Nov 2024 20:35:36 -0800 Message-Id: <1731990941-10001-12-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. Signed-off-by: Tyler Retzlaff --- 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