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 4B7AA41B1A; Sun, 27 Aug 2023 10:18:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43AD840264; Sun, 27 Aug 2023 10:18:30 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2079.outbound.protection.outlook.com [40.107.95.79]) by mails.dpdk.org (Postfix) with ESMTP id 4E73040263 for ; Sun, 27 Aug 2023 10:18:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L7c6O1YYEbgb63DxbF/Mc0EVko3PVBbM1t6wLBskOGVpJGutv65xxYLhhxSDOuWb0H8qoc+q5rg2nxfXoE8frEoEZcwWZe9YECfQqQIN7I2V+qNXCg48PzMOHVtuhtJ6NtOV3GnWDHrGOQDBFd4vda9IV6215r7utbLa5vJl57catDhy6380UOsRjFB6HGXJ5fvBfQyAm4QpsPct3iyK5L3PoW6L4c9Q74JolYCcKJmDh1r1TzHj0uYSehizrBWRocc61jUsy1Vh4FRkim8Q9/GX7ECBMcRNNo07XfjrOHrzB4pRco9jrX+daFz8rfWar7/A4l7hp/6i9GZadwnSRQ== 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=5LJS8bWLYViowpUM0EACxOBDcM7n1dgfybifF1x98ZA=; b=TP5rXJYAu6zBFinpilq1woeyVmTDtq0vxw6+PlRQJzmbucdFr9bAnWSxv0eePsACyMBwA/IP8KrnhB9K5bVbAE6r5aiyQxN9Hnp4NEYVYYs09PAiGNCj8dfC7SkqKFu71s3ZJ1/5Se3BzrIxlN1G7CLAD5eXIXotpkMXKYtrPKMDSeyAnhMAIhkM5jtHVRABrLI5uGouzx4wpP/Ig/ds9w64qvZbtnl6gNWa03rYLkWmj0DtubqphSdPeNF//++lPZhbRz6CDY/g/mK8zQn3+aI3/wg65BZ4p8IxWciAiPiChusTU84atfoAiY6j/oj/cBfwWHeQZ+ZN1P0BP/P/Ww== 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=5LJS8bWLYViowpUM0EACxOBDcM7n1dgfybifF1x98ZA=; b=IrQ+EyVjlyUryW7xN5cbnrEXIIYTaskWTOTaaY3U/Uci/o7auxXaQLEOpUmU+MTBmEzMXSgfF9spdZBd+DDHyAPRXr81fNgNhorL8meddbvWDR3EBtlZ5EKbGTcGu/0Z+eLZ8qTDL9WobkjabLV75NPkw/IJgQ+aQY451Kq+BEk6gtcU+CRet5B54tbQOi1ckNoy/iwW5KXjmArO4/sB3AFWEqyXSOxxWQaATkV6qiREphTkRYKhWkUSR+uigDZPzoYd+OEyaqhRKrF/RBSC9cZpNjpFvZnSjK61cP2pNIuBWxWTcJdQXMV66mi8ciy7LGz5Cwo83duAL5nglOJcFg== Received: from CYZPR05CA0029.namprd05.prod.outlook.com (2603:10b6:930:a3::28) by CH0PR12MB5138.namprd12.prod.outlook.com (2603:10b6:610:bd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.34; Sun, 27 Aug 2023 08:18:27 +0000 Received: from CY4PEPF0000EE39.namprd03.prod.outlook.com (2603:10b6:930:a3:cafe::45) by CYZPR05CA0029.outlook.office365.com (2603:10b6:930:a3::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.14 via Frontend Transport; Sun, 27 Aug 2023 08:18:27 +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 CY4PEPF0000EE39.mail.protection.outlook.com (10.167.242.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.15 via Frontend Transport; Sun, 27 Aug 2023 08:18:27 +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.5; Sun, 27 Aug 2023 01:18:27 -0700 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.986.37; Sun, 27 Aug 2023 01:18:24 -0700 From: Xueming Li To: Ori Kam CC: , , , "Ivan Malov" Subject: [PATCH v2 2/2] net/mlx5: support new RSS symmetric hash function Date: Sun, 27 Aug 2023 16:17:45 +0800 Message-ID: <20230827081745.31906-2-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230807115456.17478-1-xuemingl@nvidia.com> References: <20230807115456.17478-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE39:EE_|CH0PR12MB5138:EE_ X-MS-Office365-Filtering-Correlation-Id: c205aab5-e213-4e4c-d746-08dba6d630ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LygSYgDKLjh8xV6TAVtLDMKSQ2iknbzeQwWa3yQ+MFhIKeLB9AURTmECRqjWWTWbVFqGIwDpqFrnWDyFM0ksLFDTFzlPgn+OvZhPrn7+oZpd7Gz2rzzt1NvALv2QN5Eb3l2g715PErkKPOQbjTvjlM+BX0Mb4uPQYmrKGYK9Bx3tm/Vo8nNoq8bJ7eSXqGLxKVjVCGLCQU9kZnwYKARBiBc+QesP/aI8toxBeApP5yUWqqNSO9Azb9XMOGl8VnPKkqKs4eJYBwDpVQrEJzuKk3mehsY8Hc4skq/DwFlvks9L+ENZG1mnIQOJX9EU+WcmJkEV53fkmtsqObwcpLi6sozHj/Djc2XyB3I0ywro2+l9K8fqf4zTsIAYt52oVKFBp4ixc6hUjcAUdN4BpFHZ8EIvSsKhcOYMXcHsHnyuLjwKt7yNb8KbJVSrbJCuJTvBgMXq7WjJGfRaxn6ZeVSVyXw4G7rr4XuN+v1Rm51ZIrqSWJSyf0cS6aHg0agWOIgzIDQm9sNE0dHAVloBkmCAVhVNnIqoDABhZgWIXLMPDdZkIT4743Pz5ehU2Dn/RXXyivrxciaahU/E4EbQQfmimi8i08vEiyY+xqUlA6ELExw7eZvhczl/bcbfZE3FzGFDqbvIMPQYYrevtMaHv11/TO2bfyI39jfECf5YGNSlb8zJDvpKArTeOvNae67Ed7SehXLkPQ2n7SFiloVx2Nd51I2rlZBx+uGLXdGmLSNy2xvt97CWHfvReXfW6UJ+iEpC 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:(13230031)(4636009)(346002)(136003)(396003)(376002)(39860400002)(82310400011)(186009)(451199024)(1800799009)(46966006)(40470700004)(36840700001)(4744005)(40460700003)(5660300002)(2906002)(4326008)(6862004)(7636003)(356005)(82740400003)(40480700001)(86362001)(55016003)(478600001)(83380400001)(16526019)(26005)(36756003)(1076003)(2616005)(7696005)(6286002)(336012)(426003)(6666004)(70586007)(41300700001)(54906003)(6636002)(316002)(37006003)(70206006)(8676002)(8936002)(36860700001)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2023 08:18:27.6003 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c205aab5-e213-4e4c-d746-08dba6d630ec 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: CY4PEPF0000EE39.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5138 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 This patch supports the new RSS symmetric hash function: RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT The new hash function makes symmetric hash result by swapping the source and destination IP and L4 port automatically. Signed-off-by: Xueming Li --- drivers/net/mlx5/mlx5_flow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 3a97975d69..e162baa7da 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1456,8 +1456,8 @@ struct rte_flow_template_table { #define MLX5_RSS_HASH_NONE 0ULL #define MLX5_RSS_IS_SYMM(func) \ - ((func) == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) - + (((func) == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) || \ + ((func) == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT)) /* extract next protocol type from Ethernet & VLAN headers */ #define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \ -- 2.25.1