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 20D2643BA9; Fri, 23 Feb 2024 15:24:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D74AB40E36; Fri, 23 Feb 2024 15:24:04 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id AE2704021E; Fri, 23 Feb 2024 15:24:02 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RnaMt0aADAhQbzVhAUd9c+acpCknHCYzsRH3iNUxegXgbe2838GoqjJjJn8AGIHoRof0DTGLLHrbYb76mI+G4CH7+N3ZyNOK8Gf833tjDW+TpDak9dQnjOepOtfI4lBhBiDYDzggQnmTn3Q3hpcN4K7hzEnCTtNKRkQ//Lk8QjFO8BazZiZNJE+upTePMfHPf2xMjjyL00iHpw/3f9+Z6Qkg17t4+G6uBwhH7oh2xX0N9xSaUvJN+dzkljNmZwIrbiyqffZwXZak4PjXIr8rTdL0oDrpKspNtFkIODx5t+kV4foNqn0JyyIRstVg4aD9THxUawcJ3k8O0c/vLiN09Q== 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=baN/XKYo3xqbgn/wGz/IqttLp9yRJC8i7LX6kyAsWlA=; b=T6kl7R9bX/Izh8s9e64TSyO3d7PahGp1v7+2BTkHhrjUMqTpUR025U09pvPgoU3FUl4g1AcyToL/OA8f+CXGr6nWUVe78cam52v9JS/WMbkTZ2WVU3gVVxal9hBIbrcNfeKCSS+yklCU7IQfbVZBuIvP8l7580FNgoi9p6rHhzq3sCG3011CeMd3jLb93TH0kqbD0et4sjkRHmiP9vKO4jHds3Bmdho15mE4BGk4HI81DvhFytsSk7tu0VMZUnTSg6p0cE9PhlzhXf7RKLmivf5OcmQKbaFL+N9ECKokds3tsW7FfnTrayZlvVkqr4KxiJHJueR9aiGWa9QxNLeobg== 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=baN/XKYo3xqbgn/wGz/IqttLp9yRJC8i7LX6kyAsWlA=; b=MB+kherskdZm1ewG5+aqPAm8COyiFs+a8k4LKSqw+azOkv4xDamrcPD0afopf2xt8bOe1At1VwrbPCdrZ/iUdG00juSBdGt3n252UG9nwA+RBT2IAA5JaYeTqaq8ZefnZ7OSDnRH3jO84dncQBQgXZCwMNGE/YJmokUjCsDfabgykep6fzmtQ0+I3zQjszkIJQG2vxKhPqPl31EAn5yVh84eLDT6xdN5JsMbMeCsFezoGekBuDDxtVyQy5J3xeTbm+G5oV1Ms/xeuVVTbKkZszJMGRvvO8v7J+9NEwCNOfEWPj326SABWOx3kzHmArboWxg6/7UuatBSJK+oI5Oiew== Received: from SJ0PR05CA0027.namprd05.prod.outlook.com (2603:10b6:a03:33b::32) by SN7PR12MB7833.namprd12.prod.outlook.com (2603:10b6:806:344::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.24; Fri, 23 Feb 2024 14:24:00 +0000 Received: from DS3PEPF000099DD.namprd04.prod.outlook.com (2603:10b6:a03:33b:cafe::85) by SJ0PR05CA0027.outlook.office365.com (2603:10b6:a03:33b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.15 via Frontend Transport; Fri, 23 Feb 2024 14:23:59 +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 DS3PEPF000099DD.mail.protection.outlook.com (10.167.17.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Fri, 23 Feb 2024 14:23:59 +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; Fri, 23 Feb 2024 06:23:40 -0800 Received: from nvidia.com (10.126.231.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; Fri, 23 Feb 2024 06:23:36 -0800 From: Dariusz Sosnowski To: Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad , Alexander Kozyrev CC: , Subject: [PATCH v2 1/4] net/mlx5: fix conntrack action handle representation Date: Fri, 23 Feb 2024 16:23:17 +0200 Message-ID: <20240223142320.49470-2-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240223142320.49470-1-dsosnowski@nvidia.com> References: <20240221100145.8234-1-dsosnowski@nvidia.com> <20240223142320.49470-1-dsosnowski@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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: DS3PEPF000099DD:EE_|SN7PR12MB7833:EE_ X-MS-Office365-Filtering-Correlation-Id: c3eadb04-e588-4ec3-49db-08dc347b13c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a8bBwWlAXTjk+0u1BPj6vSycNnzJb59R0o24wsEOttlDWNfCgNMaSM74d0Il3i53prIpPxcXYDJyjz/ytjM/bVHl9fDhdN3jIxP0QSum2oWQp/KOS7EHXD/t8SVyjz9SpHyn2RU0GYjzpcQwvnHy6zDdDrDP6IkEhIGYgUg8rsftUuDHAg/eadE5eI/iaGnHxhltCz6XkI2tzO6PDv4JVdaJ6qCKO326PcA3gPAuYB8ZIIXIn2UMZf0TCwJQEu1JK76CoD1uw8DdiJVr5Z6zSN8tLmi/CuoU7y1M8vRUN4VDuaWI4MA6TnFx5bsJcCNOEpcbKPnu0qpiu9N555ZjursDh858or07uQMgMu5kbDOqWYYQGeaHmNlv5h1U5HUp9U156rSmHvW2GuUdMHS/rA24po9u4ELkI1fm/F/fD389nmEBtXpq5MqfZ/xuwnhNviT8Dup/9G6Ak6DjOo/HDEKBMzza24SQdr9AAWUO/crXnadG5JKwM1Ge/FFOncGh+zgIZ9thj0yiPuVGf7ppHK4Dn8ljlx6Mjea5c9cnMCo17cqbVDDUuVChlHNfIK+esMTur79Si+Z0uKQ9erp7tzw/DgHbMEy9gPosAR+5S+F+W31XMxAI6L9l9Slndp+9urK7ik6GgSuHB8wMBEhH/Kbj4WND1fPX7Cl+qKUtTt0= 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)(36860700004)(40470700004)(46966006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2024 14:23:59.4051 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3eadb04-e588-4ec3-49db-08dc347b13c4 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: DS3PEPF000099DD.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7833 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 0d2213497a..90ae3f3047 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -783,8 +783,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.34.1