net/mlx5: fix detection of counter offset support
authorSuanming Mou <suanmingm@nvidia.com>
Thu, 12 Nov 2020 08:51:43 +0000 (16:51 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 22:36:14 +0000 (23:36 +0100)
commit0080b100dd67aaf174fc1cd1dcec438d60439681
tree7f2040ce37a9fde85ab6697e05371cab1949cb69
parent0746dcabfd52a8722f3590f58b943bf8eba5840c
net/mlx5: fix detection of counter offset support

Currently, the counter offset support is discovered by creating the
rule with invalid offset counter and jump action in root table. If
the rule creation fails with EINVAL errno, that mean counter offset
is not supported in root table.

However, jump action may not be supported in some rdma-core version.
In this case, the discover code will not work properly.

This commits changes the jump action to generic drop action. That
makes the discover code to be more compatible.

Fixes: 994829e695c0 ("net/mlx5: remove single counter container")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c