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 6DBEA43C06; Tue, 27 Feb 2024 14:53:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD8E740E28; Tue, 27 Feb 2024 14:53:05 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2044.outbound.protection.outlook.com [40.107.92.44]) by mails.dpdk.org (Postfix) with ESMTP id E090940E13; Tue, 27 Feb 2024 14:53:04 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dKmJeYXt4r7G7rP42rT0JluCjl+MoyjI5XxP4zh/vfS7qSVP2aXlheJRy1cJbywZ8jJMEqOZzlUUimmJoqLx+zT3gGCcRmAUBiaXJA4tsOF3okVNv2qcklTA9JzbvlCrEj/v6LI2VBLwArd971vgWeewWPNFWAwLMT1jBs0HftGeThD6XDHi4JmsUxGHF0IP2HlfvYXMJ/YQtdqlBFwmxmbWIgoMstgbr2ro9RJ3DYwjB467wNrKnyAXdAgxGEa624YVigcJDREIckVtW/zumLrfgnGZpetFMk5coitBLK6U0SaJ7YzoF+Rlh6ps0jOpSuL5/XAR111j9FBKUuVOLg== 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=GtnKMQPhGqccTN9moXCGU+pMVn3qjZs3nZglQLQjdf0=; b=LtRRzavsC7foCg68L2O7j5fuT6OS7jXxkebDE0Bz0DlpA3dHyIrSzTKQ/XSUOjrDLf3A8sI5bEBEtu9oFyzmPyN1VwUndfgp0KLVskKLnOPDGrgLgnRxEuWaI/jGR8JAkFRteg9E/J6sTA0DQGMn70lLyoerWbXYtIsnEXtTwXxhO++kg/Yy1tUeedGqlFsLBnyJoAAVIFTJ0YB8ZUJmYk92f6cNCaLoOQPw3COlqh2Xbwq9HtjTx7RSLmyeOXzWFoMvVcBbUdv4pojhKefHWFa7JwcxbgDlkZr1Hgix1nBzZ2BXUd2lgjRBL2JLxqEPNt2YL2+r3WdUjax+cRcx6w== 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 (0) 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=GtnKMQPhGqccTN9moXCGU+pMVn3qjZs3nZglQLQjdf0=; b=WiB/OwmoBgmXXkfPn785zLMgWjUYGtOGh5V1dyMliA5UjaP2jOPlhNk08cpgenftuTRGSreVrOoufsLerkS9oBSs4/wz0q7hC9tX12AlXWTerIMPQmqrsiJwJ7Jj+F6Va7fo8OMbi5o+AcyxfeSQQ9NBIIsfb/GFhfaCgxEF5xY0Hj700rEMe7zPqE8/haJA4D1ZttVTXuHELKGibVDk8s4tUrNPK8UV44Dk2uABns4Vu/Ojx+FK8BC5SOHfaPB5IGdgb80qLAzuSO+kbgA2298tEh/bdKuCEcGZ6OiRG+EMAQNirkvWyWMMOnDG0sTmcSv0US91oYtA8eWWZ8ml7Q== Received: from BY3PR04CA0027.namprd04.prod.outlook.com (2603:10b6:a03:217::32) by CY8PR12MB7611.namprd12.prod.outlook.com (2603:10b6:930:9b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.34; Tue, 27 Feb 2024 13:53:01 +0000 Received: from SJ5PEPF000001CE.namprd05.prod.outlook.com (2603:10b6:a03:217:cafe::40) by BY3PR04CA0027.outlook.office365.com (2603:10b6:a03:217::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.27 via Frontend Transport; Tue, 27 Feb 2024 13:53:01 +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 SJ5PEPF000001CE.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Tue, 27 Feb 2024 13:53:01 +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.41; Tue, 27 Feb 2024 05:52:43 -0800 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.1258.12; Tue, 27 Feb 2024 05:52:41 -0800 From: Dariusz Sosnowski To: Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad , Alexander Kozyrev CC: , Subject: [PATCH v3 1/4] net/mlx5: fix conntrack action handle representation Date: Tue, 27 Feb 2024 15:52:21 +0200 Message-ID: <20240227135224.20066-2-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240227135224.20066-1-dsosnowski@nvidia.com> References: <20240223142320.49470-1-dsosnowski@nvidia.com> <20240227135224.20066-1-dsosnowski@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] 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: SJ5PEPF000001CE:EE_|CY8PR12MB7611:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ae9908b-2e78-4b1a-73cd-08dc379b69ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DeTEzWmK9yprsMX0qcrtZ0a8Zgadz+9TBMCAH3+uCLALdcWbk2lx7pp+ctSYkeg7/31ZlvjN1rZtxWWLJxeuhRH9Wc7sxurNNB0Kg2c1Wi57JHYrNqX6Dyk66erJIGf2BQRI5fOUPVqRmEJjxulSlvqzmgaA+2pTHOwRVqntanUwudmpeEJNWyh6GOYwJUFdsqRcqfoNVZ7uy6jO5cH32dc4x3E+djgiUkmUza5GjllR3//baHxz2QQqbLHuuEc4e13rhN29gDv62UlSFJ8XoxA2tkh21snYRE/oWiKOL9blZgllSliic3YGlfOrl9aY3tf0t9IVD6NiJOI5NxBtKwC1H2VfFgLVuMoE0SlXOdAf73VyXms1rtlPKDu05TDftm3frg+XC56pbV5jJJO9+IZAkkEE2KTKIhBfz/wU/dO7hwfJrnvWAeaKyxRMoCLnRVDDHOZURt+U6v60qmzRLKkrMd+Z7vzjk56hpiXWxQIlcmOpHYeUxXJPQ0+bj5kZcMLACXzHaP77gF66gpEJB+qjcpS4VEanzLbMCDh5hWCmdBVNsCuvUUHgfIkl3VFg9dlJRvJBRTCAIil2UfDrEwAoCxRAMdrNDlDuzTfUlBMe2uCohsY77oQa5qh26NwBzfuZ1sEHfVHddUNelPxvLdMgrGe2JiT2EugFb3RXfXp+27ixmP01vjPWjqGfWcSp6czMc/x3cryWjKEPRNCSP6MsDJg1hiuFByJ8YybcbZ8oIhjuvAiDK3fsYJXre6W2 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:(13230031)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 13:53:01.3805 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ae9908b-2e78-4b1a-73cd-08dc379b69ee 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: SJ5PEPF000001CE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7611 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 In mlx5 PMD, handles to indirect connection tracking flow actions are encoded in 32-bit unsigned integers as follows: - Bits 31-29 - indirect action type. - Bits 28-25 - port on which connection tracking action was created. - Bits 24-0 - index of connection tracking object. Macro defining a bit shift for owner part in this representation was incorrectly defined as 22. This patch fixes that, as well as aligns documented limitations. Fixes: 463170a7c934 ("net/mlx5: support connection tracking with HWS") Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS") Cc: stable@dpdk.org Signed-off-by: Dariusz Sosnowski Acked-by: Ori Kam --- doc/guides/nics/mlx5.rst | 4 ++-- drivers/net/mlx5/mlx5_flow.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 0079176ba3..db47d70b70 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -815,8 +815,8 @@ Limitations - Cannot co-exist with ASO meter, ASO age action in a single flow rule. - Flow rules insertion rate and memory consumption need more optimization. - - 256 ports maximum. - - 4M connections maximum with ``dv_flow_en`` 1 mode. 16M with ``dv_flow_en`` 2. + - 16 ports maximum. + - 32M connections maximum. - Multi-thread flow insertion: diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index a4d0ff7b13..b4bf96cd64 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -77,7 +77,7 @@ enum mlx5_indirect_type { /* Now, the maximal ports will be supported is 16, action number is 32M. */ #define MLX5_INDIRECT_ACT_CT_MAX_PORT 0x10 -#define MLX5_INDIRECT_ACT_CT_OWNER_SHIFT 22 +#define MLX5_INDIRECT_ACT_CT_OWNER_SHIFT 25 #define MLX5_INDIRECT_ACT_CT_OWNER_MASK (MLX5_INDIRECT_ACT_CT_MAX_PORT - 1) /* 29-31: type, 25-28: owner port, 0-24: index */ -- 2.25.1