[PATCH v2] common/mlx5: use intrinsics instead of inline assembly
Dariusz Sosnowski
dsosnowski at nvidia.com
Thu Jun 5 10:35:27 CEST 2025
On Thu, Jun 05, 2025 at 10:33:54AM +0200, Dariusz Sosnowski wrote:
> Hi,
>
> On Wed, Jun 04, 2025 at 07:15:25AM -0700, Andre Muezerie wrote:
> > When compiling with MSVC the errors below are hit because msvc does not
> > support inline assembly:
> >
> > 1)
> > ../drivers/common/mlx5/mlx5_common.c(86): warning C4013: '__asm__'
> > undefined; assuming extern returning int
> > ../drivers/common/mlx5/mlx5_common.c(87): error C2143: syntax error:
> > missing ')' before ':'
> >
> > 2)
> > ../drivers/net/mlx5/mlx5_txpp.c(510): error C2065: '__asm__':
> > undeclared identifier
> > ../drivers/net/mlx5/mlx5_txpp.c(510): error C2143: syntax error:
> > missing ';' before 'volatile'
> >
> > The fix for (1) is to use compiler intrinsic __cpuid and for (2)
> > intrinsic _InterlockedCompareExchange128 can be used.
> >
> > Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
>
> Thank you for applying the changes.
>
> Best regards,
> Dariusz Sosnowski
Forgot about:
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
More information about the dev
mailing list