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 46FB1A04DD; Wed, 28 Oct 2020 05:58:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 453AD6A16; Wed, 28 Oct 2020 05:58:27 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by dpdk.org (Postfix) with ESMTP id 389076A15 for ; Wed, 28 Oct 2020 05:58:25 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 27 Oct 2020 21:58:29 -0700 Received: from nvidia.com (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 28 Oct 2020 04:58:20 +0000 From: Gregory Etelson To: CC: , , , , , Shahaf Shuler , Viacheslav Ovsiienko Date: Wed, 28 Oct 2020 06:58:06 +0200 Message-ID: <20201028045806.25616-1-getelson@nvidia.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200625160348.26220-1-getelson@mellanox.com> References: <20200625160348.26220-1-getelson@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1603861110; bh=abPqo2eA/0ijyuMDyZe6vhlrt8tK8iCe4RNxb3F5B7Q=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=Aug8WL41mrAw7jbxz/NIPw3Hmd/JKGawZioUzBHC/89QfzsnXYqorn3hGIwd+6XaR iNXp0cOYsrE73bbZS0xRErejiqhhFzmHTF6sxW5XPWHfdK0u0jB2lD2kIB2aVZTiLL KN6F4r9j9ouQS6qu5WJFBbpvXXRixwITAaGexF5ipaYS/VdGu6C0ltWdi9XwR2ZP64 mETdkuATEjLTCcln4bDtr8EZu6kGeJwc8oMzs0fSoqoMkUA9cXuJFrJTd43F/hHsog nntzACi24vzdPvGZzoy2owe99/dHmX281LWhtspVHTr052YWBtZdRKe/MkOWCPTjyW kiYgm4bK1eiYQ== Subject: [dpdk-dev] [PATCH] net/mlx5: fix tunnel flow destroy 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" Flow destructor tired to access flow related resources after the flow object memory was already released and crashed dpdk process. The patch moves flow memory release to the end of destructor. Signed-off-by: Gregory Etelson Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 949b9ced9b..3128da1b47 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5935,7 +5935,6 @@ flow_list_destroy(struct rte_eth_dev *dev, uint32_t *= list, mlx5_free(priv_fdir_flow); } } - mlx5_ipool_free(priv->sh->ipool[MLX5_IPOOL_RTE_FLOW], flow_idx); if (flow->tunnel) { struct mlx5_flow_tunnel *tunnel; tunnel =3D mlx5_find_tunnel_id(dev, flow->tunnel_id); @@ -5943,6 +5942,7 @@ flow_list_destroy(struct rte_eth_dev *dev, uint32_t *= list, if (!__atomic_sub_fetch(&tunnel->refctn, 1, __ATOMIC_RELAXED)) mlx5_flow_tunnel_free(dev, tunnel); } + mlx5_ipool_free(priv->sh->ipool[MLX5_IPOOL_RTE_FLOW], flow_idx); } =20 /** --=20 2.28.0