X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx5%2Fmlx5_defs.h;h=af29d93901d4194e413f0740258282188c28bd28;hb=46413898cf1df5798b8d1ea04522da0f0ce97205;hp=49803528f2c2295438c4af0dd192dfa952decdd2;hpb=81073e1f8ce1250c54e20ea0e6adc06433d022eb;p=dpdk.git diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h index 49803528f2..af29d93901 100644 --- a/drivers/net/mlx5/mlx5_defs.h +++ b/drivers/net/mlx5/mlx5_defs.h @@ -6,7 +6,7 @@ #ifndef RTE_PMD_MLX5_DEFS_H_ #define RTE_PMD_MLX5_DEFS_H_ -#include +#include #include #include "mlx5_autoconf.h" @@ -50,7 +50,7 @@ /* Switch port ID parameters for bonding configurations. */ #define MLX5_PORT_ID_BONDING_PF_MASK 0xf -#define MLX5_PORT_ID_BONDING_PF_SHIFT 0xf +#define MLX5_PORT_ID_BONDING_PF_SHIFT 12 /* Alarm timeout. */ #define MLX5_ALARM_TIMEOUT_US 100000 @@ -199,18 +199,12 @@ /* Maximum number of shared actions supported by rte_flow */ #define MLX5_MAX_SHARED_ACTIONS 2 -/* Definition of static_assert found in /usr/include/assert.h */ -#ifndef HAVE_STATIC_ASSERT -#define static_assert _Static_assert -#endif - /* - * Defines the amount of retries to allocate the first UAR in the page. - * OFED 5.0.x and Upstream rdma_core before v29 returned the NULL as - * UAR base address if UAR was not the first object in the UAR page. - * It caused the PMD failure and we should try to get another UAR - * till we get the first one with non-NULL base address returned. + * Linux definition of static_assert is found in /usr/include/assert.h. + * Windows does not require a redefinition. */ -#define MLX5_ALLOC_UAR_RETRY 32 +#if !defined(HAVE_STATIC_ASSERT) && !defined(RTE_EXEC_ENV_WINDOWS) +#define static_assert _Static_assert +#endif #endif /* RTE_PMD_MLX5_DEFS_H_ */