From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C6B9AA00C2; Thu, 13 Oct 2022 11:34:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72B53410F2; Thu, 13 Oct 2022 11:34:36 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2072.outbound.protection.outlook.com [40.107.243.72]) by mails.dpdk.org (Postfix) with ESMTP id 0DADD40C35; Thu, 13 Oct 2022 11:34:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AuOJYNvNGTl8GDCRT+KKhK3ClAlJLvIdL7i/MQyNxbxSD4gAsK3FnVHI9RTWmk9k5/KRyPD6x+EqUa9EFd+9t6RDpvdXyv3fHpayqx/XOBGPlJP9q4r9GrNplb1v8cge0LKOixflTT1rXMJ2SU5DToDJgwuese2oQ+x0vBXLnt/LDI4NAT2MQKPO5cN6qNrjkpCgFPyQR/psF7pWwb+KVGzENhn/rPJbrR3nHjKPJbjt3HPEstlsdLBt0IyJEJzv+3aU/lqM2Lhw59DU11DljVX/NkAqYZJ3Kx8bwoD5EhUcrT0Z+LcTkGGd+if8kNUAEm93YhWWPQ1M0kzkdIrXCw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xvumz79om/QczsJPMdRxIXLoKqGKsFVlaP8XRWgo5h8=; b=kH+S5dilGRvexzLbEG/XTzax5boA+UtypxTLkZen3KJ86cXzR4h0M5/AW5ghn/CBYHAXkBkvFbq2NTEwEfHABT85usd15kxQi/wz8gvPGTheh49sQhRpG0EV07eZOLFPD7dyvdx2pC70iHS1zx9d705nkIp6YGhc8313xnzvs2nKp6trevEykNdOP3+ah8rBQtHivq3XGFYInBtd0mgwAQ9zQE/1SBQ8DIpQv31KnBD5/etZryNWqdL1qPlmO0T1evr32OlknuENEfxC1kaR+4c+3t3/H73ALEUU5Xpn5M10694AjzlMD9LoRyvs/xmcI8XiEUH2AZNNJrnl3rMKcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xvumz79om/QczsJPMdRxIXLoKqGKsFVlaP8XRWgo5h8=; b=JINyy8ftf06TBhLQUhvcbW5QltD9dRuvU7yNsKSIzBANM8oHp4WAgLhbCNrovFZse2J+jTeBcg+J1NCXvASZWRCcEOQ1LNGQdOscaT5yn0HP/Rt4/OFcFDYMJq4Rmwg1X5jDM4aJO8ffvZQD4LV6LDUAZKdPrSq/w7dZe/4dYUd3uqZyyiSLBUeELX1rDBvhCs5F9cLFqbDikQAygLqYQAlrDwyIIk+aYH6yjj+T9BO8bio4VDMFACc76+L1KNB1dXXi/jwFj8UtEVcEdxA0dc/bu8O9lA9AtnppnTyKv6TFBTOtQKSE6N/nmds+odzomMGObFdMPTwJ57b0NR20Qw== Received: from MWH0EPF00056D10.namprd21.prod.outlook.com (2603:10b6:30f:fff2:0:1:0:13) by PH7PR12MB6809.namprd12.prod.outlook.com (2603:10b6:510:1af::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Thu, 13 Oct 2022 09:34:33 +0000 Received: from CO1NAM11FT087.eop-nam11.prod.protection.outlook.com (2a01:111:f400:7eab::209) by MWH0EPF00056D10.outlook.office365.com (2603:1036:d20::b) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.6 via Frontend Transport; Thu, 13 Oct 2022 09:34:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT087.mail.protection.outlook.com (10.13.174.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20 via Frontend Transport; Thu, 13 Oct 2022 09:34:33 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Thu, 13 Oct 2022 02:34:20 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Thu, 13 Oct 2022 02:34:18 -0700 From: Dong Zhou To: , CC: , , , Subject: [PATCH] net/mlx5: fix thread workspace memory leak Date: Thu, 13 Oct 2022 12:34:02 +0300 Message-ID: <20221013093402.24572-1-dongzhou@nvidia.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT087:EE_|PH7PR12MB6809:EE_ X-MS-Office365-Filtering-Correlation-Id: ad1f712f-aadb-4b3c-e1b4-08daacfe22de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C1LmEa3ttzqVWEO3ECTged/PF3A8GHHmZVSTfL9FqAB0F8DtZke9QV4nlfuiMntWUCnfc0dO7hwZHO2tw3ThIqT7IkP8SZSVe+sb/AVOIWb85d+N8cId0JbXaB8H3EfXPFkScLHYdOGLOuJ5BMDNO9cIdcPzHh1idVTTB5ItrL1/rWtyCCZA13pkHtMISL7yP3lLdVYLMD4phE33MudKPS54CewS0ZQcyTqcP7RpBX+ypqenyn5aO5mnFZ5GR92bxRRt3SoycqiGiA024Lmsi/Wy9HBFjyGXSjPy9Z+GoNWP588pv3jeiE4AvGoTQBHha7B7CsFyu3mUAGU2iuk077xWjtGzAj0CI7ACZEZHkP3zOlq6/fj/k6IukpAtWb9wLFJvK9MiAsUN/9TfJpfvwVdTTFajZu+vSBJBXzhRQmrEYAWSGFTtFUlQDrhdGoI/YTm18tK2NTi+Q+5pK150/0dCoiEd2o3j/W8Nz935U5OPfuarfzbzoswjKvmw54tm1nYxbl7/dcLAKDy2aKFBRTfdbq6ARgxfq8M+WrA6qrqTcqQx9fkgxNQqFe3sSAVErB6KZ5kPq30pUoEetcFTvozi7tg4P9j0wCXCPGwcYl02G3IocAmqWDj+oad4ZauQIB2V03HlKPEvTAoXtLPy0eyDJZK4Dof8hFkRAG0Z2uz4YfkfOwEfz4PfbnZ1tAOsIkGrc4CzSn4TAzkknA18yMl2cIkBmeZsJvLKWgC9fzgHNbEI2hMglLXXeTcnQQ6hiaFf5wq4VUTW3zW8bNvPVg== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(396003)(346002)(376002)(136003)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(7696005)(4326008)(426003)(6286002)(8936002)(83380400001)(6666004)(7636003)(36756003)(54906003)(47076005)(6636002)(40480700001)(110136005)(40460700003)(316002)(82740400003)(70586007)(356005)(450100002)(70206006)(36860700001)(2616005)(41300700001)(8676002)(16526019)(4744005)(336012)(86362001)(5660300002)(55016003)(82310400005)(2906002)(186003)(1076003)(26005)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2022 09:34:33.1174 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad1f712f-aadb-4b3c-e1b4-08daacfe22de X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT087.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6809 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The thread workspace push/pop should be paired. In the "flow_list_create" routine, if error happened the workspace pop was missed. This patch shares the workspace pop for all return paths. Fixes: 0064bf431899 ("net/mlx5: fix nested flow creation") Cc: xuemingl@nvidia.com Cc: stable@dpdk.org Signed-off-by: Dong Zhou Acked-by: Viacheslav Ovsiienko --- 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 e4744b0..6fb1d53 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -7028,8 +7028,8 @@ struct mlx5_list_entry * rte_errno = ret; /* Restore rte_errno. */ ret = rte_errno; rte_errno = ret; - mlx5_flow_pop_thread_workspace(); error_before_hairpin_split: + mlx5_flow_pop_thread_workspace(); rte_free(translated_actions); return 0; } -- 1.8.3.1