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 68AE8A0588; Fri, 17 Apr 2020 04:02:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 473FC1DE33; Fri, 17 Apr 2020 04:02:09 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30073.outbound.protection.outlook.com [40.107.3.73]) by dpdk.org (Postfix) with ESMTP id 3C77B1DDCF; Fri, 17 Apr 2020 04:02:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IGYIPBqVvUPuU7ak3kN8Ul2+kEkNCZzM4bV6OPQSwqQ2gGpbSCD3IfiNAWGixwCxaglPdmXy/sRojUabvg3LulIcXVCPFOvvwG0PLj6egUMEMBxdka7X/nGiPWkYegA50NwIvs4k+RgtThds9xe+ORJm0bivsB/EuBfOGk2ziShR8l9DdeHxXl0tEilIVyi0A9W4Dt+iZJvY2hrkictp1X2D6bHJHkZzaUFq6dMl1boY62tItsMM1lNPoKxXHGT/twXvIjtDgXTatvtrCVWQbeMX2WMM7d48XYhnkIN4GKTyR+FahHk+WV1sTDJRSqBbiTsJpFvf/yVqIGKWAgMHHg== 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=nshE/77yr2oh4JftVcAzOVP//YpiSk6iKDrbiB8xkYI=; b=bFFv0Vy2KewCD8pgCZm3RppChsMGo8w6UQtnlVOL75RObFPTO/W1ImpCTx1frppEIOoKbYkqmdFSxP67V3Z0o75vuIXb5Kju5IvchC3Skkc3FSoP+4NqLoT0dhG9xBfOJ5c4j9NmZAT/HZagFmgQ6o2D9zpsNFzpNKw7A6cF7fZIH2oBYCcSEMWp84IoNhG6bCK88aDP86hMcllRcQH8AAZsG0r/2GlHh7k+SvOpCTx7iPha9spJJPx6mHs5NAhGGlxikcuhTOcWzRrqZR2+zu5OtaHZP6tSp9FQetThVKk4XST2lWWEGj2DW92KfdvTGvolTll/PFNKst98cvhB8g== 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=nshE/77yr2oh4JftVcAzOVP//YpiSk6iKDrbiB8xkYI=; b=koYNXMqnq7A1mQEhDKnjTgSwPEmjskAosUMZmdQuDLI4SSPamRU6R5v4umiFrhEsGA/Xd4aEVX7TimruNhWDQZvJBSR/iYAIoes5G0gDAwPLQNcSXJFRtSRAy4bh7ke7Hi3F1glzKxCS+Sx5zYNBC180XP3WxXnvEvnsmBz+F8Q= Received: from HE1PR05MB3484.eurprd05.prod.outlook.com (2603:10a6:7:2f::12) by HE1PR05MB4762.eurprd05.prod.outlook.com (2603:10a6:7:9a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.17; Fri, 17 Apr 2020 02:02:05 +0000 Received: from HE1PR05MB3484.eurprd05.prod.outlook.com ([fe80::3022:cbe2:4523:718a]) by HE1PR05MB3484.eurprd05.prod.outlook.com ([fe80::3022:cbe2:4523:718a%4]) with mapi id 15.20.2900.028; Fri, 17 Apr 2020 02:02:05 +0000 From: Suanming Mou To: "xiangxia.m.yue@gmail.com" , "david.marchand@redhat.com" , Slava Ovsiienko , Matan Azrad CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix crash when releasing the meter table Thread-Index: AQHWFADZPmtkOICfEU+r0YFnRhI4Tah8jtOg Date: Fri, 17 Apr 2020 02:02:05 +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=suanmingm@mellanox.com; x-originating-ip: [115.193.229.2] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3d5135e4-905b-4f57-937b-08d7e27353c5 x-ms-traffictypediagnostic: HE1PR05MB4762:|HE1PR05MB4762: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1122; x-forefront-prvs: 0376ECF4DD x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR05MB3484.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(396003)(346002)(366004)(376002)(136003)(6636002)(9686003)(478600001)(26005)(5660300002)(4326008)(2906002)(55016002)(33656002)(66946007)(76116006)(81156014)(8676002)(110136005)(316002)(54906003)(7696005)(64756008)(71200400001)(186003)(66556008)(52536014)(86362001)(66476007)(6506007)(53546011)(66446008)(8936002); 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: LE//Mg/G30ateTyXBRA9Cs3A96BtTtzCA651/9T2R3zbVN2/n46DXqmylzMIoVhPiJwqXyY1+2kgieYHPpAH4taeWTwhw6sJwUcnKz9Zj+eXXbEyst+OrgFnqvSeEJwMAyhy9RtavlMgjJbQeD1Y+1Oj4i3S1xAadnX9B0l+UA8AK7nRbb2wW0EpPdz8szaSsTK0/GbhFcudu+b0Jo9hngDNMtkWZGcT/wuF/UJfSQmIxPPA4xTUg4J9x8yOnuvn4+spRpno0ChhE8+s1L5Xl/sof/rp/HNDgXDEbeSFxHxijYoRAuA4/b9zg+8f5G4EZkWUoKGl30kQM4cys5N7yHJo8nDZ9ossHaBf8m89nthnbFZ4LDrZcGRkaFhRltWTc1lfVjxqUSm6O+ukVxqgzRWc8wJws+KkM6brK2l3mCATDw2oRwnEODtA/ufsMFst x-ms-exchange-antispam-messagedata: vK2hrpohppAAdyfXISSMrYlAOHs2sE3V/si5baCCv+xE0PWggjktFJdIPuHLwGY+5B6z+4jGX2xdE90n2fE0ixyliPN86tzsR3vuDhixUWyBfuQSRYvHBoYx9Y3eEyx051v78Q6BPpd2ohKtgp0G5g== 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: 3d5135e4-905b-4f57-937b-08d7e27353c5 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2020 02:02:05.0458 (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: FvF3m3oWTBVFTRbqxzrYlRNS2rYEADOVcQM36kx+L8IlismqU6fxLI9z/oj/FKY5t4uzgHl/mcv3Po+vylVMdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB4762 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 Tonghao, Good catch. Add maintainers. Thanks, SuanmingMou > -----Original Message----- > From: xiangxia.m.yue@gmail.com > Sent: Wednesday, April 15, 2020 4:52 PM > To: Suanming Mou ; > david.marchand@redhat.com > Cc: dev@dpdk.org; Tonghao Zhang ; > stable@dpdk.org > Subject: [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 releasin= g > 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 Reviewed-off-by: Suanming Mou > --- > 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