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 DE197A09F2; Wed, 19 Oct 2022 22:57:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C60A942BF7; Wed, 19 Oct 2022 22:57:51 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2043.outbound.protection.outlook.com [40.107.92.43]) by mails.dpdk.org (Postfix) with ESMTP id 3B84C42BF2 for ; Wed, 19 Oct 2022 22:57:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Im8n5b+2oifegXiCDrIG8lWxAFDOZeibuu2FyicP1kiVtWEFrJlRZmamtr097IqU50fwpjgAqX+yYlJ911hrzOiBzmIoBCoaZ8Nn9r42giqEvaXHCu2FvypIjfs8eONjK2IZmOv/M15h3/FsJegHoxfHFRbf+2PrhmeJBLIRgTvJAnCAkc8MWcQRxdkO0VLTc8ADaIchSjZzgIOJV/thl4wvCOye6njO7OVFb3d9SdrZsOlDVROfPVh/aYAP+ZIAH5sOPdXXSxzpHPxN1dS1d96HFMl+K7k+gOkTpi4kDf46VH7ybloX4C4aaGnSITAj2wcFxnb574oArMw09tnivQ== 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=i7+BN8qncAS0t3uTGBfWI5wGSH3mPaEpD2ux3RtZU+0=; b=j7DQHWxEhXJ1EWZ2hFl0S3qRaa6ZBWCEw7KVgpryzJw5qHbFFFW+rAD4FhwvwYhsQSYZNLph7yGsgmOVvcGhclTs0mXIYGqlT8r6WEBkDMExl7Bg2SUfSh8WyQt5XRCXRAo9DbZvwIcz4WB4prMk9pXRsZvoQSSO7HbaUHu4NHYbmFlVhWOXTrFoIvA25EbxlKBZT1KVxvySJMzV6dtrut6Giw/ws7LB5Slsct5fWAK1+zMXyLEr3H9P5tiMyxHUiQcCTbqsUFsk27ugEHqG8a/BYsSBG07KPbO23RAAfEmR2a2MQR+U8NElbT1uBdfwbe7uOqMUKiRlrQsoem+aJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject 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=i7+BN8qncAS0t3uTGBfWI5wGSH3mPaEpD2ux3RtZU+0=; b=t0etJnKvHVp8zOcVKZ+PXR3RZvIFv9oX+u73QxXtFvzF53wv97f0Jwyix03rZFtn1aq9Kt2Xr3c4YnnVzCOpa8sgkMX/58mcy36J8saftQ2ER9KcV0OyVk+amvIPgThy6E6aygz1PmAtPuC9E6/+8EE9WH8lctogjS9eQzT28mWR5dxNVe4eqp7FyA8yzCo5IsyILgeNFwHSGXMnQGsmm0cH/0TizxIS+qvJRfszTSqSnniAC1wI37a7m1/1YEdbeUPtw7VNolQ8oDWXl/7ThfSt8Fii1+kRLelVaI8t9YLKmVLdZxxylH+4fIR5uoUS/H+h+GnwUInwcqVQg9tAKg== Received: from DS7PR06CA0023.namprd06.prod.outlook.com (2603:10b6:8:2a::14) by MN2PR12MB4488.namprd12.prod.outlook.com (2603:10b6:208:24e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30; Wed, 19 Oct 2022 20:57:49 +0000 Received: from DM6NAM11FT114.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2a:cafe::f1) by DS7PR06CA0023.outlook.office365.com (2603:10b6:8:2a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34 via Frontend Transport; Wed, 19 Oct 2022 20:57:48 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=nvidia.com; Received-SPF: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT114.mail.protection.outlook.com (10.13.172.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Wed, 19 Oct 2022 20:57:48 +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.26; Wed, 19 Oct 2022 13:57:36 -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; Wed, 19 Oct 2022 13:57:34 -0700 From: Alex Vesker To: , , , CC: , Subject: [v5 00/18] net/mlx5: Add HW steering low level support Date: Wed, 19 Oct 2022 23:57:03 +0300 Message-ID: <20221019205721.8077-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: DM6NAM11FT114:EE_|MN2PR12MB4488:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e29e15f-7bf0-45ad-4fed-08dab2149483 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: BMpYjKha5y1ktW3b1/59Kkjz2sDBDDvUOZ5iDEHYwyC91sBtwC5nQImz1d9fMMfC7yMynzMwiCdSmb2ZQw3epMddrLG49PpDXbIslQMUzMW8AN1eqWmxzmJ1bt4mk4mT2u30HKRvorLn//rweHZ/77boG2uXivBHK3G1SKv5m+8P3itAcCFJeomq1KLD6xGxMtV2Y9IjRRmtQ3yx/TqT7DMqOkVjaA7YJikdWvMB/MeCaazCiTYQbgmmlLWU63f4/PANjsctHNXALLLVm/O98P5gRUiy960oeSAC9NnKKQsgRGAwwrxJIkqaaIV5yX0OSI12HdsQtBhkrR7oPp1+7euFN1xGofwwPoH9QeaqTz/Bg44c/5YEVxeMNL9ch7+8tY8/1Y7KSu7gpjpHoy9I9C+wcicMQGclIU0hQvRL8hYf9efuanPoQEOF9TVZTRki3IhPFdr6RyYufm0ZFH+eMDz5tJs5pSTCiA7CN/uB20kGtILiKyE+UVE22PtZUNXPhmRkqZ2rBjGIxQMFLaNcxyDkc73hC1DQ73XtwfP2DTcKFkWa5AEjpnJl2ENizKHB7HYqnRAjpwuYAPP0fQz1252Y1OF2dhUul0k6yyBKT7II7gA8knMhmETwkit5l0jkbogEqxFMZQkxd4uwT8Amg280hXQx0+nGkKjrnrHR77d2sft/Fip//bnvKLQkONumIiaLrCMRsDUeCa1BU9jG8IE0AnhL3xRVdFG8HIHLe90q50XfPgupPaNxCCo9HY/Jv7ZBTsKtUbeUBKWfKheGvw== 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:(13230022)(4636009)(346002)(39860400002)(376002)(396003)(136003)(451199015)(40470700004)(46966006)(36840700001)(47076005)(41300700001)(5660300002)(2906002)(8936002)(110136005)(316002)(36860700001)(6636002)(83380400001)(7696005)(70586007)(54906003)(478600001)(107886003)(70206006)(4326008)(8676002)(6666004)(82310400005)(86362001)(26005)(6286002)(40460700003)(426003)(36756003)(336012)(356005)(55016003)(7636003)(16526019)(2616005)(40480700001)(1076003)(82740400003)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2022 20:57:48.3945 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e29e15f-7bf0-45ad-4fed-08dab2149483 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: DM6NAM11FT114.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4488 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 v3: -Fix unsupported items -Fix compilation with mlx5dv dependency v4: -Fix compile on Windows v5: -Fix compile on old rdma-core or no rdma core Alex Vesker (8): net/mlx5: Add additional glue functions for HWS 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: 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 Erez Shitrit (3): net/mlx5/hws: Add HWS command layer net/mlx5/hws: Add HWS pool and buddy net/mlx5/hws: Add HWS action object Hamdan Igbaria (1): net/mlx5/hws: Add HWS debug layer 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 doc/guides/nics/mlx5.rst | 5 +- doc/guides/rel_notes/release_22_11.rst | 4 + drivers/common/mlx5/linux/meson.build | 5 + 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 | 652 ++++- drivers/net/mlx5/hws/meson.build | 18 + drivers/net/mlx5/{mlx5_dr.h => hws/mlx5dr.h} | 209 +- drivers/net/mlx5/hws/mlx5dr_action.c | 2237 +++++++++++++++ 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 | 948 +++++++ drivers/net/mlx5/hws/mlx5dr_cmd.h | 230 ++ drivers/net/mlx5/hws/mlx5dr_context.c | 223 ++ 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 | 1968 +++++++++++++ drivers/net/mlx5/hws/mlx5dr_definer.h | 585 ++++ drivers/net/mlx5/hws/mlx5dr_internal.h | 93 + drivers/net/mlx5/hws/mlx5dr_matcher.c | 919 ++++++ 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 | 12 +- drivers/net/mlx5/meson.build | 7 +- drivers/net/mlx5/mlx5.c | 9 +- drivers/net/mlx5/mlx5.h | 8 +- drivers/net/mlx5/mlx5_defs.h | 2 + drivers/net/mlx5/mlx5_devx.c | 2 +- drivers/net/mlx5/mlx5_dr.c | 383 --- drivers/net/mlx5/mlx5_flow.c | 29 +- drivers/net/mlx5/mlx5_flow.h | 174 +- drivers/net/mlx5/mlx5_flow_dv.c | 2631 +++++++++--------- drivers/net/mlx5/mlx5_flow_hw.c | 115 +- 46 files changed, 14401 insertions(+), 1726 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