net/mlx5: fix verbs flow counter query
authorDekel Peled <dekelp@mellanox.com>
Tue, 12 Nov 2019 14:19:20 +0000 (16:19 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:05 +0000 (17:36 +0100)
commit50d23b9ace7329ba3d4d8bcf39b1ffc85c14c135
tree9e36b58fddb3ad987aa77ed9b66dcdbdffd3e73d
parent6b7af102d02cc9f07420c42fb4fae6a70adfa105
net/mlx5: fix verbs flow counter query

Function flow_verbs_counter_query() was recently modified.
The new 'if' condition uses a pointer to flow counter-set.
This pointer is valid only if flow contains a count action.

This patch adds check to verify the pointer is valid.

Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5_flow_verbs.c