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 49E86A00C2; Thu, 6 Oct 2022 17:04:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EABC942BF2; Thu, 6 Oct 2022 17:04:00 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2061.outbound.protection.outlook.com [40.107.220.61]) by mails.dpdk.org (Postfix) with ESMTP id AC940410D3 for ; Thu, 6 Oct 2022 17:03:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mbmvN3HlN3NtJfir2Ju+x4MAQbGDyZV1zbMOjnmLu6SIde4D7kH2TUXCcwbYeifrl3JmM+lCkd+JeGR1wTu3yMXee8Hdt+zGYfw6JAe+me8hS6wFSia8OmYoCGUci4k0PQFQISGY94NIMc9IzATklmbs1+/gBsXExYqFGyuvaA7F+wjfMQFTrBu5hW/jN0PE0EaRGR8ond/uFM12bW99dqTVPjOouG1XRFFNY31Dcc+T+9eUMkqzakbNPXOOrajZy0Ha5fdUuYOh7brOSgTbvRu8TgRVY+PR5OjKOZoR/RW68XGArmuCJz2ImahwFEVsLK2wrSRIEokxqVkBYRWuVw== 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=mELg0JuI4bVuz+X40UfCGB2AytjlWuI7fbRzyc0aQIo=; b=Q1BEeEeiBwzFrCPyEgUY14pc5A9RqesoMYUCRqEj6C18d1fTs4/XgJPJftGpYd6JJALWZ2wR24pjGzAsKeZBqxO/sAPzmGvLTWZbMJaF+IrCl9ZgckQ4gBv6HUdLdjVcy5UK7KvcThBUnIBA7thytRXTrbCI6MTekzyupUvXdZXIBmLShDK8daD/lmZRe4odGTKtChK/RHims0fGGplvn8fHCSA3ICi/VtiKSqFH7RWNHxUrIJOPjYymx2wyFulX8vPB01QKahiakw/FTp4ZPMudkI+ssep3Gg8GSysy0s7ffY7qnA3ZDEOC+79ImF89U0irCbPFqRCSKIIZuv4oDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=mELg0JuI4bVuz+X40UfCGB2AytjlWuI7fbRzyc0aQIo=; b=oQsSmlDAYoNVV7XPTfGMRsBs8dgg8Issb++vbufn4P920TGrCMBTulPqKdVcHQrjok1loekBZPS26Z8f8taHXnTg67SsjRrC+oNP6CUGpJ1UJr0/3IaNWKzzZJZwxEXSIMsCBZiZOMQwqdgeH3d5WtCzPULQEgsU/ywxtgLAUyLHN2H3agy+tTaKg7NAbFFfylSIr/Nt5jSFwO7pRvcnZrSjw2hvKxgTdnbCnclvGT7aSircSTb3gSKhvF8oOw1U0eZxGHyPegiuzvuxIZjNZD1FC4pVHOxhDhc6rVs9zb3FUsY2OfrdSWd6WA9IOSksUr1S2FXNeu/A2jmLCQ0Pcw== Received: from BN0PR03CA0031.namprd03.prod.outlook.com (2603:10b6:408:e7::6) by CH0PR12MB5121.namprd12.prod.outlook.com (2603:10b6:610:bc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Thu, 6 Oct 2022 15:03:56 +0000 Received: from BN8NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e7:cafe::b2) by BN0PR03CA0031.outlook.office365.com (2603:10b6:408:e7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23 via Frontend Transport; Thu, 6 Oct 2022 15:03:55 +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 BN8NAM11FT014.mail.protection.outlook.com (10.13.177.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.10 via Frontend Transport; Thu, 6 Oct 2022 15:03:55 +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.26; Thu, 6 Oct 2022 08:03:41 -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.29; Thu, 6 Oct 2022 08:03:39 -0700 From: Alex Vesker To: , , , CC: , Subject: [v2 00/19] net/mlx5: Add HW steering low level support Date: Thu, 6 Oct 2022 18:03:06 +0300 Message-ID: <20221006150325.660-1-valex@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20220922190345.394-1-valex@nvidia.com> References: <20220922190345.394-1-valex@nvidia.com> MIME-Version: 1.0 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: BN8NAM11FT014:EE_|CH0PR12MB5121:EE_ X-MS-Office365-Filtering-Correlation-Id: 50b96fa1-9a3b-4cea-1af6-08daa7abfd53 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: Tsl5rtGBgLC4kq1hJ69CHS4JjPiFIjNOzZcmWRrQfafETho9ZSO87dpy3YowHUeaLcBwVC0m1Cs/OWRahv3ZjfMv9Ofbg+yrKVsrQJgVulMtW2fChs1Jbs6htmRXuVUORDmEPSK+ILj00DCQcguSJ4W9HeyUhvHOxxkWRLZfk0qCvd5k2eoOkxoPFFxbfF8qOufI0Ay6kVcJ8ZORUjn1RiERhuhqhhw1srJKDZMupMVSXzAcnxdF5rPi8UWd4t7wjdxo9iA5k21h81uuVJ/BS+ux1pjrP9GISz0/N1qC7Ee8KZ9xZFGT4mSwAvAuVRavOzhQAvwNagcHRo0dSzWA4V6Xsd9tbE7E3ATrzQVsS5bWNEobRGd/pM6NMkvcFJTD2XNGorpW3ymJOKGmpzlaaiDjBgapPoRuGjqUVKaVmSMEWgirtRL7p4cPTTpa/LnUSC6/cXpoe6Sy7VI9OBnBIOtOHYZtEoNHe1xeGD83zCensli3Pv8cyxvxjvWZDm1KSteWjyQLu3PHxo1IC7jKYzQbHDBEfu9HLT57KpVEIJgxPnpozZ4IsnVcA57yZkLLmnhqslKTblDt3nLHlCUFLdm5s3AnyXyz7exuiIxKJqi9CkOv/Pyaac3Smhjekwqr0NLQak1a76bUkkzphCJ8Z6E8MA4Rso4QpvWPMBvtaZc2W7dvXPC6sAfKAkluH7EInWTTSAUomPb4TzxFylw0XaWm5UiK8cxqzI2W26jJBJ+Gnip8lyhnll6zNRsOnMIN3rt+J8/vzMx0mjdq85mp9g== 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:(13230022)(4636009)(376002)(346002)(396003)(39860400002)(136003)(451199015)(36840700001)(40470700004)(46966006)(83380400001)(186003)(1076003)(16526019)(336012)(2616005)(426003)(47076005)(82740400003)(7636003)(36860700001)(110136005)(41300700001)(2906002)(5660300002)(82310400005)(8936002)(356005)(40480700001)(55016003)(40460700003)(478600001)(107886003)(26005)(6286002)(6666004)(7696005)(70586007)(4326008)(8676002)(70206006)(316002)(54906003)(6636002)(36756003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2022 15:03:55.5487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 50b96fa1-9a3b-4cea-1af6-08daa7abfd53 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: BN8NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5121 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 Mellanox ConnetX devices supports packet matching, packet modification and redirection. These functionalities are also referred to as flow-steering. To configure a steering rule, the rule is written to the device owned memory, this memory is accessed and cached by the device when processing a packet. The highlight of this patchset is supporting HW Steering (HWS) which is the new technology supported in new ConnectX devices, HWS allows configuring steering rules directly to the HW using special HW queues with minimal CPU effort. This patchset is the internal low layer implementation for HWS used by the mlx5 PMD. The mlx5dr (direct rule) is layer that bridges between the PMD and the HW by configuring the HW offloads based on the PMD logic v2: Fix check patch and cosmetic changes Alex Vesker (13): net/mlx5: Add additional glue functions for HWS net/mlx5: Remove stub HWS support net/mlx5/hws: Add HWS command layer net/mlx5/hws: Add HWS pool and buddy net/mlx5/hws: Add HWS send layer net/mlx5/hws: Add HWS definer layer net/mlx5/hws: Add HWS context object net/mlx5/hws: Add HWS table object net/mlx5/hws: Add HWS matcher object net/mlx5/hws: Add HWS rule object net/mlx5/hws: Add HWS action object net/mlx5/hws: Add HWS debug layer net/mlx5/hws: Enable HWS Bing Zhao (2): common/mlx5: query set capability of registers net/mlx5: provide the available tag registers Dariusz Sosnowski (1): net/mlx5: add port to metadata conversion Suanming Mou (3): net/mlx5: split flow item translation net/mlx5: split flow item matcher and value translation net/mlx5: add hardware steering item translation function drivers/common/mlx5/linux/mlx5_glue.c | 121 +- drivers/common/mlx5/linux/mlx5_glue.h | 17 + drivers/common/mlx5/mlx5_devx_cmds.c | 30 + drivers/common/mlx5/mlx5_devx_cmds.h | 2 + drivers/common/mlx5/mlx5_prm.h | 653 ++++- drivers/net/mlx5/hws/meson.build | 18 + drivers/net/mlx5/{mlx5_dr.h => hws/mlx5dr.h} | 210 +- drivers/net/mlx5/hws/mlx5dr_action.c | 2221 +++++++++++++++ drivers/net/mlx5/hws/mlx5dr_action.h | 253 ++ drivers/net/mlx5/hws/mlx5dr_buddy.c | 201 ++ drivers/net/mlx5/hws/mlx5dr_buddy.h | 22 + drivers/net/mlx5/hws/mlx5dr_cmd.c | 949 +++++++ drivers/net/mlx5/hws/mlx5dr_cmd.h | 230 ++ drivers/net/mlx5/hws/mlx5dr_context.c | 222 ++ drivers/net/mlx5/hws/mlx5dr_context.h | 40 + drivers/net/mlx5/hws/mlx5dr_debug.c | 462 ++++ drivers/net/mlx5/hws/mlx5dr_debug.h | 28 + drivers/net/mlx5/hws/mlx5dr_definer.c | 1970 +++++++++++++ drivers/net/mlx5/hws/mlx5dr_definer.h | 577 ++++ drivers/net/mlx5/hws/mlx5dr_internal.h | 93 + drivers/net/mlx5/hws/mlx5dr_matcher.c | 922 +++++++ drivers/net/mlx5/hws/mlx5dr_matcher.h | 76 + drivers/net/mlx5/hws/mlx5dr_pat_arg.c | 511 ++++ drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 83 + drivers/net/mlx5/hws/mlx5dr_pool.c | 672 +++++ drivers/net/mlx5/hws/mlx5dr_pool.h | 152 + drivers/net/mlx5/hws/mlx5dr_rule.c | 528 ++++ drivers/net/mlx5/hws/mlx5dr_rule.h | 50 + drivers/net/mlx5/hws/mlx5dr_send.c | 844 ++++++ drivers/net/mlx5/hws/mlx5dr_send.h | 275 ++ drivers/net/mlx5/hws/mlx5dr_table.c | 248 ++ drivers/net/mlx5/hws/mlx5dr_table.h | 44 + drivers/net/mlx5/linux/mlx5_os.c | 7 +- drivers/net/mlx5/meson.build | 2 +- drivers/net/mlx5/mlx5.c | 3 + drivers/net/mlx5/mlx5.h | 3 +- drivers/net/mlx5/mlx5_defs.h | 2 + drivers/net/mlx5/mlx5_dr.c | 383 --- drivers/net/mlx5/mlx5_flow.c | 17 + drivers/net/mlx5/mlx5_flow.h | 128 + drivers/net/mlx5/mlx5_flow_dv.c | 2599 +++++++++--------- drivers/net/mlx5/mlx5_flow_hw.c | 109 +- 42 files changed, 14297 insertions(+), 1680 deletions(-) create mode 100644 drivers/net/mlx5/hws/meson.build rename drivers/net/mlx5/{mlx5_dr.h => hws/mlx5dr.h} (66%) create mode 100644 drivers/net/mlx5/hws/mlx5dr_action.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_action.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_buddy.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_buddy.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_cmd.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_cmd.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_context.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_context.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_debug.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_debug.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_definer.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_definer.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_internal.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_matcher.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_matcher.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_pat_arg.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_pat_arg.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_pool.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_pool.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_rule.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_rule.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_send.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_send.h create mode 100644 drivers/net/mlx5/hws/mlx5dr_table.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_table.h delete mode 100644 drivers/net/mlx5/mlx5_dr.c -- 2.18.1