[PATCH 09/15] net/iavf: pack structures when building with MSVC
Tyler Retzlaff
roretzla at linux.microsoft.com
Wed Mar 20 22:06:05 CET 2024
Add __rte_msvc_pushpack(1) to all __rte_packed structs to cause packing
when building with MSVC.
Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
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;
--
1.8.3.1
More information about the dev
mailing list