]> git.droids-corp.org - dpdk.git/commit
crypto/mlx5: fix size of UMR WQE
authorTal Shnaiderman <talshn@nvidia.com>
Mon, 25 Oct 2021 08:46:15 +0000 (11:46 +0300)
committerAkhil Goyal <gakhil@marvell.com>
Thu, 4 Nov 2021 18:43:14 +0000 (19:43 +0100)
commitddcc44b5d30c5a8b07756cd6568ce326964ee3c3
tree454b93dde18b68104c7d942f89757a9ee261911f
parent2f5dceff715ebd1faf44a5191b52d46bf9ada2d1
crypto/mlx5: fix size of UMR WQE

The size of the UMR WQE allocated object is decided by a sizof
operation on the struct, however since the struct contains
a union of flexible array members this sizeof results can differ
between compilers.

GCC for example treats the union as 0 sized, MSVC adds a padding
of 16Bits.

To resolve the ambiguity the allocation size will be calculated
by the sizes of the members excluding the flexible union.

Fixes: a1978aa23bf4 ("crypto/mlx5: add maximum segments configuration")
Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/crypto/mlx5/mlx5_crypto.c