[dpdk-stable] [PATCH] net/mlx5: fix linkage error for glue lib
Shahaf Shuler
shahafs at mellanox.com
Tue Jul 24 15:51:24 CEST 2018
Yaroslav,
Tuesday, July 24, 2018 3:06 PM, Adrien Mazarguil:
> Subject: Re: [PATCH] net/mlx5: fix linkage error for glue lib
> > Odd, how could this happen assuming both files are compiled during the
> > same run using identical flags? Looks like a compiler issue.
> >
> > Anyway, may I suggest an alignment constraint on the structure type in
> > mlx5_glue.h instead, so that all users inherit it. E.g. using C11 syntax:
> >
> > #include <stdalign.h>
> > #include <stddef.h>
> >
> > [...]
> > alignas(max_align_t)
> > struct mlx5_glue {
> > [...]
> > };
>
> My bad, this is not a correct use for alignas(), it doesn't work on types.
> How about this instead:
>
> alignas(max_align_t)
> const struct mlx5_glue *mlx5_glue;
Can you confirm the above suggestion fixes your issue?
>
> >
More information about the stable
mailing list