common/mlx5: fix relaxed ordering count object
authorShiri Kuzin <shirik@mellanox.com>
Tue, 12 May 2020 12:21:45 +0000 (15:21 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 May 2020 18:35:56 +0000 (20:35 +0200)
commitffd5b302baabdc96fcd6deb58d8cd3ec39020c5c
treeb9f5a1dc57a4a7b824b663557bf8d08bfa34c90e
parent2b152cc97ce86be13bccbbddc79fcf3f84c0f4d8
common/mlx5: fix relaxed ordering count object

In order to improve performance relaxed ordering was enabled
when creating count object using Devx.

Currently rte enables this optimization by default when using
Devx.

This causes an issue when using firmware that does not have this
capability causing a count object failure.

In order to fix this issue a check of firmware capabilities was
added before enabling relaxed ordering.

Fixes: 53ac93f71ad1 ("net/mlx5: create relaxed ordering memory regions")

Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/common/mlx5/mlx5_devx_cmds.c
drivers/common/mlx5/mlx5_devx_cmds.h
drivers/common/mlx5/mlx5_prm.h
drivers/net/mlx5/mlx5_flow_dv.c