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 7CCBC41C30; Tue, 7 Feb 2023 15:03:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87D3042D0E; Tue, 7 Feb 2023 15:03:01 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2044.outbound.protection.outlook.com [40.107.237.44]) by mails.dpdk.org (Postfix) with ESMTP id 79102410DF; Tue, 7 Feb 2023 15:03:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P1hVG2xcj9TmblUoimJ6iXEtvoRbI7/UiHQus9ynT14QlSkEuq/ew6VBj/IdyZ7X/87fE0hcwx6MJnrmUkQYVKyAqNFnInlH5YejLWOSiVC9ErpKdFaohk7s4vczAjbaOnrW5SRP5sP5SR6BJlx+U2q9xtrzKmpV2f1msOnZi4t3S1aBcE4YLcCATSsiKi8NAOHX7Evfik1FcmxmN4OXd0S4nkMzpWvgjVXdemPnw/25AlmLxCaOCxjgJKEv4W7mqil/qDzXDFUZzv9LCKG1YByu9wdEK8TUFjGZkL16lh9kqx3d8UnAwwlrdFCrYJFvs7TgjubHEHRvZFVysVRmgA== 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=is3AJj85nCpotH6VvEFpcjKxYyOzmr8trQv7nZAwaAg=; b=lyuaLphHGb++EvcHMNuIcjzpvyJWw3x0g/gjS2+6kCDlt2li2tQ7DCYwpiPahGNqQL8wlQuY9S7LaYMhLp5HHbxulK500yl3eqeoRY1/1a6aRcuxctGxKEmGYm5FYcPqrmIPXYuVSm3WsRRQmj4AnLV7PqzYdcJe6qq5KvFrNS5TIKP/W9THjs5nYGepV1exxc7tmXUhMUPzYUKqZUqXfvL3ZWHCRdzYlyGxs0DsQaxhaYBOZ0jmk4/pGTLm7bWeodoGkr3d/t8gyyFnH3nhdjEeBzeOLSkNKmaEYnxP4HvQvtb6BypRnebPMd7QQPkq9eU0hHQ3AbqzU/IDFwP3Ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=is3AJj85nCpotH6VvEFpcjKxYyOzmr8trQv7nZAwaAg=; b=g2uxYFQ9dOO6t4n4xnDq4FHQTPHiOO8uBHze9GpX+GyAHcT/KuHhM8x77g/NiNr1Dm5EZtg96X8dzRpXPeFNfB4vaI908keOFvFNhmgCxVLtAkof7dcwIpqwVpFygnQe9noKQDSBL8TNHLKOWIzXOsxTlcOREJBLONaROnQ+Tek4uoz57cQRPRsUs4xdJUiwqwkAdaFGoIK0gSisUZ8MUXlRijHokxFyke2aP6mPzfeRnrjBijHKm4jWA5n1gUvmvTYGDfBG/33eq8yF+ZbXpNNnjw3uuAjGoqQchik223rqdlFVipXvOKQY/wwL8eFxK1EhwRQu7dBTu3/leEiuNw== Received: from MW4PR04CA0365.namprd04.prod.outlook.com (2603:10b6:303:81::10) by CH0PR12MB8463.namprd12.prod.outlook.com (2603:10b6:610:187::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.36; Tue, 7 Feb 2023 14:02:59 +0000 Received: from CO1NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:303:81:cafe::a8) by MW4PR04CA0365.outlook.office365.com (2603:10b6:303:81::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.36 via Frontend Transport; Tue, 7 Feb 2023 14:02:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1NAM11FT045.mail.protection.outlook.com (10.13.175.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.25 via Frontend Transport; Tue, 7 Feb 2023 14:02:58 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 7 Feb 2023 06:02:48 -0800 Received: from nvidia.com (10.126.230.37) 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.36; Tue, 7 Feb 2023 06:02:45 -0800 From: Viacheslav Ovsiienko To: CC: , , , , , Erez Shitrit , , Dariusz Sosnowski Subject: [PATCH v2 5/9] net/mlx5/hws: fix disconnecting matcher Date: Tue, 7 Feb 2023 16:02:02 +0200 Message-ID: <20230207140206.29139-5-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230207140206.29139-1-viacheslavo@nvidia.com> References: <20230206095229.23027-1-viacheslavo@nvidia.com> <20230207140206.29139-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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: CO1NAM11FT045:EE_|CH0PR12MB8463:EE_ X-MS-Office365-Filtering-Correlation-Id: 770724ed-5eed-40b5-3c4d-08db091404dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EWfobtHkORk35xJFlJlSEkbe9XxrOtdEZ46RzGe1xFspMcgYBbHbdFN358+BTe3zyWeIsE7r9obY4cRiQShp0yBD6q0NcX6oeMf/ZiKKGMq6GVywlveMfZ13OhLGePBDnNxljdz1F2wTM2/kFm/RD9VP2kZ+M2WMeolDOb2VvqWFUbWSvOp96qJF9ksTMKqLNknDmDK4EX/lHOM09yZt5pglJWdAvyhYYniwpvJF437ZoNxgqDbSiaveRlAqfY3KjpowQDhJmh+IR39lNY9aAQcf9Sznz2LKjQUxAupqpwhsvvOD0OCE1HXw2+ZyTcRpCR+5+1ixNAN40iyMdEJWie4sIk9GpcHnwTGjBJFm5LQ1fPNz5Wy4fUb5aUqOZIa88SKwGefG6LDxXVER1NOo5B16zu0Z80um8eAVosPqsXtmhOIZkyzKDkq2UsrOzo0ytui+yh5Ali2+OOXh8ZncwMa+o0nxQUGuVlppj9Izwuk3m/j4RMSwKhJNvF4wWVZySQn+VHOY7OIApQOL1q2en5R7AJhhjaLZpGvn1ZHnlsntIEFXpGOkkAfRGY2Mz+jr77b2qYBziuSIJRyGB8TH2ykBtmIawY7ewW4cOYurng89HX4HSiH/FN8HqDEG+cIveQwSLZ9LwRbH4F57Yb0Y6/EoQHbi08Hnz4MkDLiM2gTmyzZDLRFvjSyYEs8uWToJKHxZ2pc/MEwyQwbFO4vjhw== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(396003)(136003)(376002)(346002)(39860400002)(451199018)(40470700004)(46966006)(36840700001)(40460700003)(8676002)(82740400003)(7636003)(316002)(356005)(6916009)(41300700001)(4326008)(8936002)(70586007)(2906002)(36860700001)(5660300002)(70206006)(1076003)(107886003)(6666004)(2616005)(478600001)(26005)(186003)(16526019)(6286002)(82310400005)(40480700001)(86362001)(83380400001)(54906003)(426003)(47076005)(7696005)(336012)(55016003)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2023 14:02:58.7723 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 770724ed-5eed-40b5-3c4d-08db091404dd 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8463 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 From: Erez Shitrit This patch fixes the matcher disconnection handling, by removing the RTC references from flow table if the currently removed matcher was the last one for the given table. As a result RTC in this matcher can be correctly freed, since there are no dangling references to the RTC. Fixes: c467608215b2 ("net/mlx5/hws: add matcher object") Cc: stable@dpdk.org Signed-off-by: Erez Shitrit Signed-off-by: Dariusz Sosnowski Reviewed-by: Alex Vesker Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_matcher.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c index 32bf3f5886..a0297c9787 100644 --- a/drivers/net/mlx5/hws/mlx5dr_matcher.c +++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c @@ -346,12 +346,6 @@ static int mlx5dr_matcher_disconnect(struct mlx5dr_matcher *matcher) } } - ret = mlx5dr_matcher_shared_update_local_ft(tbl); - if (ret) { - DR_LOG(ERR, "Failed to update local_ft in shared table"); - return ret; - } - return 0; } -- 2.18.1