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 8BDA6A0543; Thu, 22 Sep 2022 21:04:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A50440156; Thu, 22 Sep 2022 21:04:53 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2065.outbound.protection.outlook.com [40.107.102.65]) by mails.dpdk.org (Postfix) with ESMTP id 445C5400D7 for ; Thu, 22 Sep 2022 21:04:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=czunNM/BM9rXBNLEHV2fIHd1WxnNv/08DNusn9alzJSwmieIEk+K6GGn3PcRYr1ogHvvPz3guC5E5X1Yjmehx4uhjWM2nfwp4EUuYpUsFJT/xYAX9cmNPkKiMMcp6XGwOBSXU2b+ARBq6S6C4zZr/Xk0s7pbLl+4YWrv6VcnJQtosH7TEnGGvcWkzO+qU7mVqqR49zzkEEj6L6HW1dHvX2V0WsmnKjYKRiMfxJ9L+/BNKGGYm5YuOFyxQeMXHc8AmuPnUmZsYx3XtY5GL018wo9lDYB8FEgdarkPXTPIw2yJKxjqO0Joe0//oG0L+nILyzp5wvQtvRmk/DW677/E7w== 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=LZyBXU+1SpWp9PzlsJPB41tmpBVa34Ye/kp07lwCoxE=; b=a+3nrR7+Gyu3lsBxuSB+CGExg4TE+2EMRMmqEWb+SdS1k3qp+JBlMoqqnNX0C7BFBV6/Mf042eA6BdiB/SNiHi66LrG2C2dRjSLNytNi7JxhnOLTMiS+FCorqDJKfvQanaQqh+rFPZw7Ie3eeNiWQjIX0mdm0LXmxaLN6WUxlpBagQb0ajaeEERnZnJnQadf9rnCARWqHyC7PLA5K9qntafsTTijP33eN7yqxv5eEjovfjdEq5IQFCpXShAjARvSHoljbC5LXMVhnFLtPIVliJ5A0IDVFuNMwtdC3+wT3h9rEE0aqp3VOKgRfUdmUXiF84RGgmYHlnAAIpUhXPkwTw== 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=LZyBXU+1SpWp9PzlsJPB41tmpBVa34Ye/kp07lwCoxE=; b=lAi13/5rru8cbmyw7CwAnolBz/Vu5V34MT+mHDZZBFn0h/eSkzWdVrSZeQm26yBb9XdMQ2VrzrLAz1s/6LeWZCkwo10jHwGtKpYeMr/cZ73ZN/TAZ50VrKiDIU01mHab/INjdmcsRX+DQVufNQssAPbxbu+1xE09+S4NpDrLkQEvf0vYw3Cp8+LhJYxM9i1g3tbYHVIBqZy1NQSZYvdgUUvGuCT6G8MzrQUCdv74n22EusAGFAseRvWm5iv7l+oMtSEdGGaF2OacfA8Fc2F3x22FNXGkEJNLqGnJj+sewRS4QCXOEvBy1gZMl8mu7z8NjeFh4TxSR7dvFAZxy5a6sQ== Received: from MW4P222CA0023.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::28) by BY5PR12MB4936.namprd12.prod.outlook.com (2603:10b6:a03:1d4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.18; Thu, 22 Sep 2022 19:04:49 +0000 Received: from CO1NAM11FT082.eop-nam11.prod.protection.outlook.com (2603:10b6:303:114:cafe::b0) by MW4P222CA0023.outlook.office365.com (2603:10b6:303:114::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Thu, 22 Sep 2022 19:04:48 +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 CO1NAM11FT082.mail.protection.outlook.com (10.13.175.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Thu, 22 Sep 2022 19:04:48 +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, 22 Sep 2022 12:04:33 -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, 22 Sep 2022 12:04:31 -0700 From: Alex Vesker To: , , , , CC: , Subject: [v1 00/19] net/mlx5: Add HW steering low level support Date: Thu, 22 Sep 2022 22:03:25 +0300 Message-ID: <20220922190345.394-1-valex@nvidia.com> X-Mailer: git-send-email 2.18.1 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: CO1NAM11FT082:EE_|BY5PR12MB4936:EE_ X-MS-Office365-Filtering-Correlation-Id: 05f38cc1-42e9-4690-f5a9-08da9ccd5228 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: +mt/EbZFcBJeroejgXDdKXExaX+W2EcTWiOrHS8SqtAfR3u92BWLseHdtoLf77x1NAAySw2wjmDREKYGlo6ecLTA4q/pZVdVx002iZ/xySQSRn/ucEBxGf5Uhzz96kKlEC9dBpwPoZPZZN3f1/DKSDXE0m3lrpuPUMdoBTKPkLXky3mh/zW19yPmkzYeyoOPrQG9JHSd6qFz9jMYb4Ef6VZ33KPJZqJUBLLb/MIxw65/F9sBwNwdj32iGaq7UDNud57flI4gmmwmAPUlW/YALrvRobGu69k4PQelvC16eUYJXdQo1PN/S5DGBvopjorRAHrYWAGiG1ce6VbiRo/MunFQtVf6GKlUItyWKm83PPqYuAxtNzjvzuJAbYHMlSnUQ3o3A0g61sW4eopifF6I/NDPsto5hCfTYNsJeCpLygDhAwMtlnpBboKNn1yUc2K+UFJ1h1ABNB+KFGayvthsAg6yHRNZjeShUPpD/ebYhUmqbUNr7XJUY4ioJxNdruq2vrOSmvbjfi3GZbWG4RImSnh5wrhEe6oiU9FAFGpzle5jJAKUzXN6GRwkmZDUgXI9sdWurs40im1bBBFbhz4snzRbWeshsV0p9gTfwjcLkwiAmAvtzkhfkZAkFp+zqHRA89/EDGi9YKiIjOd0l85BmY8v/ItbdCaVBcTFTRIOc0nE3E6RAxIPgXCZuTsIiQp88UyQva8Mrf/dHkqQMhvO/widw8XbS+FpGA2nRMCfZsB5paxIcHDr2Dl8TO/A7KfF+RsI3jzbTqE+/6tbk3Hd1g== 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)(396003)(346002)(39860400002)(376002)(136003)(451199015)(36840700001)(46966006)(40470700004)(47076005)(107886003)(6666004)(478600001)(70206006)(70586007)(8676002)(4326008)(2616005)(2906002)(1076003)(186003)(41300700001)(36756003)(6286002)(336012)(426003)(83380400001)(16526019)(40460700003)(7696005)(40480700001)(36860700001)(8936002)(55016003)(86362001)(26005)(5660300002)(356005)(6636002)(316002)(54906003)(82310400005)(7636003)(82740400003)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2022 19:04:48.5428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05f38cc1-42e9-4690-f5a9-08da9ccd5228 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: CO1NAM11FT082.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4936 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 This is the initial draft to present the code to the community and it will be reworked. 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 | 2217 +++++++++++++++ drivers/net/mlx5/hws/mlx5dr_action.h | 251 ++ drivers/net/mlx5/hws/mlx5dr_buddy.c | 201 ++ drivers/net/mlx5/hws/mlx5dr_buddy.h | 18 + drivers/net/mlx5/hws/mlx5dr_cmd.c | 957 +++++++ drivers/net/mlx5/hws/mlx5dr_cmd.h | 232 ++ drivers/net/mlx5/hws/mlx5dr_context.c | 222 ++ drivers/net/mlx5/hws/mlx5dr_context.h | 40 + drivers/net/mlx5/hws/mlx5dr_debug.c | 459 ++++ drivers/net/mlx5/hws/mlx5dr_debug.h | 28 + drivers/net/mlx5/hws/mlx5dr_definer.c | 1866 +++++++++++++ drivers/net/mlx5/hws/mlx5dr_definer.h | 582 ++++ drivers/net/mlx5/hws/mlx5dr_internal.h | 93 + drivers/net/mlx5/hws/mlx5dr_matcher.c | 920 +++++++ 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 | 76 + 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 | 849 ++++++ drivers/net/mlx5/hws/mlx5dr_send.h | 273 ++ 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, 14189 insertions(+), 1680 deletions(-) create mode 100644 drivers/net/mlx5/hws/meson.build rename drivers/net/mlx5/{mlx5_dr.h => hws/mlx5dr.h} (65%) 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