From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 87F6DA0598; Tue, 21 Apr 2020 17:02:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D35621D44E; Tue, 21 Apr 2020 17:02:52 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2073.outbound.protection.outlook.com [40.107.21.73]) by dpdk.org (Postfix) with ESMTP id 43E1A1D171; Tue, 21 Apr 2020 17:02:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UeCUr3nVzhQwHKF0iGYEg3ahof9Oj1HMqR/rdc/LVHIKejgq4us5VnDNgxSg0FcprebYSej09fwe9Pz/7Cah88DzjL5L78tbXH+fhMMgh/0cWXPzzNGWRx2EkgvSambGrQGhdDUR2Ac6UpJ1dxGfZMbjw4mGDPR+oU5k8BfrkHRkhXUX5ZZfbaCEREsujBG4GdRcljMdRraiwZ/0zd/0HSG9oy1ppgHIpY8wD1ClTIXli8WjQGmN3y+jlWTDYlHOZuimsohDERtpcWIS7KNw0xYeLUWJHaT7g7UEiYG0uDD19dFacTofz2YYWsFS+eKIg7w34MiyDvSw/Ce725l/zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1wx0+MMcvYNgVcTjr9RTedGOHdV+Gae8Ezv8tS8E36A=; b=DGLaKASTxzKCjFd8F7oExG+wMvaOpjZqlXmNxqvu0SVTv64rs98qoFUPDPQWdwgO/bukrSJQ+z24fddzZvtc+tjEwzPwOYgUu4QK3vodo+V2uiuhIfITGTy0LYOnnLJ+ALkB8piuzZN8YofjLlNelGNVMmzxuKq2dI01rBnNy2tzlIEcx2x1aYGw3MmmkkJ+fZENTfNuFQH76hhVuwwV7PpJE2jCXxEUzJmpFeGcaYl5TSgHvXAk19c/FoLJAhtGqAnWFkA/B2yMAqMiRUFD6WyjAe+aEqel2vxBPMjKguRIXsGaLZQ66eVTxL9RJ+1WNEXmfmHRfnKJWbALma4a4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1wx0+MMcvYNgVcTjr9RTedGOHdV+Gae8Ezv8tS8E36A=; b=IPYaqqvnbKib3+lMupHTVlSF3CYdVgjXYZJlSOyFX3ki1vS4blHl/POqstDpYHTyt67YRf8u6ldjlNH1UcqYSygsdYi08rzjhbVqRHYf4WorfWqWF1WBi2MwfUjAw2s4CNZBOT7ADQ+3S88S+SRoVu+CBnKXLIhH01DjdPd3ftQ= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM0PR05MB5091.eurprd05.prod.outlook.com (2603:10a6:208:c3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27; Tue, 21 Apr 2020 15:02:50 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e%6]) with mapi id 15.20.2921.030; Tue, 21 Apr 2020 15:02:50 +0000 From: Raslan Darawsheh To: "xiangxia.m.yue@gmail.com" , Suanming Mou , "david.marchand@redhat.com" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix crash when releasing the meter table Thread-Index: AQHWFADfi1uXRqDc5Ui8MYhiXqZ4a6iDs8Xg Date: Tue, 21 Apr 2020 15:02:50 +0000 Message-ID: References: <1586940749-35960-1-git-send-email-xiangxia.m.yue@gmail.com> In-Reply-To: <1586940749-35960-1-git-send-email-xiangxia.m.yue@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-originating-ip: [188.161.228.234] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 88ede10f-3d96-41d4-5562-08d7e6050f6b x-ms-traffictypediagnostic: AM0PR05MB5091:|AM0PR05MB5091: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:386; x-forefront-prvs: 038002787A x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(366004)(186003)(81156014)(66946007)(76116006)(52536014)(33656002)(54906003)(86362001)(9686003)(8936002)(110136005)(71200400001)(6506007)(26005)(7696005)(2906002)(66446008)(66556008)(66476007)(4326008)(53546011)(498600001)(5660300002)(55016002)(64756008); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6nGp32/BYIPGAqk5T0+tCZMe68+nwUHxiYgzkNGeJiHs1G2NKXmWHwqPGhPK3W4tEpNry/SsBd/Zsn1+EQwFM1mHyCJSwpOClS4phd1LlFnfCybifEWluzS8VVaV+yDeLUAeumm1Pp1rP5wXWrJJooeQtSukpQAEXRzaCDM5iXvzW5hv302ivWeyTH3U28YnUiL+0wFM0jIb8zB1uA5eGEaiS48YJ0KdW5xsWQHM79STwmn45jQOEI1gXPSZLfwgyjYnybXQYzKypAKpX9vAWHvh9udOSshfgpwp0eHtg4o0NU1fqTVECTsO/4Su7TaovCS5a79eG23My2ePikbnlBKsiaej7OUoie/zZKrhAXH9trKwwlTIIhKQ5WmMnQPuy4grWTHvddHKGwnZRILc4ZBkGyxU1g2koryMdUVmXoSR8vmU1uah9sly31UBAiKG x-ms-exchange-antispam-messagedata: 4o5eJSkupR1sjZybwrmaK3AvhgMBSQfWMOKE8QGPcVOPYXFnHGDc64wveD0WCmV7J197Y1a3wH5S96vPfiOZuxt4UG2M70S2US4863YvDmLXJ0U8x55bhEr6AAehhar2eBMk+c5b1oLX07YOLs9XFQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88ede10f-3d96-41d4-5562-08d7e6050f6b X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2020 15:02:50.2907 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: q1R5qeOgb1Qr769JPY3pIOeOP4z+BdbnFENnUuUzC9nPrQbSORESLX663HiCMTcwZMWEjfqnWMJwK0LUL8qfRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5091 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix crash when releasing the meter table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, > -----Original Message----- > From: dev On Behalf Of > xiangxia.m.yue@gmail.com > Sent: Wednesday, April 15, 2020 11:52 AM > To: Suanming Mou ; > david.marchand@redhat.com > Cc: dev@dpdk.org; Tonghao Zhang ; > stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/mlx5: fix crash when releasing the meter > table >=20 > From: Tonghao Zhang >=20 > The meters of ports share the same meter table on > the port. When releasing meters, don't check value returned > using assert. Because other meters may reference to it. >=20 > Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables") > Fixes: 708aa5608f98 ("net/mlx5: fix meter suffix table leak") >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: Tonghao Zhang > --- > drivers/net/mlx5/mlx5_flow_dv.c | 18 ++++++------------ > 1 file changed, 6 insertions(+), 12 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index ae00ca431eec..2174b9aa37dc 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -8552,11 +8552,9 @@ struct field_modify_info modify_tcp[] =3D { > claim_zero(mlx5_glue->dv_destroy_flow_matcher > (mtd->egress.any_matcher)); > if (mtd->egress.tbl) > - claim_zero(flow_dv_tbl_resource_release(dev, > - mtd->egress.tbl)); > + flow_dv_tbl_resource_release(dev, mtd->egress.tbl); > if (mtd->egress.sfx_tbl) > - claim_zero(flow_dv_tbl_resource_release(dev, > - mtd- > >egress.sfx_tbl)); > + flow_dv_tbl_resource_release(dev, mtd->egress.sfx_tbl); > if (mtd->ingress.color_matcher) > claim_zero(mlx5_glue->dv_destroy_flow_matcher > (mtd->ingress.color_matcher)); > @@ -8564,11 +8562,9 @@ struct field_modify_info modify_tcp[] =3D { > claim_zero(mlx5_glue->dv_destroy_flow_matcher > (mtd->ingress.any_matcher)); > if (mtd->ingress.tbl) > - claim_zero(flow_dv_tbl_resource_release(dev, > - mtd->ingress.tbl)); > + flow_dv_tbl_resource_release(dev, mtd->ingress.tbl); > if (mtd->ingress.sfx_tbl) > - claim_zero(flow_dv_tbl_resource_release(dev, > - mtd- > >ingress.sfx_tbl)); > + flow_dv_tbl_resource_release(dev, mtd->ingress.sfx_tbl); > if (mtd->transfer.color_matcher) > claim_zero(mlx5_glue->dv_destroy_flow_matcher > (mtd->transfer.color_matcher)); > @@ -8576,11 +8572,9 @@ struct field_modify_info modify_tcp[] =3D { > claim_zero(mlx5_glue->dv_destroy_flow_matcher > (mtd->transfer.any_matcher)); > if (mtd->transfer.tbl) > - claim_zero(flow_dv_tbl_resource_release(dev, > - mtd->transfer.tbl)); > + flow_dv_tbl_resource_release(dev, mtd->transfer.tbl); > if (mtd->transfer.sfx_tbl) > - claim_zero(flow_dv_tbl_resource_release(dev, > - mtd- > >transfer.sfx_tbl)); > + flow_dv_tbl_resource_release(dev, mtd->transfer.sfx_tbl); > if (mtd->drop_actn) > claim_zero(mlx5_glue->destroy_flow_action(mtd- > >drop_actn)); > rte_free(mtd); > -- > 1.8.3.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh