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 7252A41B1A; Sun, 27 Aug 2023 10:18:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED06E4025E; Sun, 27 Aug 2023 10:18:11 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2082.outbound.protection.outlook.com [40.107.92.82]) by mails.dpdk.org (Postfix) with ESMTP id 134D34025D for ; Sun, 27 Aug 2023 10:18:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=er2DKXD/3LawX50IlDX3+lDZ6RUJQkrUU4jxkF5jubPg7lAMNPQtGdqycGCElkeA7nnZRPaN+3BROCBNnKSBCp6TnX7W3POSMq1eQSbAZFxRBIQuCzurSyU6qTWCuRFeddcZMT5XOEl9NMtivHUmeq7Vu4n8zBMzqvt7mzUJAv1iHABXNLfAvCnk0SoEyT5XWNx+JV/Mapkj4C9BZFjBIZ20kxAxE4MfXUOhQ9OYm1kJlOhmGegMfC/5bmV/R2IMdNgdFp81wA5NfVyAkoA8aWaXxhXrUJRfcK7/mbIcKjjb38qSE+q4Uc44nB8yD8tGDPwx4ZYlMwfodioBwNEefg== 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=ipBGhRRxHJDxKTegBJraripMd456L3O1iKE+8hnvmZo=; b=oNrXMTSlcquzKs8fIGJ2zzgsQhcNYkt6yI7FDDg9NoCrmHwb8NFHUZjaktpGQ1trNtyea20z1/lFFDHlWlLpcf3eUAOUNtTmVdtupWYJAVJoWh1/Te6JVhzy8Fv+5gS4+GYMal8wvOGuHsd79J241J7KKM+oDNJezTodLYtnWGALIeS8/Olaw4cWu3lsee5pEwqTFyexLIzjDqjULLM9KdtwhWAVy4702tcRCLGVbBCj1q4hQ+7RqB7iZ499x/vU1ydIw58y6rBuAWelanCq2zknuLoFhP5o3eQb6Ehj43/4vpv0q6FpxuMUDcQr1f2Od4uR6PjQ7+QHJ4+/ziH7pg== 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=ipBGhRRxHJDxKTegBJraripMd456L3O1iKE+8hnvmZo=; b=Bu9ONz3PeSVP54mwSCfAlxR9BRGBW9wmroqGWtU6M/m7naHQmHJUJfQxJeS/thQTkCVRzcjCJEM+m3aiYkoWykzdUYJZ7WtYTK/LFiAhMcOdnU4BhPHbse94gQa4W/NFwUdZdigdJw9v20uOFJtidg6nwENMS94IPGfNeHs0eU4Nk0lp3qdJcFd0QfdjQCwkM3/a/rtkUgkZI7zkzwUZ+RkJph/5tV4LNTXxHg1QMHiufJnHQpe4xwcKm6nGYVOIcCmivevTR+HVYVBgwLFmUaHEfynlUEcpyEeblAArMBK9ysE8C7TAdPqArQuQypLNieVjvM1vOa8zZjPzCyxfIw== Received: from CYXPR03CA0040.namprd03.prod.outlook.com (2603:10b6:930:d2::18) by DS0PR12MB6461.namprd12.prod.outlook.com (2603:10b6:8:c7::22) 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:08 +0000 Received: from CY4PEPF0000EE3E.namprd03.prod.outlook.com (2603:10b6:930:d2:cafe::c) by CYXPR03CA0040.outlook.office365.com (2603:10b6:930:d2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.34 via Frontend Transport; Sun, 27 Aug 2023 08:18:08 +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 CY4PEPF0000EE3E.mail.protection.outlook.com (10.167.242.18) 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:07 +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:02 -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:17:59 -0700 From: Xueming Li To: Ori Kam CC: , , , "Ivan Malov" Subject: [PATCH v2 1/2] ethdev: add new symmetric hash function Date: Sun, 27 Aug 2023 16:17:44 +0800 Message-ID: <20230827081745.31906-1-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: CY4PEPF0000EE3E:EE_|DS0PR12MB6461:EE_ X-MS-Office365-Filtering-Correlation-Id: 3668634d-e90e-4c77-af07-08dba6d62526 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gKc7CmqqsO7OWTqDsrKr4FCQ9r2nZ8+VMvak1t+aQ1YSupgenjyoXAXKwtSXjVeHN+v5Qxzo7jamdjchK+mXec9uATFSCQA6N1RXveeGChIGLv+fci0s5jCnEa08xDjV7INsLmlxbAB1llF63cH1SLRI2oo4WEEB6RF0AEOk9TRLxYD/JkwWnl5XDYOEIpWO2vhWO/stfTbY741GDyXRyNTWSTFQf0EIUtGqgFy2ILMboOmQJiABVE5oxaHyrtL1CnrYUf2YYAg7XPV8ihO5rumtHUlpdOYEZNu6EHV/4YHuyUEXqCBRw7TGcZvgWY1VIbavR7HgdGOiAKTpibPkKZ52Hxdu8GvG9dOcAPvlRcbPrhJ3bXwWxuUAfhExZ9Io2rleLo5JC6/OQYG+IGU+OM382+t9rErWt7tYRDgR2PqVGf7vNpaLw4bui2k/WcgRTr1FzYcZkqLL9zVW6URHoyrkZnl+CJGb7A3HCpJpMJHTOSpC3FZM48YIdw0sSDE22vXCQLMxqV01qHG+x+8wXYFZBU5bouwY0dFxJs4fQoqUGIgqjoql6fXtDgsr6Xwusd2WC8DWtiWC2+jKJepqDqvA7A5jXLobp4Y5XEo+4M1Yppn6gm+klKQotxP1SFX4RhF5p68rCde0tVzJd1YKzk0ZZS7uGJZCUhacGPW2WaqYGq9vZU2Hxo2/fMKOhsrxxfikrpSlWf9j2T+I5Gq5irxrmqAfMbud5BOSZYoX+mPKL2Iha1Vw/CJlDSlXCHsC 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)(396003)(39860400002)(136003)(376002)(451199024)(82310400011)(186009)(1800799009)(40470700004)(46966006)(36840700001)(2616005)(36756003)(1076003)(16526019)(26005)(40480700001)(86362001)(55016003)(478600001)(41300700001)(36860700001)(8936002)(47076005)(8676002)(6862004)(37006003)(70206006)(426003)(336012)(7696005)(6666004)(6286002)(70586007)(316002)(54906003)(6636002)(4326008)(40460700003)(2906002)(5660300002)(4744005)(356005)(7636003)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2023 08:18:07.8311 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3668634d-e90e-4c77-af07-08dba6d62526 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: CY4PEPF0000EE3E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6461 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 The new symmetric hash function swap src/dst L3 address and L4 ports automatically by sorting. Signed-off-by: Xueming Li --- lib/ethdev/rte_flow.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index 2ebb76dbc0..4f4421ca50 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3196,6 +3196,13 @@ enum rte_eth_hash_function { * src or dst address will xor with zero pair. */ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, + /** + * Symmetric Toeplitz: L3 and L4 fields are sorted prior to + * the hash function. + * If src_ip > dst_ip, swap src_ip and dst_ip. + * If src_port > dst_port, swap src_port and dst_port. + */ + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT, RTE_ETH_HASH_FUNCTION_MAX, }; -- 2.25.1