[dpdk-dev] [PATCH 3/5] net/mlx4: introduce the mlx4 version of the assert
Thomas Monjalon
thomas at monjalon.net
Thu Jan 23 16:49:32 CET 2020
23/01/2020 15:25, Alexander Kozyrev:
> Use the MLX4_ASSERT macros instead of the standard assert clause.
> Depends on the MLX4_DEBUG configuration option to define it as the
> RTE_ASSERT or an empty clause for a release configuration.
>
> Signed-off-by: Alexander Kozyrev <akozyrev at mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
> ---
I think it would be good to explain that assert can be enabled
either globally or with a specific define. More details below:
In case mlx4 debug is enabled (from global meson debug or specific define),
the assert is enabled by calling RTE_VERIFY which bypasses the global
option CONFIG_RTE_ENABLE_ASSERT.
> +#define MLX4_ASSERT(exp) RTE_VERIFY(exp)
[...]
In case mlx4 debug is disabled, the global option CONFIG_RTE_ENABLE_ASSERT
can still enable assert by calling RTE_VERIFY inside RTE_ASSERT macro.
> #else /* MLX4_DEBUG */
[...]
> +#define MLX4_ASSERT(exp) RTE_ASSERT(exp)
More information about the dev
mailing list