[dpdk-stable] [dpdk-dev] [PATCH] net/mlx5: fix flow check hairpin split
Thomas Monjalon
thomas at monjalon.net
Wed Jan 6 22:21:51 CET 2021
03/01/2021 16:18, Dekel Peled:
> Previously, the identification of hairpin queue was done using
> mlx5_rxq_get_type() function.
> Recent patch replaced it with use of mlx5_rxq_get_hairpin_conf(),
> and check of the return value conf != NULL.
> The case of return value is NULL (queue is not hairpin) was not handled.
> As result, non-hairpin flows were wrongly handled.
> This patch adds the required check for return value is NULL.
>
> Fixes: 509f8470de55 ("net/mlx5: do not split hairpin flow in explicit mode")
> Cc: stable at dpdk.org
>
> Signed-off-by: Dekel Peled <dekelp at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
> - if (conf != NULL && !!conf->tx_explicit)
> + if (!conf || !!conf->tx_explicit)
The DPDK coding style recommends explicit comparison.
Here it would be:
if (conf == NULL || conf->tx_explicit != 0)
More information about the stable
mailing list