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 A72BC41C89; Mon, 13 Feb 2023 14:38:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45EC342D2D; Mon, 13 Feb 2023 14:38:29 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2061.outbound.protection.outlook.com [40.107.244.61]) by mails.dpdk.org (Postfix) with ESMTP id EB58C42C4D; Mon, 13 Feb 2023 14:38:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ocGdslyjVnVzRke0iFPLiWpONz3xlLBHpbtXY94TaZ5vd3+O+yI3CHRI5eBA9VKxQc5jPYhna4dhnTrigFi1lyXB8agg4k2w/kSrgPPcRRXMeAwbylCW4tdSKbqYouUa1J6xYnUaSk//TvUI/Y46OD4EhkIM5ncvNIy/yP9c5ItU3Gbndws9qMeUFMVCAq1BXxge1860UJ2ZA2ZWbOQQyaJnNHlOjtCyWHcVTSoKkJN1R2U5YpYFhhHcithFWLVYmizUxU/qs7OV5QNrusoIeLOm59gBm+PS1cOymZwg9ZzZNglBTCCDQf1nQAO87A2pIJaJNbJeuBoOJQT4t5EuAQ== 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=XYHseib7D29B/JKABJaJqnzmBMqUfR/LgWHF5qltzXo=; b=MUmVhNGrDDYKDLwrfmcYCDfO+lKVyNLbPjKeP+s/BZQCYC/3/aU9PI4kBTFaSNV01CSVa0uQMQ6lZcUfbnMRQm1CsCwwW5rm+Yj+AEZhg/MKq2xGugT9Uf7APbdhI8Sb+arkm+bA9znHTFr5ivueeBF1sx2/QKKfMICPSJhrj4k0IEfptk7MmPmZlRWg9yP48fj13Kuh2vb6ZRtol+wyDKG48G3eb6PURN8DAD0edUyFV+H8VY3z00E1JOru5TITWxq5gURlGKgMY+D6RqlieD1OC0+GPu1qunV7f5shxQXoQCcE5aVY1z2722jgTzbwmMcBZXD3Ld3E/hp8+YmTeQ== 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=XYHseib7D29B/JKABJaJqnzmBMqUfR/LgWHF5qltzXo=; b=mKjp1+YzvUVdL3+n8TFenfkqjsTL3IJDAbBO2SGVOX1Xq8yEoiV9cUWqks55aHvffFDHMXCa5cYnh2ceEMETOEYPVaf5xFDPfBGiGAZHM8VvPPHrQ5tSf0l3B561WrqUu5ZBYMwewDOxoupmBK9f3kYasnN2ikUXwjlcypEt6PCAYnTgUxL5V+roR+OBj1stIQoffz6taCR6yijSlpg3Anbn3AJDGnXMmQ+Qw7QilJX2nzko1e66PeZVQk1lLhVI7Wxh+qndz/AyKkEu4j8WN3MvGlYtYuMqZdFoJlbvHf+WJ77qmxCofDamJmPnu2y+CZkHitcRJxyQSo7vsWrrFw== Received: from DS7PR03CA0018.namprd03.prod.outlook.com (2603:10b6:5:3b8::23) by DM4PR12MB5723.namprd12.prod.outlook.com (2603:10b6:8:5e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.23; Mon, 13 Feb 2023 13:38:24 +0000 Received: from DS1PEPF0000E63A.namprd02.prod.outlook.com (2603:10b6:5:3b8:cafe::a8) by DS7PR03CA0018.outlook.office365.com (2603:10b6:5:3b8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.24 via Frontend Transport; Mon, 13 Feb 2023 13:38:24 +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 DS1PEPF0000E63A.mail.protection.outlook.com (10.167.17.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.8 via Frontend Transport; Mon, 13 Feb 2023 13:38:23 +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; Mon, 13 Feb 2023 05:38:08 -0800 Received: from nvidia.com (10.126.231.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, 13 Feb 2023 05:38:05 -0800 From: Viacheslav Ovsiienko To: CC: , , , Erez Shitrit , , Dariusz Sosnowski Subject: [PATCH v4 2/5] net/mlx5/hws: fix disconnecting matcher Date: Mon, 13 Feb 2023 15:37:37 +0200 Message-ID: <20230213133740.27005-3-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230213133740.27005-1-viacheslavo@nvidia.com> References: <20230206095229.23027-1-viacheslavo@nvidia.com> <20230213133740.27005-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.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: DS1PEPF0000E63A:EE_|DM4PR12MB5723:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ff2bebb-ae72-453b-0e49-08db0dc7944a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dRVYpxIWhaaBgQ5g/oPKWT+iIOTQ4Iwu84LSnzWi6KVrFrDkUfLbG3sWroRRFyeQL8OBaKdkZM6SZ4TTmTueBlaWFq6r/bnC6rwSGtRDhjEdQQedv2L2/ODTt42i265L1VtLeCioNQHtvl64+OoP4rwWomsEKlb5pdOBtdVR/xkwux7zTmuJN56AKMVWncTyZN0EivxWo3iaxqYfCmxg1kQrW2a1kZOyw5+nyDMX9ELx38EflbYk19/RVDuW2yHkmSEsd6Qcj0jdLE+RNvrhipCY9LZUGgT9RikLjSJC3835Ub0odOD5hWtYdlWRrdvm2HgkRALnhdMCuQ9cWmPWlEAIMnboAnanS2da1d5TsPt7dt3yLC2Cav+GNZmlw3xA3H2b+TyDocrepvfWPpgPKSMqYICURdbvOlnxUXcKpKBsfmhwXqf4l7iqyti17QC0bIEFxtF6Tn4Yzt2bh2ekfoW2yUPPtSEb1hrndFxhiFLDxBh5lOODJitKLbDxVH2OBgdcZwQmoCG+g91G/oWYZ5kCVp0oF66qnhaQFfC3p+iFdN6UH7D/BB41ssi3/0TPR9wOdlcOnChFAIBPmoejQei+KeDrhQN3tXRNDoUKr8jcMlzpgT2ZrwAkS9alO3gjX+CtoHdNlAKOFwW9FxBisO9thSRyG3N/HMt+ijI7TdO5pUFCwY6QfYXUrvMz3QkE6lSEyq6kdnCYTQteB947zw== 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)(376002)(396003)(136003)(346002)(39860400002)(451199018)(36840700001)(46966006)(40470700004)(1076003)(478600001)(7696005)(86362001)(6286002)(82310400005)(26005)(16526019)(186003)(316002)(4326008)(54906003)(2616005)(8676002)(70206006)(70586007)(107886003)(336012)(356005)(40480700001)(6916009)(6666004)(450100002)(36756003)(55016003)(47076005)(426003)(8936002)(41300700001)(5660300002)(83380400001)(2906002)(36860700001)(40460700003)(7636003)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2023 13:38:23.9028 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ff2bebb-ae72-453b-0e49-08db0dc7944a 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: DS1PEPF0000E63A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5723 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 6af493d87a..1fe7ec1bc3 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