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 52996A00BE; Thu, 10 Feb 2022 17:29:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDAF341144; Thu, 10 Feb 2022 17:29:54 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2088.outbound.protection.outlook.com [40.107.102.88]) by mails.dpdk.org (Postfix) with ESMTP id E211941141 for ; Thu, 10 Feb 2022 17:29:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I85oZqLuN8W7889ttJ5mQfbTVkXbuWhO8vkn8KoStYg9gxolIlHZ3pR96wuajWxN7zMFfvmxR7MvbJF/+/iWdMJqkH04piAztC38sfEP/fT/bfQvy6IhpHWzz/Gt+sTlITCM24qIFrTJ3eeMyHgxcVktidOnOMxbkD3FhUx6EtGZLkWDgnc81eGzsqg7NBJg9Tgd7koPNbjCsQ9qj/bWgA0Vbr6yFb3qaqFx1+uEahlqN5AEsr1/MsfVhmkKqMohc7DKNWKHLIc9/T9iTxG2otf5gFhzqBkHeGnH6+5I/wyk5EFiVwxQq70h8yq9pR8XAy3Yqo/b524AcIctke4ggw== 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=SBrvcYmk1Devp6Fdni9SD2qMAeyk3dCX8SMeR2TaSSo=; b=ifOEsN+9ihZ6BBj2dh7w9jLzbeDl02v1TRGFIku+rHDT/QDinyuyccwoI2sf9C8+K8+n/IR6vSeS2kCG7zWQgIw6GoMggw/NYhNKbHsf9a9PfLJaL9qOluV3Kc6VM7BjiVWkVDRzlrHHbKVuWfoEg4RWMLWPSz159LKNlGxn1rSzL4wA9j5/R+SJPnfoaTZwFgxQ4qDJkn/RnHkOPdmKLLVbEnvsIuXtUdMNDQ6r2Je8/+huDBlGihMjm5lUnBSXkWYWmz6g4+6ydIXMU3O+NC58GJc4QEdkEKujvJMi+XeurRZCJx7LpXnMUzln1hocEFdJbZQInBRev/7Ewz9+bA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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=SBrvcYmk1Devp6Fdni9SD2qMAeyk3dCX8SMeR2TaSSo=; b=Of9AcWUtVXgfrWGj1UR1xdKUVWkBZvOZYOz9zGJfJ0U5SSGIUZx/kRDDjfYX2+iogHYcoR1RwG9PUL34nkJIZs+9EVY8ul+zWcmB7qNbDPHrmxEJOm7qvca1N0wpievSdIow5TTYuDBl7rQt4Uy0Yh/nXaZXcsm1X+Bw5AgkzLZ3E5mrKukbvCpG/BR0WS3ct9nVRvff6B51FMC5SX15H2V2ir5ySNufBfYJTRfDZhouz3lHbAWAd4Zx8qs9/opnUVTJAqQeTKHIPsKJ5/OK9LL+lzjBmFRxb/1N9I6pbs7iIx9uBxJJlI0LWTZxRa/XcNGgWF3FvUDSnuuOOxLbyw== Received: from DM5PR07CA0038.namprd07.prod.outlook.com (2603:10b6:3:16::24) by CH2PR12MB3848.namprd12.prod.outlook.com (2603:10b6:610:16::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 16:29:51 +0000 Received: from DM6NAM11FT030.eop-nam11.prod.protection.outlook.com (2603:10b6:3:16:cafe::2c) by DM5PR07CA0038.outlook.office365.com (2603:10b6:3:16::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 16:29:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by DM6NAM11FT030.mail.protection.outlook.com (10.13.172.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 16:29:50 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Feb 2022 16:29:46 +0000 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.9; Thu, 10 Feb 2022 08:29:44 -0800 From: Suanming Mou To: , CC: , , Subject: [PATCH 00/13] net/mlx5: add hardware steering Date: Thu, 10 Feb 2022 18:29:13 +0200 Message-ID: <20220210162926.20436-1-suanmingm@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: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 40b3afd4-efb9-4f8c-e057-08d9ecb28fbf X-MS-TrafficTypeDiagnostic: CH2PR12MB3848:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZEG3Cvo+wzfGTAJUBTVl/foBTPX415MFPUNLJGpRvoRadmIZgOxytmHiturEKDxK1s6RIIGRz8GE3f+Smg2usp0wSiVR/BV2KXLjjWo3ROi7ytMS+MR335atUtDS5bATn6PeoSY6izgt9lYpKWMc9dpA1CZBerTnhsldF4/xh5gTf1YSDXF9Ei3lVpvRT0CmqfcfwyoFigSMhT9wEiDZjGAnuGPtrI+HC6Q0Q+dslBYx+F7FNGEQiTh8UjtR8Db0utcMt7HtjUB5mjRga7CgtYDAiDroNsq8j76pqHlQt3RPNL+TnVcSctD0K1y0dAKzxKcEUhxQ/0uIbsQDVzt8iPzpZeo0UZntsxfs907p1kiOWqLpXB1AJWlbNMqwBmDzp+gq776MelTwU4O1XWgenpOnScIiMfqxeALRtGMC+RpDaiLzBfzXRJXpsmEv7zmn2+fIzLHwo05d8AbKyWkRP3qr9K4mzKiimCLlDKGX6Emotgskyi/1BXASS/wwUvULSqCFcKGMeDrqLHcRgPx2Jl/yzCacmxNJBohAZ7z+9P6E9W9koaMQyxr7QUaHwmy/jfto7HmJWjCi5E5k5gP7bYxde9LJXpQ5hzs3eNMnC9lLUjuVxnk51CQjaqFybtzOxe0F/5Sz6p+FYO2O4V2oiSFjSvkxOJPO0i0j3wszlgC7jP55h0stUsBWmEe8LzPSxM3BQ50AHh3mSWH7Ar9Iow== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(55016003)(47076005)(36860700001)(86362001)(82310400004)(40460700003)(6666004)(8936002)(5660300002)(70206006)(110136005)(54906003)(6636002)(316002)(4326008)(8676002)(508600001)(356005)(70586007)(16526019)(1076003)(83380400001)(2906002)(6286002)(426003)(336012)(26005)(186003)(7696005)(2616005)(81166007)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 16:29:50.8592 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 40b3afd4-efb9-4f8c-e057-08d9ecb28fbf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT030.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3848 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 As the new queue-based flow rules management mechanism is introduced to the rte_flow. A new steering mode PMD code is also developed to take advantage of the new API. The HW steering prepares the required flow resources in advanced from the hints when create template table. That means the matcher and most of the actions have been prepared during flow table creation. Limited left actions will be constructed during flow creation if needed. A flow postpone attribute bit describes if flow creation/destruction should be applied to the HW directly or not. An extra push function has also been prepared to force push all the enqueued flows to HW. Once the flow has been applied to the HW, the pull function will be called to get the enqueued creation/destruction flows. The asynchronous flow creation and destruction are handled by queue jobs. The queue job descriptor is currently introduced to convey the flow information and operation type between the flow management in in pull function. Flow rule memory is allocated in PMD layer instead of allocating from HW layer. While destroying the flow, the flow rule memory can only be freed after the event received. *** THIS PATCH SET DEPENDS ON THE NEW RTE_FLOW API *** Suanming Mou (13): net/mlx5: introduce hardware steering operation net/mlx5: introduce hardware steering enable routine net/mlx5: add port flow configuration net/mlx5: add pattern template management net/mlx5: add action template management net/mlx5: add table management net/mlx5: add basic flow queue operation net/mlx5: add flow flush function net/mlx5: add flow jump action net/mlx5: add queue and RSS action net/mlx5: add mark action net/mlx5: add indirect action net/mlx5: add header reformat action drivers/net/mlx5/linux/mlx5_flow_os.h | 1 + drivers/net/mlx5/linux/mlx5_os.c | 22 +- drivers/net/mlx5/meson.build | 1 + drivers/net/mlx5/mlx5.c | 50 +- drivers/net/mlx5/mlx5.h | 63 +- drivers/net/mlx5/mlx5_devx.c | 10 + drivers/net/mlx5/mlx5_flow.c | 569 +++++- drivers/net/mlx5/mlx5_flow.h | 276 +++ drivers/net/mlx5/mlx5_flow_dv.c | 175 +- drivers/net/mlx5/mlx5_flow_hw.c | 2284 +++++++++++++++++++++++++ drivers/net/mlx5/mlx5_flow_verbs.c | 7 +- drivers/net/mlx5/mlx5_rx.h | 9 +- drivers/net/mlx5/mlx5_rxq.c | 78 +- 13 files changed, 3374 insertions(+), 171 deletions(-) create mode 100644 drivers/net/mlx5/mlx5_flow_hw.c -- 2.25.1