[PATCH v2] common/mlx5: use intrinsics instead of inline assembly

Raslan Darawsheh rasland at nvidia.com
Tue Jun 10 15:18:54 CEST 2025


Hi,


On 04/06/2025 5:15 PM, 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>

patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh



More information about the dev mailing list