From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00064.outbound.protection.outlook.com [40.107.0.64]) by dpdk.org (Postfix) with ESMTP id A5E974C74 for ; Thu, 15 Nov 2018 06:24:14 +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=1q3LlyCqI0KowqEZ00jN4Wazoh85P3OBTRSLUkF3v3M=; b=H8O7Jrw1CxhjPIJGsuGE6isyEoE37+GfGzLhZiBXSxLhm9MXD5Wxo7Eg+pAJN65LrgWdzqEENeJI8jIs4l0qNBhTCwYP8E5ieA8W5n0zDeQdEUIwvOhL2K+FCAdETZ3C1+ihpgQ0BDRJ26i0tLpFM7XZbuf1zZJBkTB3QeyY8OU= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3946.eurprd05.prod.outlook.com (52.134.71.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Thu, 15 Nov 2018 05:24:13 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::58e7:97d8:f9c1:4323]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::58e7:97d8:f9c1:4323%3]) with mapi id 15.20.1294.045; Thu, 15 Nov 2018 05:24:13 +0000 From: Yongseok Koh To: Shahaf Shuler CC: "dev@dpdk.org" , Yongseok Koh , Ori Kam Thread-Topic: [PATCH] net/mlx5: fix flow destruction Thread-Index: AQHUfKNxP1kIsy3yZ0GXzryS5psVyQ== Date: Thu, 15 Nov 2018 05:24:13 +0000 Message-ID: <20181115052403.14316-1-yskoh@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR04CA0011.namprd04.prod.outlook.com (2603:10b6:a03:40::24) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB3946; 6:AaNBF3MbhlRR3ytNxgsXetx8QNPne5A/U/fJO7i96rESsjbfekAB8VNLe3DoaEOKvATjWg1TuQCEy6G5nuJEVrEO86kECOovRjcsykrMY5GWKuv3uIRvR0tqDB0Y5fbIjdF/pPCuG+/WpL9QaZ0kdXQFYFGGB40ZfQbrwV/hVt1jZdh/6ZpWTk9yq8WMLkGTDjqZsK55gZXnbS1sEIyG+12WW4aDuVfjjjA/gYa2pleSlzpE5TvUFG/OyPGaEbIcGnot8U7jFhR1hOscXcPtyf5Jm33xXrjYA6fJPv+rdB4Z2GjK5Hm8TuwwV+fu6pBdiPH6dSrYgCBdgLBnE05aKZ2T4CAzNhR15LGEgl0XsEvGcuvhde/2cmWKcVL6I04qV6z9twHPC4sA2ceQwq5cWt4QzFkvsmc5Fe3b1pGsu5SD0kSPap0lk5z8vpjGB8dY5Y0E17C8pldlJ9J+1MHYxg==; 5:O0Wn6jTDD6h5boQKtje2ZL+f6A3sUwY8YAeaeMUeBjLbMWyV9/YTNWwgTP3iIv6Z7K1I0sKVjQEBRHUEFWD5+Gxbv7x/qWxxJDxpiDejiljtkirqWsouRc6yWa9qXEaz+Ax5BzFVWUxBE8dgBBVBdEJYNRXp634Uh8tyvzqWUFs=; 7:WXxttqtvfG7BKRNy1UggHywd7KyN8WeVgKOmZkN8kJS5JRoN09xp2Ut5fftgeACVZx0K1Wifm1TYSyK+ZEk88brEPuYDnSnvaHflsAgKSVI92vesj5FjY5CYiTZYHsO5YedgmKIChvnIWoj3ZQCJjQ== x-ms-office365-filtering-correlation-id: 14c101d7-8584-49a7-5cc7-08d64aba93e9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB3946; x-ms-traffictypediagnostic: DB3PR0502MB3946: 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)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231415)(944501410)(52105112)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:DB3PR0502MB3946; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB3946; x-forefront-prvs: 08572BD77F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(136003)(39860400002)(366004)(346002)(199004)(189003)(5660300001)(107886003)(478600001)(14454004)(105586002)(97736004)(106356001)(305945005)(6636002)(6116002)(3846002)(1076002)(71200400001)(71190400001)(8936002)(7736002)(2906002)(66066001)(8676002)(81156014)(81166006)(68736007)(6512007)(6486002)(6436002)(2900100001)(4326008)(36756003)(25786009)(53936002)(6862004)(52116002)(86362001)(486006)(186003)(316002)(99286004)(1857600001)(6506007)(14444005)(386003)(256004)(54906003)(26005)(476003)(102836004)(2616005)(37006003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3946; H:DB3PR0502MB3980.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: 7NtMG6OAZb4oqmJPr/bHSt316eEpvqx0ikP5bcUaSbZPewypSGSLTiS1FrWvPfs/MOx3XrMV8fO6QpZfXFDiWR/6kBdDMI29yrzApmvTHRLtL3e/7HghFd36Crxu62VZvTlRoGGLcalHU4tCu31v5u4gNV1nhqT4j2WJvImwyeWd8yhwHsAoh7Ne/QUJc8+wRTO5qQFoDlqn9IhQHGkmWfjba41V5r1lBwAoWGf96UbuBwOaO8R+KAZBV2OXZew+kZRyYeow3Fyc+GLyjghzYocz5tfx8ZO5W8LM8Se4dvKVh4FJK35dztNthjp0AKxPPFiJg4kRWgu9xqfJfkGNq7riJgau9FTQqlP0L5G/VN8= 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: 14c101d7-8584-49a7-5cc7-08d64aba93e9 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2018 05:24:13.4795 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3946 Subject: [dpdk-dev] [PATCH] net/mlx5: fix flow destruction 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: Thu, 15 Nov 2018 05:24:14 -0000 As flow_drv_destroy() frees dev_flow, flow_rxq_flags_trim() must be called ahead. Fixes: 84c406e74524 ("net/mlx5: add flow translate function") Cc: orika@mellanox.com Signed-off-by: Yongseok Koh --- drivers/net/mlx5/mlx5_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 5ad3a11ab7..01499c462a 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2127,14 +2127,14 @@ static void flow_list_destroy(struct rte_eth_dev *dev, struct mlx5_flows *list, struct rte_flow *flow) { - flow_drv_destroy(dev, flow); - TAILQ_REMOVE(list, flow, next); /* * Update RX queue flags only if port is started, otherwise it is * already clean. */ if (dev->data->dev_started) flow_rxq_flags_trim(dev, flow); + flow_drv_destroy(dev, flow); + TAILQ_REMOVE(list, flow, next); rte_free(flow->fdir); rte_free(flow); } --=20 2.11.0