From patchwork Wed Mar 20 21:06:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138640 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8786F43D0A; Wed, 20 Mar 2024 22:07:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B051142E95; Wed, 20 Mar 2024 22:06:34 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CCEF842DCE for ; Wed, 20 Mar 2024 22:06:14 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6778020B74C9; Wed, 20 Mar 2024 14:06:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6778020B74C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710968773; bh=kGlDuhVy5PamZjljfDz6H7sBLDWyz1+m4bax2DTe8aM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S28fMScvP+FWTMvuH1tMNHcwoNfdN0UVS0brshfQk4pLEvKy1FmXXhz4Ddf9Ll57D eGzJYU9/puNPjy2l9BaVnhMvJMbO2JEl2ldmOd3WohZqSMyneHhri1B/zPZNuvTTZW hAwA3S7Y9i+iqQNhB5PyiUBcDYbgOBBPpJzgvgrQ= 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 , Tyler Retzlaff Subject: [PATCH 09/15] net/iavf: pack structures when building with MSVC Date: Wed, 20 Mar 2024 14:06:05 -0700 Message-Id: <1710968771-16435-10-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710968771-16435-1-git-send-email-roretzla@linux.microsoft.com> References: <1710968771-16435-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_pushpack(1) to all __rte_packed structs to cause packing when building with MSVC. Signed-off-by: Tyler Retzlaff --- drivers/net/iavf/iavf_ipsec_crypto.h | 3 +++ drivers/net/iavf/iavf_rxtx.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/net/iavf/iavf_ipsec_crypto.h b/drivers/net/iavf/iavf_ipsec_crypto.h index 49f9202..36ced50 100644 --- a/drivers/net/iavf/iavf_ipsec_crypto.h +++ b/drivers/net/iavf/iavf_ipsec_crypto.h @@ -11,12 +11,14 @@ +__rte_msvc_pack struct iavf_tx_ipsec_desc { union { struct { __le64 qw0; __le64 qw1; }; + __rte_msvc_pack struct { __le16 l4payload_length; __le32 esn; @@ -84,6 +86,7 @@ enum iavf_ipsec_iv_len { * transmit data path. Parameters set for session by calling * rte_security_set_pkt_metadata() API. */ +__rte_msvc_pack struct iavf_ipsec_crypto_pkt_metadata { uint32_t sa_idx; /* SA hardware index (20b/4B) */ diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 0a5246d..ba0fa6f 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -50,6 +50,7 @@ static uint16_t vxlan_gpe_udp_port = RTE_VXLAN_GPE_DEFAULT_PORT; static uint16_t geneve_udp_port = RTE_GENEVE_DEFAULT_PORT; +__rte_msvc_pack struct simple_gre_hdr { uint16_t flags; uint16_t proto;