From patchwork Tue May 23 21:31:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 127264 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 DB1DB42B73; Tue, 23 May 2023 23:32:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 535B940A80; Tue, 23 May 2023 23:32:19 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2060.outbound.protection.outlook.com [40.107.96.60]) by mails.dpdk.org (Postfix) with ESMTP id 4108D40689 for ; Tue, 23 May 2023 23:32:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BdAz6gxq3Gy4WJXmp7Q1X2Qe6G7xPRopVWiXN3De6uvsWdOKeRCyLnUetnDcOHK/yiL6KJQpPgrDsSGdNAnPH39loDrkGKtG/VQf38oX/yIApM3cNXMo0QvAUZYZZjqSnguCWzpPI/8FMI+k8ej8ct4f+BbIT8e8b5+QqO0m21Wv8EROQi0rwL/XdqSnjIO+04OBadVwKnCcajOlLkmoumBEfAe1fOmUzBuwcIKYnKQIrk0RtMSJ7cLSZuk2J4Z9mKBwjN/JLeViXsbHsqh1c0SVe11pU53tEFL72u8kVw59+p+mwYv3hIvQkgz5dRyL1u1Ckq2NXVbWDTX7iDVz5A== 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=TZkzPA8yLz/+DeR35+9zGUSngysFoBII6DWO7yyVBZ4=; b=UM7DZyoQ08yg91WGMz95fPHevtuUtauUVGBnyIEjcp7tbpYgtGfPvysKJmP0oS65WPspgejgWs7GRRTpBFWe05PNLqhj3pT3/s9foG8QWb/ffE1jcHBKuKpXIV9u3lrkRkRz3EGdzldyaQC0zEKHAJyaXCJbdgTNdqkpZ3h3qm7Ei6MUtVYBlF+KTIANJhjSjQEQC1TSAd/0gnBeZt8kbx5qvav0QtQ/8C/82eqtdO64fqpTAOSnudSITinPTbYsD0m2tWeXpYqNUK9b9v6g+ElZ/4zJYMZdjqK2o53+cdFgJhe/KSfqV7GgY6hEa9FltWV5aSKhr8s3qA89etyB8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=TZkzPA8yLz/+DeR35+9zGUSngysFoBII6DWO7yyVBZ4=; b=gfe6/dig7uRIF6m3AK5mZ97pLpnD52tA50q3TWFWarRRax1Hh59x/o+yGZsBzm3+6xh3y+WqS2loZ1FokoUmr9R3cKWLKQXPbVgIbW1Sbz+ENEjkD9vxWhe6sGPpCX/C7itMS98eeAh483b1MBnVMWTmuPaHB3rhskIV2KvrCpzk07eT4P//F9kDmkhoXxJON43ATfkWk3O0r3X0gR8dh4ud+xh0k61+mtQHaOCPYYSW8dHmyzi7nMAPDN2xt3WagygdVsFoB7fMA0te9rg21cVx2rCMICsJ4FZhtw5RWjJBMl/xGNFl8N2gQ+HWvEqsXUDHXhwr+sJah7n+GBmj8g== Received: from MW3PR05CA0008.namprd05.prod.outlook.com (2603:10b6:303:2b::13) by SJ0PR12MB6784.namprd12.prod.outlook.com (2603:10b6:a03:44f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Tue, 23 May 2023 21:32:16 +0000 Received: from CO1NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:303:2b:cafe::39) by MW3PR05CA0008.outlook.office365.com (2603:10b6:303:2b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14 via Frontend Transport; Tue, 23 May 2023 21:32:16 +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 CO1NAM11FT077.mail.protection.outlook.com (10.13.175.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Tue, 23 May 2023 21:32:16 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) 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.5; Tue, 23 May 2023 14:32:04 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Tue, 23 May 2023 14:32:04 -0700 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37 via Frontend Transport; Tue, 23 May 2023 14:32:02 -0700 From: Michael Baum To: CC: Ori Kam , Aman Singh , "Yuying Zhang" , Ferruh Yigit , "Thomas Monjalon" Subject: [PATCH v5 0/5] ethdev: modify field API for multiple headers Date: Wed, 24 May 2023 00:31:52 +0300 Message-ID: <20230523213157.3905696-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523124805.3846360-1-michaelba@nvidia.com> References: <20230523124805.3846360-1-michaelba@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT077:EE_|SJ0PR12MB6784:EE_ X-MS-Office365-Filtering-Correlation-Id: 69c395e4-ef37-428d-799f-08db5bd52e2b 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: GP0zD61Id5skJTHD2AobMmNhtsLEuSdAo9fxrlzYXW3sTg9nozQEtIhWCoHj84gteaW1VHGaeF4YreVmqCAYbDQCP77xTmyoP/hR3ZSDkRUbF4M7QrxMcvnNmuZvv7mjCuCi0nYM2bBodD4NfHrMQF4X3PkNk/DVktvMBh+ubwmJLaFy1ZsPRyOySKALBWSj/y32d5IWd729kEW9kPhaVB+yg1mzRDIMf3tyL7YOskyTB3pJWoCg38jeFFKJ+20Go1yS0fpWHEG5cCl5CRfh1+G8SBblYxVDk9VkZ7KFuQ0ahMjr9KjRaGy7DedHHh2e3XVC7L2QWpNSrev0lmeMnylrU30A1DyePzdt4bGvNmijdpQfJIjdGdgS4fnU/3zEUHaCoIOToosx/C4HucKf4ZaksVgD1tZa2LIP2bVBLdsHx05JhfOyhd/GUUs4R8IolPThgm5FxcBOflS9EwuY4ruszAmA7dDFhaOV3tpjx8ZBbwV7GCnEEDGWzr0id9HtYdyC8naYobY1Xa6oDx+WxJKW29DJiEsn/HBYDymnOWPsQW7BgP9F6Dq1IThhWR6F2RdrumwWDQU/SN9gOQQe886RkhK+roMjTbYCy1rarV0fKSwZsjmEU3yg7AWkqduWxeM0T4gzNMwUn1g/q6Mi0fVWGAgKAZ4gSicqsCloXkVzc6eARLF1dOCgmRo6vlXF3FJxqXyJz8DsB7XwuTYTjyeng/VTXefFnqOWb0lvi8ZfAw4xh2PIUDLqWL6RdiBpWfelPzmVd+d4Z0X46MCtcw== 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:(13230028)(4636009)(39860400002)(376002)(396003)(136003)(346002)(451199021)(40470700004)(36840700001)(46966006)(966005)(186003)(2616005)(36756003)(2906002)(6286002)(40480700001)(55016003)(8676002)(1076003)(26005)(40460700003)(5660300002)(82310400005)(478600001)(70206006)(70586007)(6916009)(4326008)(86362001)(8936002)(54906003)(82740400003)(7636003)(356005)(83380400001)(41300700001)(47076005)(336012)(7696005)(426003)(316002)(6666004)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 21:32:16.2882 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 69c395e4-ef37-428d-799f-08db5bd52e2b 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: CO1NAM11FT077.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6784 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 This patch-set extend the modify field action API to support both multiple MPLS and GENEVE option headers. In current API, the header type is provided by rte_flow_field_id enumeration and the encapsulation level (inner/outer/tunnel) is specified by data.level field. However, there is no way to specify header inside encapsulation level. For example, for this packet: eth / mpls / mpls / mpls / ipv4 / udp the both second and third MPLS headers cannot be modified using this API. RFC: https://patchwork.dpdk.org/project/dpdk/cover/20230420092145.522389-1-michaelba@nvidia.com/ v2: - Change "sub_level" name to "tag_index". - Squash PMD changes into API changes patch. - Remove PMD private patch from the patch-set. v3: - Add TAG array API change to release notes. - Improve comment and documentation. v4: - Add "Acked-by" labels. - Add PMD adjustment for TAG array API change. v5: - Fix location of level validation. Michael Baum (5): doc: fix blank lines in modify field action description doc: fix blank line in asynchronous operations description doc: fix wrong indentation in RSS action description ethdev: add GENEVE TLV option modification support ethdev: add MPLS header modification support app/test-pmd/cmdline_flow.c | 70 +++++++++++++++- doc/guides/prog_guide/rte_flow.rst | 59 ++++++++++--- doc/guides/rel_notes/release_23_07.rst | 7 ++ drivers/net/mlx5/mlx5_flow.c | 34 ++++++++ drivers/net/mlx5/mlx5_flow.h | 23 ++++++ drivers/net/mlx5/mlx5_flow_dv.c | 110 +++++++++++-------------- drivers/net/mlx5/mlx5_flow_hw.c | 43 ++++++---- lib/ethdev/rte_flow.h | 73 +++++++++++++++- 8 files changed, 325 insertions(+), 94 deletions(-)