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 76263A0561; Tue, 21 Apr 2020 09:47:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF99E1D8E1; Tue, 21 Apr 2020 09:47:51 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00062.outbound.protection.outlook.com [40.107.0.62]) by dpdk.org (Postfix) with ESMTP id 23E7E1D8E1; Tue, 21 Apr 2020 09:47:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V1D09d03UYiUhAyL76IQdki8bVYk/K5OOTVzRH8WpikY7s9aDX1Tio+ECxMtuVC/dZcjUwJSqOD3eZFyJeGWQhlWo0d3h6B6HS+jeszZI2DMGRtlhUpKLjnqFSF9JraIrSn65rKR32pJT/KntVsxBI/VkYmOxguP4OiyTGXawt1MovgvSlLfJJdJno6wu6AWIUTJF5bvOWkD2rsJwadhhPB2r3o9DuIYM7EcGIRL60lL44qf5V5onfnPZ3kIOCLB/mXpGXdHsVIyAO5RBmcFx7x7mmg/xyRu52GRfElcDG3DTbVR73bik9Htu7VP6jLBy0j9wkEz+xUV8JkO2fGxCg== 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=Rd816gANSe7fQovrR/Mc0aLMTy6CZ9Bef1OsS2mCUr8=; b=P5ZaWYJnDYTYVJhC/F8Wc8Pe0Hr46BshVcd6AtAHjXZwjZVmT5QZSf8pXlkHuVdLGg5wUUV7wx+E+0Fwa6nfT/QzpV5MjRB4w6hysBO56RRk1P+J4Qk5jkrC9oyv3KgabEbnF74frc85Kz18UwGEniBKuCcxkPkO3BQqA5IExq2Rqug1Ckvauqk0H7nf5svuggGBvxjpILvdPEdmFJVnIlJLDPk2JTxVOr8vnSJmn24BZr3hnGYwcoBpkVN9rdiEzib5yh8o7+fjxUNApyZKceDLkizc7iXffijksUwX2jKtihVttXW9M8b1fXSAAQJ6i1OhQlJfj7Ct+oPtZJMeUg== 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=Rd816gANSe7fQovrR/Mc0aLMTy6CZ9Bef1OsS2mCUr8=; b=VR6CW2t/AI6xtzXLywg6YdJb6flMKH0xSBvMirHLkbDbA+TqW6RIZQNPM601nV4zL5j7wDVOvri9Bj32y6AMdSkc9oPIlQt7jEl2XADAU+4dWAL1aOq83p6UD4F9AZ83NwfF3uH6xNYNNejCoChGwXLEfnT1WT4Ghg5jfLaXOpw= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (2603:10a6:205:8::26) by AM4PR05MB3268.eurprd05.prod.outlook.com (2603:10a6:205:4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Tue, 21 Apr 2020 07:47:49 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::bdf0:88a3:3a39:4be4]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::bdf0:88a3:3a39:4be4%7]) with mapi id 15.20.2921.030; Tue, 21 Apr 2020 07:47:49 +0000 From: Slava Ovsiienko 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: AQHWFADerJy868iq+kuTdHo7Ad3SUqiDOi/Q Date: Tue, 21 Apr 2020 07:47:49 +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=viacheslavo@mellanox.com; x-originating-ip: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9a8de3cf-22f3-41ee-4047-08d7e5c84a06 x-ms-traffictypediagnostic: AM4PR05MB3268:|AM4PR05MB3268: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:901; x-forefront-prvs: 038002787A x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM4PR05MB3265.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(346002)(39860400002)(136003)(376002)(366004)(26005)(2906002)(186003)(53546011)(5660300002)(9686003)(55016002)(6506007)(4326008)(54906003)(64756008)(66556008)(66446008)(66946007)(66476007)(316002)(71200400001)(478600001)(86362001)(7696005)(110136005)(8936002)(76116006)(81156014)(33656002)(52536014); 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: 7kGqMUlq53W1xrtXQ8bMeuVFWjZZutxQflo8q/oAPKESIjvgQJ7pvp6DlmEkNSa9WcQCrKJN+6vMQY7Sji1sS2XB5MgcYzWHA7V/DC1Zdf4F0O0lciU73yRTG+tXyGu/N7d7+XkTFXKjcJOgVh0DIAWTJQjY6p6vTr78uw1Jj/WWl8zrCt19T64cVUKIof9paCPVBxSRJAg2L1JomzV5EMSiPXq2Xq5A/R8WecIx2VLoXArNiCCiiWKxDV+MKbZ30IAZAeegoDPcz2Nt4fBL6QNYLATKRMyhQ3xTcpD+ecOQukaiyAVM+GLMcWF/1R2930nSxJj6BTKrBcJ9CLjrFPizp9UtRbFX2z2+1ZbAutDQIHUgYJ/2XUy+yKWkYGXcEAtCu0BXYZ4nD7abEWgi3ttOTsM/eKQLW6EdcM2QU879hAwyj8oK1O1QMYvzWzza x-ms-exchange-antispam-messagedata: 3Xegm4Vlj3d5VzbNITPKQgZ1zG9DfiFUWFB5Dj3Et0C++GDysp0Z+VrBUL95kpnLvXzBOUt/cabz1iS7AtplOo++/o6cdNmZi8PsxdFamcz/aQbJ/ur0TRL0d70rSwdbDrqrPwtJDGnd+ojwWrWT1Q== 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: 9a8de3cf-22f3-41ee-4047-08d7e5c84a06 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2020 07:47:49.3508 (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: p76mO3xRzfuz2r75yIXi1S2TZpXgwBq1bSeebds9un/myjJxwgUjQQjKKrEpCcwfuML+3I9wwr4IfHHqh66Augz0a/HtG1JtOZ03VkwcQR8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3268 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" > -----Original Message----- > From: dev On Behalf Of > xiangxia.m.yue@gmail.com > Sent: Wednesday, April 15, 2020 11:52 > 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 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 Acked-by: Viacheslav Ovsiienko > --- > 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