From: Ori Kam Date: Tue, 2 Apr 2019 07:04:06 +0000 (+0000) Subject: net/mlx5: fix flow counters using devx X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f54aeb3ec0fccb58c7579d5a36de6bd0829f296d;p=dpdk.git net/mlx5: fix flow counters using devx The API that was defined in OFED 4.5 was replaced both in OFED 4.6 and in upstream. This commit updates the API to match the upstream one. Fixes: f5bf91de738a ("net/mlx5: support flow counters using devx") Cc: stable@dpdk.org Signed-off-by: Ori Kam Acked-by: Shahaf Shuler --- diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index e5587e9036..ccd179c7ed 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -163,7 +163,7 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh $Q sh -- '$<' '$@' \ HAVE_IBV_FLOW_DEVX_COUNTERS \ infiniband/mlx5dv.h \ - enum MLX5DV_FLOW_ACTION_COUNTER_DEVX \ + enum MLX5DV_FLOW_ACTION_COUNTERS_DEVX \ $(AUTOCONF_OUTPUT) $Q sh -- '$<' '$@' \ HAVE_ETHTOOL_LINK_MODE_25G \ diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index fe880b9b2e..a429655cc1 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -110,7 +110,7 @@ if build [ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h', 'mlx5dv_devx_obj_create' ], [ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h', - 'MLX5DV_FLOW_ACTION_COUNTER_DEVX' ], + 'MLX5DV_FLOW_ACTION_COUNTERS_DEVX' ], [ 'HAVE_SUPPORTED_40000baseKR4_Full', 'linux/ethtool.h', 'SUPPORTED_40000baseKR4_Full' ], [ 'HAVE_SUPPORTED_40000baseCR4_Full', 'linux/ethtool.h', diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 966dad9838..ad84dea3fc 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -36,7 +36,7 @@ #ifdef HAVE_IBV_FLOW_DV_SUPPORT #ifndef HAVE_IBV_FLOW_DEVX_COUNTERS -#define MLX5DV_FLOW_ACTION_COUNTER_DEVX 0 +#define MLX5DV_FLOW_ACTION_COUNTERS_DEVX 0 #endif union flow_dv_attr { @@ -2939,7 +2939,7 @@ flow_dv_translate(struct rte_eth_dev *dev, if (flow->counter == NULL) goto cnt_err; dev_flow->dv.actions[actions_n].type = - MLX5DV_FLOW_ACTION_COUNTER_DEVX; + MLX5DV_FLOW_ACTION_COUNTERS_DEVX; dev_flow->dv.actions[actions_n].obj = flow->counter->dcs->obj; action_flags |= MLX5_FLOW_ACTION_COUNT;