[PATCH v3 15/39] vhost: use C11 alignas
Maxime Coquelin
maxime.coquelin at redhat.com
Wed Feb 14 11:37:40 CET 2024
On 2/14/24 08:05, Tyler Retzlaff wrote:
> * Move __rte_aligned from the end of {struct,union} definitions to
> be between {struct,union} and tag.
>
> The placement between {struct,union} and the tag allows the desired
> alignment to be imparted on the type regardless of the toolchain being
> used for all of GCC, LLVM, MSVC compilers building both C and C++.
>
> * Replace use of __rte_aligned(a) on variables/fields with alignas(a).
>
> Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> ---
> lib/vhost/vhost.h | 8 ++++----
> lib/vhost/vhost_crypto.c | 4 ++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks,
Maxime
More information about the dev
mailing list