Moti,

Wednesday, January 2, 2019 11:43 AM, Mordechay Haimovsky:
> Subject: [dpdk-dev] [PATCH v3 3/3] net/mlx5: support flow counters using devx
> 
> This commit adds counters support when creating flows via direct verbs. The
> implementation uses devx interface in order to create query and delete the
> counters.
> This support requires MLNX_OFED_LINUX-4.5-0.1.0.1 installation.
> 
> Signed-off-by: Moti Haimovsky <mo...@mellanox.com>
> ---
> v2:
> * Modifications according to code review,
>   See message Id: 1545748697-3385-4-git-send-email-mo...@mellanox.com
> v3:
> * Modified calls to devx routins to be done through the glue interface.
>  See message Id: 1545949196-3355-4-git-send-email-mo...@mellanox.com
> ---

[...]

> @@ -2789,6 +2903,37 @@ struct field_modify_info modify_tcp[] = {
>                       flow->rss.level = rss->level;
>                       action_flags |= MLX5_FLOW_ACTION_RSS;
>                       break;
> +             case RTE_FLOW_ACTION_TYPE_COUNT:
> +                     if (!priv->config.devx) {
> +                             rte_errno = ENOTSUP;
> +                             goto cnt_err;
> +                     }
> +                     flow->counter =
> +                             flow_dv_counter_new(dev,
> +                                                 count->shared, count->id);
> +                     if (flow->counter == NULL)
> +                             goto cnt_err;
> +                     dev_flow->dv.actions[actions_n].type =
> +
>       MLX5DV_FLOW_ACTION_COUNTER_DEVX;

Am having compilation issue here w/ old rdma-core where this feature is not 
defined. 
Please take care, and add my acked-by on the next version. 

> +                     dev_flow->dv.actions[actions_n].obj =
> +                                             flow->counter->dcs->obj;
> +                     action_flags |= MLX5_FLOW_ACTION_COUNT;
> +                     ++actions_n;
> +                     break;
> +cnt_err:
> +                     if (rte_errno == ENOTSUP)
> +                             return rte_flow_error_set
> +                                           (error, ENOTSUP,

Reply via email to