net/mlx5: fix hairpin flow split decision
authorDekel Peled <dekelp@nvidia.com>
Sun, 10 Jan 2021 17:37:56 +0000 (19:37 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 13 Jan 2021 18:45:30 +0000 (19:45 +0100)
commit19e13263ed2fc47a32e9ec3ddcfdbf44168d72ac
treedb5144258641ad15c73a5a3c2e2cbb6d0a656ed3
parent5d55a494f4e62f29d945cf6c9ec1d0980a72642f
net/mlx5: fix hairpin flow split decision

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@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.c