From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shahaf Shuler Subject: Re: [PATCH v3 3/3] net/mlx5: support flow counters using devx Date: Thu, 3 Jan 2019 08:29:07 +0000 Message-ID: References: <1545949196-3355-4-git-send-email-motih@mellanox.com> <1546422185-30813-4-git-send-email-motih@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Mordechay Haimovsky To: Mordechay Haimovsky , "dev@dpdk.org" Return-path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150058.outbound.protection.outlook.com [40.107.15.58]) by dpdk.org (Postfix) with ESMTP id 4BD195424 for ; Thu, 3 Jan 2019 09:29:10 +0100 (CET) In-Reply-To: <1546422185-30813-4-git-send-email-motih@mellanox.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Moti, Wednesday, January 2, 2019 11:43 AM, Mordechay Haimovsky: > Subject: [dpdk-dev] [PATCH v3 3/3] net/mlx5: support flow counters using = devx >=20 > This commit adds counters support when creating flows via direct verbs. T= he > implementation uses devx interface in order to create query and delete th= e > counters. > This support requires MLNX_OFED_LINUX-4.5-0.1.0.1 installation. >=20 > Signed-off-by: Moti Haimovsky > --- > v2: > * Modifications according to code review, > See message Id: 1545748697-3385-4-git-send-email-motih@mellanox.com > v3: > * Modified calls to devx routins to be done through the glue interface. > See message Id: 1545949196-3355-4-git-send-email-motih@mellanox.com > --- [...] > @@ -2789,6 +2903,37 @@ struct field_modify_info modify_tcp[] =3D { > flow->rss.level =3D rss->level; > action_flags |=3D MLX5_FLOW_ACTION_RSS; > break; > + case RTE_FLOW_ACTION_TYPE_COUNT: > + if (!priv->config.devx) { > + rte_errno =3D ENOTSUP; > + goto cnt_err; > + } > + flow->counter =3D > + flow_dv_counter_new(dev, > + count->shared, count->id); > + if (flow->counter =3D=3D NULL) > + goto cnt_err; > + dev_flow->dv.actions[actions_n].type =3D > + > MLX5DV_FLOW_ACTION_COUNTER_DEVX; Am having compilation issue here w/ old rdma-core where this feature is not= defined.=20 Please take care, and add my acked-by on the next version.=20 > + dev_flow->dv.actions[actions_n].obj =3D > + flow->counter->dcs->obj; > + action_flags |=3D MLX5_FLOW_ACTION_COUNT; > + ++actions_n; > + break; > +cnt_err: > + if (rte_errno =3D=3D ENOTSUP) > + return rte_flow_error_set > + (error, ENOTSUP,