summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>2018-10-23 10:04:12 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:06 +0200
commit9a945375a815bf704b0c7578e1a9085dc83c0ebd (patch)
treee943b24c3b3aa6ee1b70cd597a015711a6feac42 /drivers
parent0d8c6e6ba09967b386e7a62254cb9a974ba7a5e0 (diff)
downloaddpdk-9a945375a815bf704b0c7578e1a9085dc83c0ebd.zip
dpdk-9a945375a815bf704b0c7578e1a9085dc83c0ebd.tar.gz
dpdk-9a945375a815bf704b0c7578e1a9085dc83c0ebd.tar.xz
net/mlx5: introduce new flow counters configuration macro
The new configuration macro HAVE_IBV_DEVICE_COUNTERS_SET_V45 is introduced. Both makefile and meson.build are changed. Flow counter support code depends on the following configuration macros: - HAVE_IBV_DEVICE_COUNTERS_SET_V42 - is defined if system supports the "old" flow counters functionality, MLNX_OFED version from 4.2 to 4.4 is required. - HAVE_IBV_DEVICE_COUNTERS_SET_V45 - is defined if system supports the "new" flow counters functionality, MLNX_OVED 4.5 (or higher) or Linux rdma-core v19 (or higher) is required. Neither HAVE_IBV_DEVICE_COUNTERS_SET_V42 nor HAVE_IBV_DEVICE_COUNTERS_SET_V45 is defined if there is no counters support. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mlx5/Makefile5
-rw-r--r--drivers/net/mlx5/meson.build2
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 124ee4e..fecb57c 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -162,6 +162,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
type 'struct ibv_counter_set_init_attr' \
$(AUTOCONF_OUTPUT)
$Q sh -- '$<' '$@' \
+ HAVE_IBV_DEVICE_COUNTERS_SET_V45 \
+ infiniband/verbs.h \
+ type 'struct ibv_counters_init_attr' \
+ $(AUTOCONF_OUTPUT)
+ $Q sh -- '$<' '$@' \
HAVE_RDMA_NL_NLDEV \
rdma/rdma_netlink.h \
enum RDMA_NL_NLDEV \
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index e613a21..e8cbe3e 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -81,6 +81,8 @@ if build
'struct mlx5dv_sw_parsing_caps', 'sw_parsing_offloads' ],
[ 'HAVE_IBV_DEVICE_COUNTERS_SET_V42', 'infiniband/verbs.h',
'struct ibv_counter_set_init_attr', 'counter_set_id' ],
+ [ 'HAVE_IBV_DEVICE_COUNTERS_SET_V45', 'infiniband/verbs.h',
+ 'struct ibv_counters_init_attr', 'comp_mask' ],
]
# input array for meson symbol search:
# [ "MACRO to define if found", "header for the search",