From patchwork Thu Jan 26 23:40:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 122594 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC1A042498; Fri, 27 Jan 2023 00:41:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E66040A7A; Fri, 27 Jan 2023 00:41:24 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2080.outbound.protection.outlook.com [40.107.220.80]) by mails.dpdk.org (Postfix) with ESMTP id CCDF9406B4 for ; Fri, 27 Jan 2023 00:41:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h2gEu+0OMYCVVHYAkPiAx4w8MUfjENg9APuz06zBILwn8caGqVY7cQH+qEbbRqcMbS+eqfbA/k0A7t1fFqIELtt+HiOLqI6Cnnc/4DdpDMg/cCvRzT10qJt53h5uTuHsmNYMC+IJdylNMsysrmXfr6E4nGkrKuE4J/upN5R0Mcl1wmfnMWiw2oQSU5p+K8g83FDJYQCBLtkS/yoH1xaCOJk0fizwL1xR3sOMB/TkA2og2wskFvCi2ic1h9zssbrHneWkPTZixq1+qkBBiXpKUKw91Z2bCXrIkHmO3pOXjFUAPWP3ZsDmKLetz+WUSgVNjXO97HSLVGQo7nH0Q1NmLg== 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=TdN006uSQdmQBuRd3sWoW/ibi1AjGQkWE9SWLYsoT74=; b=hnkeGLkxo1QgQKKXP238qb8cpfBu5s2ohbL9rA3dLYXgVg8svtI8Sw0ZUxsFi+CEh/X+aK4spMJjEsTJgBQgDD4pfFrrJX4iErRb0tr2B84o3Tf0jvn0OQ62FiBpiEjwHC/vs/hnrYkuVGuI7Ja1/CB5If2oWTIL8fPT7p0+Qh5CeRhyTSStyfY40Hu3QfKCV3NYGYp4IgIc0Us6cXsVzHeJ2j2+OPSTK58sbg5BWS7y7tImuHv2eaSm8yg9JfOQPvmxA9GzlJhLnRO7shxMnKI/kPN6j6v2NXuHcaD7AC1llOGXnq7gb+BxfK1dIyyo98Kke+VlsBjH50KDzHGW/g== 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=TdN006uSQdmQBuRd3sWoW/ibi1AjGQkWE9SWLYsoT74=; b=TG4YDf0WUQuUBGN55PuYTNh/Jb11FoocjyGnMTZiDbDeLJ/uCXMEmAu2iZmafbEDRM+DG1rOZYhx3MCcHHqZ9z3t9RkHmR+QPnciN4Ws8g1Cowr4Lgj7hmc6FPQ4Sfz1cup/IHlS/JvhwbuLv9jUO/Ltc0WxselhUF8LhVqqdLMg5L4HTEuG69dA2wMSWlJPJbMKckW6wPit7EEo5wlQCXAB6Z8R0JHw2LryvMo0bJzsKSJkEbn7nx9DcBhOXtm0lJymrLWduZejP+Kn75Lp2dKiQ0xzIC3WE91PYIJ1V3YuNLeP1e/8dWRmcQRTXNLapvrYR6/3aQWm4x0GtYFc4g== Received: from MW4PR03CA0220.namprd03.prod.outlook.com (2603:10b6:303:b9::15) by IA0PR12MB8303.namprd12.prod.outlook.com (2603:10b6:208:3de::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Thu, 26 Jan 2023 23:41:20 +0000 Received: from CO1NAM11FT024.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b9:cafe::dd) by MW4PR03CA0220.outlook.office365.com (2603:10b6:303:b9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22 via Frontend Transport; Thu, 26 Jan 2023 23:41:20 +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 CO1NAM11FT024.mail.protection.outlook.com (10.13.174.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.21 via Frontend Transport; Thu, 26 Jan 2023 23:41:20 +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.36; Thu, 26 Jan 2023 15:41:11 -0800 Received: from pegasus01.mtr.labs.mlnx (10.126.230.37) 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.36; Thu, 26 Jan 2023 15:41:09 -0800 From: Alexander Kozyrev To: CC: , , , , Subject: [PATCH 0/4] net/mlx5: add template table insertion and matching types Date: Fri, 27 Jan 2023 01:40:50 +0200 Message-ID: <20230126234054.3960463-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Originating-IP: [10.126.230.37] 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: CO1NAM11FT024:EE_|IA0PR12MB8303:EE_ X-MS-Office365-Filtering-Correlation-Id: 7df48d2d-4003-4c68-93c2-08dafff6d395 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: N9OWrALuZF4Itbdb5E2yiKIH1IDE23gcEvISn7AVPNRPJiOB8RM4/eVwGFGW7RJ1JOqie39UJaYtNmnFrTiCTGNJ7szRkuRcurb+Ows8tZKy3RgKiELroZN9xQZC/j1JzBC5DHaHv0CQoRYiSZXX+1jZ/VN5xnty5K3g7oFGbNdTPmrHuH1r8HN3TPNl5MabwWUG3xI/+u8Tkopd+5W9/XmmiuDZchWe392K/VF/wRJUbzubVySV77WklxB8ewq5/2b+q6YITUBPvJGkPetNycC1NHQFB/yXA1wr+tjRatb6vNE1IcfMAkSUsU2uvcITAwX+4a5UBuUWGTC6RHC8/hZF2ZhJNIljaIInE/qHMUTZWErrzAc1284YTNigGRittO9O5mtHD0M0RrRlKSRZSHKeoI1w9WPxx6cc+W1knlyFgIxAjk04bAD93+VsBJnGwQQAJSCPwG91rn5YXLEjGh7obJtbAM6FeFnA3gBRIxyaSQHnMZmhlGcLshBIi4vwCR52QekGqJLC7G60F5cuIKSmAnmUa6LLJgNaaabbgp7bgqtpFni1m6fmXt3gtEoSdgiHsNpqURcbSqIqIOn8cFBPY7RSacvWqzV9EOFJwrkWRHxrDOVD/LybjojJb7RsTiZ7rFeSihTEWcAgnFWVymUGW4rIA2T7VKRhCYODY2yzxk3hdnhk/CNfj25nYWOhLENQ0kTLaIo2eqJT7iyNj7dYmMOFrCdtzK0p/dOOHgqsllrUBUHJWIr3/UzahZpxjvcL/cJTquMecClpqaFpnR4ZjThlQibhioUkGKYH0N8= 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:(13230025)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199018)(36840700001)(46966006)(40470700004)(36860700001)(86362001)(356005)(40480700001)(70586007)(83380400001)(6916009)(8676002)(70206006)(316002)(2616005)(4326008)(107886003)(426003)(54906003)(36756003)(6666004)(186003)(26005)(478600001)(336012)(1076003)(16526019)(966005)(8936002)(4744005)(5660300002)(82310400005)(82740400003)(7636003)(47076005)(40460700003)(2906002)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2023 23:41:20.2242 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7df48d2d-4003-4c68-93c2-08dafff6d395 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: CO1NAM11FT024.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8303 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 Add the insertion type and hash calculation function of a template table. Support the new rte_flow_async_create_by_index() Flow API to allow flow rules insertion into a specified index of index-based template tables. Set MLX5_LINEAR_HASH_TAG_INDEX as a special id for specifiyng the index. Allow to retrieve the hash calculation result via modify_field Flow API. Flow API changes: https://patchwork.dpdk.org/project/dpdk/cover/20230121052158.2928238-1-akozyrev@nvidia.com/ Alexander Kozyrev (4): net/mlx5: add table insertion type and hash function net/mlx5: add flow rule insertion by index net/mlx5: add hash result metadata to modify field net/mlx5: define index register for linear tables drivers/net/mlx5/mlx5_flow.c | 61 +++++++++++++ drivers/net/mlx5/mlx5_flow.h | 15 +++ drivers/net/mlx5/mlx5_flow_dv.c | 18 +++- drivers/net/mlx5/mlx5_flow_hw.c | 157 +++++++++++++++++++++++++++++++- drivers/net/mlx5/rte_pmd_mlx5.h | 5 + 5 files changed, 249 insertions(+), 7 deletions(-)