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 EC76E423B7; Thu, 12 Jan 2023 14:50:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C568840FAE; Thu, 12 Jan 2023 14:50:36 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2060.outbound.protection.outlook.com [40.107.94.60]) by mails.dpdk.org (Postfix) with ESMTP id BEE3940DDC for ; Thu, 12 Jan 2023 14:50:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aXFz2ORR3hVH9wNTCnOskTbxaMxkLybyEUlN4U4SV56yxrzLbCJY5OLCrXV+jaSdi3U09Ap7jd7/blr/j9TlG+6iBPZWhROI6qpqiQSS7+IFu7Y0x6OrKs5k6HqFIRNQryu2lAD8ZglAvbO6JH6gkN9/iipu6yQhWKuA/+m303CmynJY6/AhR1YzAcsKgd3OTj7dyDgxioF2eRbg9bsb3YnKDCETuNsEFULtHzOyA2nBHv+lestujmOLasNijCsde0Cf/MHU1cXyTc7hQhlzN5Tc06NdGETMEH/No7GHwK0kvBVvhLFcY6K9EoYo+7aLx1Pz+CMxbK1bqwin9Z/BHw== 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=tc9K/UNCvf3yLWLMXXLmxQtZB+0HZb7EU0+HI7AGG4U=; b=dH1dp4K0XR7Vzqc0Pdc8vKhNQfnFEJkEb8+IHDfCO37syE0yKUBQbC104fHEjTsoGp9Afbr+5KrfuVn5HmmSSUav9S6efwNe8YJCaz5Faiqw02Y/9uIe2d7cKCQ8sukxJXqgVGapmfFrF5Ap7RuvXehtskNT8RHjfNr9QD5MwP1OBUktW/zeKRq7VBnoK9S17Ly6or7FpoGnhGHUOZRGIztHBcnrQZb+B2cY06T5GBGcCjnrdxJAfyIOccBo2wq+G3NFvybfeTYPYg5iW3EcCg1FATe8hUv5ASMwIF0i5OY4nQ5SgR2ZHeVVDl8Z0A3d7UXTKn/DRmSAuoSll5V+uw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net 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=tc9K/UNCvf3yLWLMXXLmxQtZB+0HZb7EU0+HI7AGG4U=; b=hMB9xxwyudU5P6j/3qxXgUlO4CdmzVYKcXzA/JkjQyk6J+6DM4IfyXFURuaP3f9z9x/1hkqV3fIiP793MyeQcNwumJlDs0sXgj9iWUHhV2yhOYqsASl0efxYXAa3B6XCfkMnH/rqazV6sVsp4D9OIeJXl6yszyHdZELoX77y1ULicvKHDUHKF//P2pYJlcnMKkaigL4Pyd9Qm+BzgmIilfCPCHKpiUokFP+rtK1LFiwzgd4rbZ+402ljZ7gLPhBBzrqD2XyHObQCd0Bl6OBS6ePqsDmi4oK4JBsE9wZe827wvPqLlGqAizi2E1f8jQp7yD4bs/qzlP/jL9vyfigFJw== Received: from MW4PR03CA0024.namprd03.prod.outlook.com (2603:10b6:303:8f::29) by DM4PR12MB6448.namprd12.prod.outlook.com (2603:10b6:8:8a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Thu, 12 Jan 2023 13:50:32 +0000 Received: from CO1NAM11FT023.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::2c) by MW4PR03CA0024.outlook.office365.com (2603:10b6:303:8f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Thu, 12 Jan 2023 13:50:32 +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 CO1NAM11FT023.mail.protection.outlook.com (10.13.175.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Thu, 12 Jan 2023 13:50:32 +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; Thu, 12 Jan 2023 05:50:20 -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; Thu, 12 Jan 2023 05:50:18 -0800 From: Yevgeny Kliteynik To: , , , , Matan Azrad CC: , Subject: [PATCH 4/4] net/mlx5/hws: handle collision matcher for linear RTC Date: Thu, 12 Jan 2023 15:49:12 +0200 Message-ID: <20230112134913.2632849-4-kliteyn@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230112134913.2632849-1-kliteyn@nvidia.com> References: <20230112134913.2632849-1-kliteyn@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT023:EE_|DM4PR12MB6448:EE_ X-MS-Office365-Filtering-Correlation-Id: a67a3ba8-a819-4c66-3045-08daf4a3f933 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VOeaycmRP4h68VKDWcRLfDvE/cXhnXdXpGDrMrAFtHhGvU5WokCR3G5UfjMds5p81xH8qYQ5DKYvlKL/ROKk5E6+YBBJJ52qQpBSY4B4ZpMQ7JU5CEOfSnrykrh/y4+Brj/4c6C5/xVORRvcTkQLCVSbzVW4u+rXzyB5r0hCnGlsy3OqwdI/8v1bVo4atvoYtwlQfftRFcU8X0pgrfw7tNtmNuXlmEBrphE6x2hyhtUKmipc+Ozc6ZhotFTFwTVtPzxepN15HL21O0OfPDvw73Wa2CNpu1QEtBYdpSfGHQDV1cLedQisbGOTiQQ9BPl3Sr+F/2nNEkNw0KQAR3JH/SnFcT/pPF7WQxloxGY0jgz0dBf2pqUyS4bV5gF4SiDxcU9zrE51npxV+F+vDBzhDVhWusRqrj3H7g3zmkcmXFb+tdzL3yaKSsmvU+KTisidK15E+5dxGvT8nmM13FRCFgiQf0WouIQws43NVUqG7OKf9zxMtkXhizyL3d7CWtSm+lNCkPgrdBT3MlFBXo4YRJXXzo+YuV1fqY4S6uroZR64hA3hrPIQPWVdYnusc5JjvXNQtbtaCEvDuYoz5q1nZDmnM9/ldDndOAvxoZswA6+rc0VhU0H3G2wml5D+NlWBHju4lg7JG6r+8tLQb1e795k8F8InaXqZNhx0BwdCqZhXsNkWp1QpxloBw8X9cuWZiZbloBHB70VUeZCZ3zohEw== 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:(13230022)(4636009)(376002)(346002)(39860400002)(136003)(396003)(451199015)(36840700001)(46966006)(40470700004)(2906002)(82310400005)(83380400001)(47076005)(336012)(36860700001)(426003)(6286002)(16526019)(478600001)(1076003)(55016003)(5660300002)(40480700001)(8936002)(107886003)(6636002)(6666004)(36756003)(26005)(186003)(7696005)(2616005)(7636003)(70586007)(41300700001)(70206006)(110136005)(8676002)(54906003)(86362001)(356005)(40460700003)(316002)(4326008)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2023 13:50:32.2980 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a67a3ba8-a819-4c66-3045-08daf4a3f933 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: CO1NAM11FT023.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6448 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 No need to create/destroy collision matcher for linear RTC, because it has a constant depth of 1 STE - packets reaching any STE in the array will always match and perform the specified actions. Signed-off-by: Yevgeny Kliteynik --- drivers/net/mlx5/hws/mlx5dr_matcher.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c index 60865bf562..d509a2f0e1 100644 --- a/drivers/net/mlx5/hws/mlx5dr_matcher.c +++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c @@ -925,7 +925,8 @@ mlx5dr_matcher_create_col_matcher(struct mlx5dr_matcher *matcher) struct mlx5dr_matcher *col_matcher; int ret; - if (matcher->attr.mode != MLX5DR_MATCHER_RESOURCE_MODE_RULE) + if (matcher->attr.mode != MLX5DR_MATCHER_RESOURCE_MODE_RULE || + matcher->attr.insert_mode == MLX5DR_MATCHER_INSERT_BY_INDEX) return 0; if (!mlx5dr_matcher_requires_col_tbl(matcher->attr.rule.num_log)) @@ -972,7 +973,8 @@ mlx5dr_matcher_create_col_matcher(struct mlx5dr_matcher *matcher) static void mlx5dr_matcher_destroy_col_matcher(struct mlx5dr_matcher *matcher) { - if (matcher->attr.mode != MLX5DR_MATCHER_RESOURCE_MODE_RULE) + if (matcher->attr.mode != MLX5DR_MATCHER_RESOURCE_MODE_RULE || + matcher->attr.insert_mode == MLX5DR_MATCHER_INSERT_BY_INDEX) return; if (matcher->col_matcher) { -- 2.27.0