net/mlx5: support new flow counter API
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Tue, 23 Oct 2018 10:04:16 +0000 (10:04 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 26 Oct 2018 20:14:06 +0000 (22:14 +0200)
commitdb48f9db5d9ffdfc851161e12f05ae099df44de0
treed0c5bf0b126316019484a3425fbf2f3a58d2af1f
parente00767ee04c179f452840a9801af466b10257194
net/mlx5: support new flow counter API

This patch updates the functions performing the Verbs ibrary calls
in order to support different versions of the library.
The functions:
  - flow_verbs_counter_new()
  - flow_verbs_counter_release()
  - flow_verbs_counter_query()
now have the several compilation branches, depending on the
counters support found in the system at compile time.

The flow_verbs_counter_create() function is introduced as
helper for flow_verbs_counter_new(), actually this helper
create the counters with Verbs.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_verbs.c