[PATCH v4 16/16] crypto/mlx5: pack structures when building with MSVC

Tyler Retzlaff roretzla at linux.microsoft.com
Tue Apr 16 02:05:13 CEST 2024


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     | 1 +
 drivers/crypto/mlx5/mlx5_crypto_gcm.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index 36dacdc..3b4916d 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -95,6 +95,7 @@ struct mlx5_crypto_devarg_params {
 	uint32_t is_aes_gcm:1;
 };
 
+__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 fc6ade6..9a2c438 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;
-- 
1.8.3.1



More information about the dev mailing list