From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80075.outbound.protection.outlook.com [40.107.8.75]) by dpdk.org (Postfix) with ESMTP id A36572C37; Sun, 28 Oct 2018 13:53:27 +0100 (CET) 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=/H/IlRZla/GFxLtZXeDVtFevv36eRJGi+FhZvhBUf7Y=; b=MdNTigWYZeZRvO+vFKMuuc4H4RZw5z2mdBB8PegIPx05B3RBihvo2SPI5s4bEJn1Lt0cSh+/KhY3MuUTe+T2CXKrExMKeN9SMXG+Jan6js7X/K6T29/aGEdtYBFCPMjmb+2SKQ0b7RYy9QZsoioRJnaMQmqsnIxlAVoUMEvhXnU= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4251.eurprd05.prod.outlook.com (52.134.108.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.26; Sun, 28 Oct 2018 12:53:26 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::80e:e6b:baf2:d973]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::80e:e6b:baf2:d973%3]) with mapi id 15.20.1273.025; Sun, 28 Oct 2018 12:53:26 +0000 From: Shahaf Shuler To: Slava Ovsiienko CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix flow counters deletion in Verbs Thread-Index: AQHUbeNsXbRiYYMjiU+dszVlUGysMaU0ap4g Date: Sun, 28 Oct 2018 12:53:26 +0000 Message-ID: References: <1540289032-29628-9-git-send-email-viacheslavo@mellanox.com> <1540637629-9233-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1540637629-9233-1-git-send-email-viacheslavo@mellanox.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=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4251; 6:p/K/T5EJRdsyEXGvUbYqYLzuxUHKvXxhI+GvwWhK/vlYByleQlWk5c49B+Ut7RrEoVEcw4tlnpK0Tl2fXxE3MNIjpQPPUXE+Mog0rrSjbWw4z0vlPatPuHlPEj0boNZjFIKk64cgCYVE9yXrU/Ry5TkamkIMHUIyuSLXBbgR9VXf+g7yZW8+uU0jY/AjU1tWQGmrEiDsgFCKiefovZPSdCAR90ZQC/SfsKyFpM+cARr5av/8XdkCDpQopsN4zix2rfBP/8TTRQXJj1AkE1NHYVvoYj4AbGH9ZI/0h/OneBVVPAIb6WfvrddUnr5VnAHh/U/EdMIkmqDVRs+52silnytpsTcT5wGiTS7/JTvfgOpuULimWR4Yo8VtmcTvTM+I5Zjfpq3SsQGYK5rV7AB7ysrcrOynjYzU2ca8f1vYsiIfYXb4kAmCiZXPZ9ckHjVZu6RmUdIr9Vh3tQUJVsAdkQ==; 5:uiieQcyIdSn0SyfSq6dsx+aHT7TSVFwthhPr/cY2oLuQB8oPciNJ0Z7arP8WbzegNOj3oWw7T7j3ALKd3yXkEu+6ce5cBJ6bfVxl6lKZadYjNUvHIjbUrXZZ5VhAhjsoLIccZWndFZMw1BGXR4yzQbOExBB/Nl+ibvbolDX1Lx4=; 7:1BTfY58TT7Lhq5TuVpx+8kBCVZqI/NyTKbwYqyJ0IOkHDgwj0bFrJpF49DdpnFTabkA7ToU9VO5IOmYlnt2cB+OdzxtynmytdXmufmWtpxD4QzhW9YVYH0g1UoVr8h2YxPlhvCaMr9quKMmNd5WOqg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 765b4d57-0bb4-4fea-3567-08d63cd45a5a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4251; x-ms-traffictypediagnostic: DB7PR05MB4251: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:DB7PR05MB4251; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4251; x-forefront-prvs: 0839D067E7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(366004)(376002)(136003)(199004)(189003)(71200400001)(9686003)(486006)(71190400001)(6246003)(186003)(7736002)(53936002)(305945005)(229853002)(2906002)(97736004)(4326008)(106356001)(55016002)(105586002)(476003)(6436002)(86362001)(6862004)(25786009)(450100002)(33656002)(6116002)(14444005)(3846002)(68736007)(256004)(6506007)(2900100001)(316002)(54906003)(76176011)(7696005)(11346002)(81156014)(26005)(446003)(66066001)(99286004)(478600001)(74316002)(14454004)(5250100002)(8676002)(6636002)(102836004)(81166006)(5660300001)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4251; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Ge5YCKp05Q2uOhaf70E+uIFY4n12YG92WyUfXzhK6CBSzvuI27tbVS3AFx0N4aHZbIOCCmwGZxlV2bhfNdO3e8oCFqQQ0GmrwC3iZaqJOGsSWCQJ0MeieQNkUd0so5LZgO4ukP8TDIhBenHpeu/LvS6VnMj8Go9A6uPkfNYd0BoNYMIV045Jyej7NDKnZPTjC0wnqPAzNc1OSv1zQLezq19ixgGFuVbSU4HxL4yDwjKukBNZmrTvM6KZyUyYRzLNTacOJjyuO6npA7+5BncdRra4u8tv/Pg4a1ycYo2c4gaTQ41F6qBX3MBmS1wGzXQil+es0sqPkqTYBnx34D77hsXTPVZrH4nPt/JDQ7IcKS0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 765b4d57-0bb4-4fea-3567-08d63cd45a5a X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2018 12:53:26.5398 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4251 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix flow counters deletion in Verbs 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: , X-List-Received-Date: Sun, 28 Oct 2018 12:53:28 -0000 Saturday, October 27, 2018 1:54 PM=B8 Slava Ovsiienko: > Subject: [PATCH] net/mlx5: fix flow counters deletion in Verbs >=20 > The Flow counters created with Verbs are erroneously destroyed in Flow > remove function (flow_verbs_remove()). Counter Verbs handles stored in > the translated rule buffer become invalid. > If rule is reapplied with these invalid counter handles the driver hangs. >=20 > The counter should be destroyed with Verbs in the Flow destroy function. > The Flow remove function should keep counters intact. >=20 > Fixes: 60bd8c9747e8 ("net/mlx5: add count flow action") > Cc: stable@dpdk.org >=20 Very nice commit log. > Signed-off-by: Viacheslav Ovsiienko Acked-by: Shahaf Shuler Applied to next-net-mlx, thanks.=20 > --- > drivers/net/mlx5/mlx5_flow_verbs.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c > b/drivers/net/mlx5/mlx5_flow_verbs.c > index 81bc39f..2e506b9 100644 > --- a/drivers/net/mlx5/mlx5_flow_verbs.c > +++ b/drivers/net/mlx5/mlx5_flow_verbs.c > @@ -1669,10 +1669,6 @@ > verbs->hrxq =3D NULL; > } > } > - if (flow->counter) { > - flow_verbs_counter_release(flow->counter); > - flow->counter =3D NULL; > - } > } >=20 > /** > @@ -1696,6 +1692,10 @@ > LIST_REMOVE(dev_flow, next); > rte_free(dev_flow); > } > + if (flow->counter) { > + flow_verbs_counter_release(flow->counter); > + flow->counter =3D NULL; > + } > } >=20 > /** > -- > 1.8.3.1