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 D5D6C41BE9; Mon, 6 Feb 2023 10:53:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E31042D42; Mon, 6 Feb 2023 10:53:14 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2069.outbound.protection.outlook.com [40.107.220.69]) by mails.dpdk.org (Postfix) with ESMTP id E3AD142D10 for ; Mon, 6 Feb 2023 10:53:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PPbRMtOnSqH4sKF8xniUbYkMUq6CBe0HCAK3bt4BFF+TXhicXl8nH4plK0WXDVlm2j443yDWw2QrqTijd4RkFmA48HZhKb+rk4e4N+u5f2XGRKFy8CrXlsgh2ClIkeUQ71K5Qip0ACXSO9Neod/QNOnUklDqK2vz1IfY7MafTWtCli6J5NrmnXx8nw7WS75bxXm59Oh7U+J7oGBz97WfZ4BUeKRLHQlbsS2zHvuGfNhkEeek4V8U0bha+ROH7Fk+N1O30BmcwEGydZt7jCPqOCANbGkpRTJQRODNKZ5VVLu41oUjza0ZxiNWXAluJ+hd+SBg/zyvp0MQT6BlX727Bg== 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=v4VC8X+8avzaGUIx3A2Wuo9iLi/Jsf41VsbeF3RzfbQ=; b=jnEIO0u4xX2wOkyn4fCP1yBbSrZOWCHuCeq8NkTr7yve/rdPvHoVvsRkfGsWMVp95ABKAsdIUfb/yRn3BFq5h9mC/nHvNkVB/2j8oz/BDX7yCHK1kqkF26EwFb6j4WcCRpcAQo4DMau73AoXxJtMfTBZpet7BdeZ6jK8sw2q68A912Co3uf/RB7XFPT/65lx8Xjvh8mgoRzhkCJCMBWaMCQPtWhJslioNlZpZIqbXZoFd3KqcOeQGh4PlL9UK5zVpJY5QkbsZsb9gtDUcnHbcCf6c3CeYJKzbENzfDoleEkaYAH7Xo4+W52bd+CAw8i3uGo3CN6dW4eqBbLwXO2dwA== 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=v4VC8X+8avzaGUIx3A2Wuo9iLi/Jsf41VsbeF3RzfbQ=; b=k1ToEzHOaRKdVCuSmn41qvPxbcrLapBgi8gF7lyKVdQNObPnTPy8WFqUXPMmKsSSLOHZpkgjc5lL4srlZJa3BPGHD+/zdv+4LKjfhnTenH/WwzMXD3DFZL/BQS3JSLC3Oa15+uiI4x2HaJdN0H3ZSpPBUm3P/QArHhk4lTJsIJxKj/373Xi/ikIbf4V3maomZxXRluCLlN+P1FSintz7T3uVMucBRUv0un8Ob7r8BBgK2wGD7QxKtfk4GJC/9im39XcKEG3u/KP7S/PvQ8SsCf1OsV8x7MxeFRWm4JpxdHmQKLTMKMeRAeD69vKS9/vBd/DgWrP/ZkwG5Ew/HqrW8Q== Received: from CY5PR13CA0026.namprd13.prod.outlook.com (2603:10b6:930::20) by BL1PR12MB5996.namprd12.prod.outlook.com (2603:10b6:208:39c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.31; Mon, 6 Feb 2023 09:53:11 +0000 Received: from CY4PEPF0000C96F.namprd02.prod.outlook.com (2603:10b6:930:0:cafe::1f) by CY5PR13CA0026.outlook.office365.com (2603:10b6:930::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.15 via Frontend Transport; Mon, 6 Feb 2023 09:53:10 +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 CY4PEPF0000C96F.mail.protection.outlook.com (10.167.242.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.20 via Frontend Transport; Mon, 6 Feb 2023 09:53:10 +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.36; Mon, 6 Feb 2023 01:53:00 -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; Mon, 6 Feb 2023 01:52:57 -0800 From: Viacheslav Ovsiienko To: CC: , , , , , Erez Shitrit , Dariusz Sosnowski Subject: [PATCH 3/9] net/mlx5/hws: fix disconnecting matcher Date: Mon, 6 Feb 2023 11:52:23 +0200 Message-ID: <20230206095229.23027-3-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230206095229.23027-1-viacheslavo@nvidia.com> References: <20221228165433.18185-1-viacheslavo@nvidia.com> <20230206095229.23027-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: CY4PEPF0000C96F:EE_|BL1PR12MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: 040cc42d-2df4-41f8-027e-08db0827f499 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gdfI99v/u/LOQBUrT3nwVovMda+R6RGfdgNPEuC0PSKaKaY1qPN94Rtu1DuFbslJk5aV3pxjRnm+gXRrAMSEcwaVVgTTi1DbZtRu+n0ug0YWN9zdYQB2bZ9P5eN2WEwcaWH6r0w5YTior8iRSrTVgQekrV+3Dl7CU8YT6ZT0ZCZKiUd1FJ55R/+ugxkLYy4x5SrzCUsnhrC2+vGGNvyFXQajoJ5yuvlZULovw2eEDufHQxR8ccj4KWHZNpd17jyxZ5ogYdh53ttRPk7s+p8tBiQpbZMFP2n4g3169AXkY5p76fd4LcLHFS6B71Kt4yq18clxfPHWE3cBBgHe21yg/dZrB9472jNCBj9/AbsACTlIbxaNWzeQ2QUW+YWDE90Tlz5tVtjMChiuwLF+Ju7t2IJdik7CUNfifVrCViNil/001Hs19lDPrq55iMfiRJY++xYnmCjBVoOm4OZt4FCMMiqpeuZWFP8iIKUUzcWXbnLk0rXwqgaTL0082msOuh/YJunZTXREsMO+CqW32aHlfLz8sMvNzIuzukI08dEY6Ln3MkIkk1jG2u328o8wOBfx4GNsgSRRpGykGbmNMPWjQ+NkB/R3yJnFCYtXWKmIo8LsninfBjC1cFhUfOIs3BwE0YAWyYXFLr/n289mOpna7jNDdNVd5jXFC34x8sM0hEttPDY/WLbgBNrn6usvhybVEc9Cs5uNDP9wolMDdVszXQ== 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:(13230025)(4636009)(376002)(396003)(136003)(346002)(39860400002)(451199018)(40470700004)(36840700001)(46966006)(16526019)(186003)(26005)(6286002)(1076003)(2616005)(7696005)(36860700001)(7636003)(6666004)(107886003)(82740400003)(478600001)(356005)(40460700003)(8936002)(40480700001)(36756003)(55016003)(5660300002)(426003)(316002)(86362001)(2906002)(54906003)(336012)(82310400005)(70586007)(70206006)(83380400001)(47076005)(8676002)(4326008)(6916009)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 09:53:10.1909 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 040cc42d-2df4-41f8-027e-08db0827f499 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: CY4PEPF0000C96F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5996 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") 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