From: Emeel Hakim Date: Wed, 8 Feb 2023 12:25:54 +0000 (+0200) Subject: net/mlx5e: Fix macsec ASO context alignment X-Git-Tag: baikal/mips/sdk6.1~136 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=b0a1a4babd36456a3bab3fdf92d84c99c8b2d7de;p=kernel.git net/mlx5e: Fix macsec ASO context alignment [ Upstream commit a6738052b4e3c1a03fcfd31592d71d29db2ae390 ] Currently mlx5e_macsec_umr struct does not satisfy hardware memory alignment requirement. Hence the result of querying advanced steering operation (ASO) is not copied to the memory region as expected. Fix by satisfying hardware memory alignment requirement and move context to be first field in struct for better readability. Fixes: 5f0b138ee960 ("net/mlx5e: Create advanced steering operation (ASO) object for MACsec") Signed-off-by: Emeel Hakim Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c index b92d541b5286e..0c23340bfcc75 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c @@ -89,8 +89,8 @@ struct mlx5e_macsec_rx_sc { }; struct mlx5e_macsec_umr { + u8 __aligned(64) ctx[MLX5_ST_SZ_BYTES(macsec_aso)]; dma_addr_t dma_addr; - u8 ctx[MLX5_ST_SZ_BYTES(macsec_aso)]; u32 mkey; };