[PATCH v5 16/16] crypto/mlx5: pack structures when building with MSVC
Andre Muezerie
andremue at linux.microsoft.com
Tue Nov 19 05:35:41 CET 2024
From: Tyler Retzlaff <roretzla at 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 at linux.microsoft.com>
---
drivers/crypto/mlx5/mlx5_crypto.h | 2 ++
drivers/crypto/mlx5/mlx5_crypto_gcm.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index 547bb490e2..80a7a38f17 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -32,6 +32,7 @@ enum mlx5_crypto_mode {
MLX5_CRYPTO_IPSEC_OPT,
};
+__rte_msvc_pack
struct mlx5_crypto_ipsec_mem {
uint8_t mem[MLX5_CRYPTO_GCM_IPSEC_IV_SIZE];
} __rte_packed;
@@ -108,6 +109,7 @@ struct mlx5_crypto_devarg_params {
enum mlx5_crypto_mode crypto_mode;
};
+__rte_msvc_pack
struct mlx5_crypto_session {
union {
/**< AES-XTS configuration. */
diff --git a/drivers/crypto/mlx5/mlx5_crypto_gcm.c b/drivers/crypto/mlx5/mlx5_crypto_gcm.c
index cd21605bd2..005be4d4bf 100644
--- a/drivers/crypto/mlx5/mlx5_crypto_gcm.c
+++ b/drivers/crypto/mlx5/mlx5_crypto_gcm.c
@@ -62,6 +62,7 @@ struct mlx5_crypto_gcm_data {
uint32_t dst_mkey;
};
+__rte_msvc_pack
struct mlx5_crypto_gcm_tag_cpy_info {
void *digest;
uint8_t tag_len;
--
2.47.0.vfs.0.3
More information about the dev
mailing list