From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH v3 10/13] net/mlx5: fix e-switch Flow counter deletion Date: Thu, 1 Nov 2018 22:00:31 +0000 Message-ID: <20181101220023.GK6118@mtidpdk.mti.labs.mlnx> References: <1539612815-47199-1-git-send-email-viacheslavo@mellanox.com> <1541074741-41368-1-git-send-email-viacheslavo@mellanox.com> <1541074741-41368-11-git-send-email-viacheslavo@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Shahaf Shuler , "dev@dpdk.org" , Mordechay Haimovsky To: Slava Ovsiienko Return-path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70073.outbound.protection.outlook.com [40.107.7.73]) by dpdk.org (Postfix) with ESMTP id A827F1B20E for ; Thu, 1 Nov 2018 23:00:33 +0100 (CET) In-Reply-To: <1541074741-41368-11-git-send-email-viacheslavo@mellanox.com> Content-Language: en-US Content-ID: <8BCC1A5B9F2B0D4EB37C5B4C8BE756CB@eurprd05.prod.outlook.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Nov 01, 2018 at 05:19:32AM -0700, Slava Ovsiienko wrote: > The counters for E-Switch rules were erroneously deleted in > flow_tcf_remove() routine. The counters deletion is moved to > flow_tcf_destroy() routine. >=20 > Fixes: e1114ff6a5ab ("net/mlx5: support e-switch flow count action") > Cc: Moti Haimovsky >=20 > Suggested-by: Adrien Mazarguil > Signed-off-by: Viacheslav Ovsiienko > --- Acked-by: Yongseok Koh Thanks > drivers/net/mlx5/mlx5_flow_tcf.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flo= w_tcf.c > index 67a6ff3..02b64d6 100644 > --- a/drivers/net/mlx5/mlx5_flow_tcf.c > +++ b/drivers/net/mlx5/mlx5_flow_tcf.c > @@ -3803,12 +3803,6 @@ struct pedit_parser { > =20 > if (!flow) > return; > - if (flow->counter) { > - if (--flow->counter->ref_cnt =3D=3D 0) { > - rte_free(flow->counter); > - flow->counter =3D NULL; > - } > - } > dev_flow =3D LIST_FIRST(&flow->dev_flows); > if (!dev_flow) > return; > @@ -3836,6 +3830,12 @@ struct pedit_parser { > if (!flow) > return; > flow_tcf_remove(dev, flow); > + if (flow->counter) { > + if (--flow->counter->ref_cnt =3D=3D 0) { > + rte_free(flow->counter); > + flow->counter =3D NULL; > + } > + } > dev_flow =3D LIST_FIRST(&flow->dev_flows); > if (!dev_flow) > return; > --=20 > 1.8.3.1 >=20