From patchwork Tue May 23 21:31:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 127265 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 B34DF42B73; Tue, 23 May 2023 23:32:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C895B42D39; Tue, 23 May 2023 23:32:21 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2044.outbound.protection.outlook.com [40.107.94.44]) by mails.dpdk.org (Postfix) with ESMTP id 82A9E42BDA; Tue, 23 May 2023 23:32:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QG0yuxDfzY6ZyWWCGXe5Bts6h1Mm4Au+jttEA4BGJfGKBnOUaHOJBwzciydZbZ83OIwkjccsabrDEKqyla79sBdUWLR0BP/7jmNmtUsdYGpB18Y20f943GQkyFlYM0Or55gHv3lwtN1cMw4IvfMiFylfeI6NQz6MJ9E6btfYVHVzKEgjU3iiYHT8yAWw2BGYlFsdEIq1hOd1M7VRbrrIjDYlEVUu/qlz4jHAnIqwZJ8zl/SOV2cowIliTiDBDf7fCR/Is42wcf/+U5FdqEZ84bCL2LGH094uSaXAJprWFcD3+BGfAKIl/75BtGMWtsTSVlcGUOTbhLWfA0hwqNa/9Q== 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=aLLPZxlXTjZOlnOoknUJLOI7tF1Pdm7QWMoETvNdNdg=; b=RukkiO6ykCepH13xop19TkIi4YvlIMzqjzPH2J74S1JgAsTMiFX0Mxo74xV1AXTCb57rWcE5dKUH309UjceDHnZl9pMeM27wVu9xtxazAPAsovHIJ0m2kG3LCsw+9wHXrcjSrsZJZzdBXq/xv8Sc4oGnUHvVBSAxuBZRSymUQPYJv4LgajsPg/u8eOwNntud/RjBXXqcO8VF/2a0YhoxUpnZVFv1dwssdfeGgTLIM3yKKBZAXHyDBx+uvUzCkjiX49e+f2TZ79NuxoSjFJHwmzC7AssTtUS6p5QapUvF09X94lYqMu1gYd/EYeZJXicqy76wOjeLVBmHnLJ28B8q6w== 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=aLLPZxlXTjZOlnOoknUJLOI7tF1Pdm7QWMoETvNdNdg=; b=dxr6A0xvJvMcjIq/IB1QKU0g0LUO1GHBKDVIWIeSNMWWs+EUTD83GXAduDBxC7okPmORe1ZBTUCHvcy5U0y59x0YiFsM5bBQ6Ns/nbtOSypURP4BMGGGJtEnBU+qCH2S8Sg87btc0r5jmNyZqdAt0DF6k0BHK1G6S/mWl6XiPF6DezrczZFj6BPMq/1761F0JtDhzMm87mR4/x5PBjz43+r7MfgaE78p53Op9UoYf9RmUIwOkhWfLjbqjPazEgnVomFUA8vv5v9G08naO8G0dxsqA5uJFalFgnmBd9G8Wi5BgP1fRBYnzAfPpXM1tN81yrLBBfexbkazRxXhRQodhA== Received: from DS7PR05CA0009.namprd05.prod.outlook.com (2603:10b6:5:3b9::14) by MN0PR12MB6054.namprd12.prod.outlook.com (2603:10b6:208:3ce::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:17 +0000 Received: from DM6NAM11FT078.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b9:cafe::84) by DS7PR05CA0009.outlook.office365.com (2603:10b6:5:3b9::14) 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:17 +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 DM6NAM11FT078.mail.protection.outlook.com (10.13.173.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.30 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.66) 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:07 -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:06 -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:04 -0700 From: Michael Baum To: CC: Ori Kam , Aman Singh , "Yuying Zhang" , Ferruh Yigit , "Thomas Monjalon" , , Subject: [PATCH v5 1/5] doc: fix blank lines in modify field action description Date: Wed, 24 May 2023 00:31:53 +0300 Message-ID: <20230523213157.3905696-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523213157.3905696-1-michaelba@nvidia.com> References: <20230523124805.3846360-1-michaelba@nvidia.com> <20230523213157.3905696-1-michaelba@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT078:EE_|MN0PR12MB6054:EE_ X-MS-Office365-Filtering-Correlation-Id: 6eb06273-7b69-42df-157e-08db5bd52e96 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: rL6WWF3z+xP/24myu7yObdWCpXjKi1IJflSptz3U0FGrjJItYAbc+MdBknrvdtvAPxWETuKJ3QtVJkTFLB4jYnWSuVxssy7+atWRHUDIfmkF/5EEVQm9B5Ck9p4/4dad6rKjUi9ryDn1VFu3pr65VBf32wAyrFRINl5zA+jn8Dg/ze20aV5S435T0u3xfJrkut81GpCzEPLISSHZWfAUFWo4enTYBetIy2ZekKxwNTXiSn7j+HmmPDCgAP1OlppYzsF2Fc4AQ/IkXrGMqHI0Zi2+FBGbWpSYcCnLni2pjY6ogHxcnvNtBouj9KovOS4A+hqLBc8WhecqDq+kbw8G7qK55UT4yz+cccSHlAAU7B3WISCFMVl0EXxyz4Ekp+YkBpq7hvThT4eWdbwLh8edfs/+SBiRZfKeCkNqMszoJeY+wj1CMVefuvvk3m2neMH3U0/WgRQptrxk9IasUWvZWPrC7fPihyLScFPzXGda48JEbM9b27DZXeqohFt3fhPhyrg84ESiORU8GZapbJ+Slt+BJX2SIsw5mHjzEi238sUe6nenGsaYJuTpCQJOGsc1CeHUssptJ140S9sBzM1GWhkieq26rSYHnf8xnJgtGdlJjRCrESMEWvWQAbNWqwhTmMRAYhVC/ri2HIkUzDufJ3bXisOLeWmtmQAph924XGXsTFHa60/2TZ8Lkj+7FPTU3/qYHvqsbkfnwH5c7/tx8iOmopmVhqxDbapAUicSe1A= 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:(13230028)(4636009)(39860400002)(346002)(376002)(396003)(136003)(451199021)(36840700001)(40470700004)(46966006)(2906002)(8936002)(83380400001)(5660300002)(8676002)(70586007)(82310400005)(70206006)(6666004)(6916009)(4326008)(36756003)(54906003)(316002)(7696005)(478600001)(55016003)(40480700001)(41300700001)(426003)(86362001)(356005)(26005)(2616005)(7636003)(1076003)(82740400003)(47076005)(336012)(186003)(36860700001)(6286002)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 21:32:16.9400 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6eb06273-7b69-42df-157e-08db5bd52e96 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: DM6NAM11FT078.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6054 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 The modify field action description inside "Generic flow API (rte_flow)" documentation, lists all operations supported for a destination field. In addition, it lists the values supported for a encapsulation level field. Before the lists, in both cases, miss a blank line causing them to look regular text lines. This patch adds the blank lines. Fixes: 73b68f4c54a0 ("ethdev: introduce generic modify flow action") Cc: akozyrev@nvidia.com Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Ori Kam --- doc/guides/prog_guide/rte_flow.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 32fc45516a..e7faa368a1 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -2917,20 +2917,23 @@ The immediate value ``RTE_FLOW_FIELD_VALUE`` (or a pointer to it ``RTE_FLOW_FIELD_START`` is used to point to the beginning of a packet. See ``enum rte_flow_field_id`` for the list of supported fields. -``op`` selects the operation to perform on a destination field. +``op`` selects the operation to perform on a destination field: + - ``set`` copies the data from ``src`` field to ``dst`` field. - ``add`` adds together ``dst`` and ``src`` and stores the result into ``dst``. -- ``sub`` subtracts ``src`` from ``dst`` and stores the result into ``dst`` +- ``sub`` subtracts ``src`` from ``dst`` and stores the result into ``dst``. ``width`` defines a number of bits to use from ``src`` field. ``level`` is used to access any packet field on any encapsulation level -as well as any tag element in the tag array. -- ``0`` means the default behaviour. Depending on the packet type, it can -mean outermost, innermost or anything in between. +as well as any tag element in the tag array: + +- ``0`` means the default behaviour. Depending on the packet type, + it can mean outermost, innermost or anything in between. - ``1`` requests access to the outermost packet encapsulation level. - ``2`` and subsequent values requests access to the specified packet -encapsulation level, from outermost to innermost (lower to higher values). + encapsulation level, from outermost to innermost (lower to higher values). + For the tag array (in case of multiple tags are supported and present) ``level`` translates directly into the array index. From patchwork Tue May 23 21:31:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 127266 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 222F042B73; Tue, 23 May 2023 23:32:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C54042D4E; Tue, 23 May 2023 23:32:24 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2058.outbound.protection.outlook.com [40.107.244.58]) by mails.dpdk.org (Postfix) with ESMTP id 4615642D4E; Tue, 23 May 2023 23:32:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GYT0W0+d+g7PjCoywelvd2DXcJoxL5pEnUoEpTPeALQ0ze17qt8eFuwQVtiu5er72pn7N9CSmzd0mN1CFbL5zjNfzEs6Qw92xshYqtMlLJWWnJMTa04UdbV0b3xov2SLlihbQ/FdJHOeKl5lugF4GUojeg3iUOtxaoUyMBmrjAIUFw4RwK0tyghJBahDtPGDhggUK3/yRBSniUcJdmPuUcfI7iTG6K2msoy9ls/qpn/dUkRkZUAoejYVoJLxAxNAHpYe+ZNdPl5Xhwku969s3fW5wN6LRXERJCQZaXacQbb4wyC45F+f0YXqO9Vq8Ga3P79R6MaZE2XrMPaOjRqbJQ== 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=IxhQL401jwtVUNotFVWOGbQLbCQBZLAjr/LMYiFxHps=; b=Ra5QaJkwmXP1gSIFzM6Glfqdc7b5oZVXwbYAxKSTiwMDb5n+CjLusPT83HrQVbwwEm4AZM8nTrm+tAZls++5Hq0vlj7Y70ka5ZVDmZCRHXpZaKuxGF6ILVLhxSiayiEVAHKqCMsWib+77OQ540sA9FF6UXrdmX29kdv3scOfCYyxujkIJcNvfWrOLpQEoSlmqbatnF27Ho6U5Bb9aT3S0urQGSeqJbukaMH8+stR2fCEwCq2JUzT/4IO1MbW4nON/OvePDnvDccMQN0vITQCpky65pCIwE0Eg0R74hOiTlqjAez2GChhD+Ne7b20a6E9zS+Xgx1fojaxLzsBQN1ZTA== 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=IxhQL401jwtVUNotFVWOGbQLbCQBZLAjr/LMYiFxHps=; b=R0Op1TV89xHZ/dknQnQVECYjFKluBE4T6d18Rs9OAW26Ki+DTks/Vo4iASrZQ7ZmgGhLVW7OOjq3WMc8FmrkgMfrc5o4eYr/pBqiJRyfjSzUtWtKPROLVTa/I/xe1tPNdbVrEI8UGLgoOdfwBWhPTFStMFXmbsOX6+FbCYwjsaleEl54q5hneHOrADv6J/vm7lvJNim6NPHtbyUCoMtwAchZ1rg8CfNW5HCPb0JIxLRkYpLEH3eCtrtOtWPqd8ZaFrsDcUWb+bMBEUu5Zx+89x8gsy/8lRHnO4LLcI0xGVXVKAZixpZbYwTgxO8PL1hez/Ozgtq7/cbnYY9MnmZnLA== Received: from MW3PR05CA0021.namprd05.prod.outlook.com (2603:10b6:303:2b::26) by IA0PR12MB8645.namprd12.prod.outlook.com (2603:10b6:208:48f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Tue, 23 May 2023 21:32:21 +0000 Received: from CO1NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:303:2b:cafe::3c) by MW3PR05CA0021.outlook.office365.com (2603:10b6:303:2b::26) 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:20 +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:20 +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.5; Tue, 23 May 2023 14:32:09 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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.37; Tue, 23 May 2023 14:32:09 -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:07 -0700 From: Michael Baum To: CC: Ori Kam , Aman Singh , "Yuying Zhang" , Ferruh Yigit , "Thomas Monjalon" , , Subject: [PATCH v5 2/5] doc: fix blank line in asynchronous operations description Date: Wed, 24 May 2023 00:31:54 +0300 Message-ID: <20230523213157.3905696-3-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523213157.3905696-1-michaelba@nvidia.com> References: <20230523124805.3846360-1-michaelba@nvidia.com> <20230523213157.3905696-1-michaelba@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT077:EE_|IA0PR12MB8645:EE_ X-MS-Office365-Filtering-Correlation-Id: 783b0a38-9bf5-41fa-8832-08db5bd530d0 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: uJraLo+73KXuxrVRv/Z5a7uE4u3PYZuVjhuJZoOnN+LwoEe8ut6ZLyOy2x3PiaalBeMz5XcY7OMfDi4UepL4cO1ApjP8DTvrJrteNxZVrGk4gvSd1GAHY5b81ATTtvA2kGFCyomKd52kaRKzodAP5gtBWGWr7+tqJeSMwFU2UpHT3aG115SFEw/5FwNI5OrMvtYCwzz9jBtV6KYB/sglvhJxLyfEeA42q3QJNq8kp3am1u8Zh7XmOPPUY7kBtEBl6Jq8DV0zAIeYTI9jM7sATwwnK6oCLa9sFumMM5jt5SIkykR7uYMO9w/kXrZ3P1IrDRISI7X9KlM+6GNbB6wjV/0DwPF0RQvgAOD5clfhv2IAKhv+G2mo1cu1I/3tQblw1CoiYoW/qToDV5ZVtQ5vCqYgsVHoF0NtSy4ICPPX7JsswameQVxKwVGj6+7xYp81AoS+BFdnNuXQRIH85+rszO+0AaC9E7Co0ehKiDk/24G/XwJ5azB1CIP6Go6mq54bX4q55jItiuUND/Zl/Dz6EPxi1SFjBO/gSHplFRrx+XC3S1IxeyRvt/3FoKoSj9/0GAN8YPRi/pDYfraWvzRJOid5KV9f+K3I4BJk/8H2fmfBTPdvKdso/1YedRjRE+VqF753OhpA/5AHwln9AbuWkfXk5Pwv2RVR4ACzJfRH0AnhNCKunE+D6SNpLJO0CxBTzeE6mrI+wUhS65fdwp2SPGHYvs3Pe72XMnXOQydcU9qbMlpyRAP5BHt3m9MgYVa9 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)(136003)(396003)(376002)(346002)(451199021)(40470700004)(36840700001)(46966006)(82310400005)(70206006)(70586007)(6916009)(478600001)(41300700001)(7696005)(6666004)(54906003)(316002)(4326008)(86362001)(8936002)(8676002)(5660300002)(7636003)(356005)(6286002)(26005)(186003)(1076003)(82740400003)(55016003)(40460700003)(426003)(83380400001)(2906002)(40480700001)(336012)(2616005)(36756003)(36860700001)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 21:32:20.7254 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 783b0a38-9bf5-41fa-8832-08db5bd530d0 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: IA0PR12MB8645 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 The asynchronous operations description inside "Generic flow API (rte_flow)" documentation, adds some bullets to describe asynchronous operations behavior. Before the first bullet, miss a blank line causing it to look a regular text line. This patch adds the blank line. Fixes: 197e820c6685 ("ethdev: bring in async queue-based flow rules operations") Cc: akozyrev@nvidia.com Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Ori Kam --- doc/guides/prog_guide/rte_flow.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index e7faa368a1..76e69190fc 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -3702,6 +3702,7 @@ Asynchronous operations ----------------------- Flow rules management can be done via special lockless flow management queues. + - Queue operations are asynchronous and not thread-safe. - Operations can thus be invoked by the app's datapath, From patchwork Tue May 23 21:31:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 127267 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 3520542B73; Tue, 23 May 2023 23:32:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9093742D5D; Tue, 23 May 2023 23:32:26 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2082.outbound.protection.outlook.com [40.107.102.82]) by mails.dpdk.org (Postfix) with ESMTP id 2CAEF42D4A; Tue, 23 May 2023 23:32:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UcT/paa1eVh8OvqKg++VLHbfSV69PJpKj6nEkPb/I6skYTBJUMeeGs5n+9v9eWNH0AhEv7WU3OnoCijY3jWlEVPv1Tl+rI66+hzuy+tI0bpl09K2yb8y/ZQX2SE4YdWgE/CVOkUzbOBbkqpt07e7LcrZYG4PTpS8iq1DZvA/a9Tcno4105s6lyPiMrRhwnjTW/W3aE/TvSYj/FKsHJNYaDGTvZTWSYmnb8aunY7yb2P/L2tsoQAvghyLYy0N2Ba/2sR09aH26lUsCbZmEJ2b1P0NR8N9UG6cnmb0+gqvHjCL0z8BB72Z1nOzRRtzoL8Lg4xhSJt63g4OID0F251x7w== 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=UfEr/BqaiH/QjnpJHiM+AvtC6Gi7wAnqijMClaL4i5U=; b=FheLHAx31Wf8SIyydTftCiiAZPW2PskBjs2ZmdReRiyDxmaz/adD/yYESMktMLQvTEtxoPwiLnB2OBunONMsSzBOTgiS9JoEVBINoQtBCOkpMuAlox8uMejDb/S8/Sc2nGgAgfhB7umy58YWEdc7+FlTxN2dkiNeSKsoXlcA1ByCoGJ4rdLpamX8bscZ3HdakMtczbc0ECNamcMHwWGHYOgybVw98pwF47yuWz9pDdj1/MYa2/3dmbdGZHkVbdQuqGxkqumTb/A+EGbLtiOMjwft1sOFuur6wFHawiZhKxQb1g6dBQ+hTjes8rxKnbJ0XGznilWD+YCKmJBF+Y/eog== 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=UfEr/BqaiH/QjnpJHiM+AvtC6Gi7wAnqijMClaL4i5U=; b=K+Z7hj7hwrk/CcugNaa62xj/CYjsJrsP59eQZGz/LVtz3T/oFu5wPquv6uO8M2G7dXy66N3RHDyAEgrMGtyZfW9b8feqDS+SLXK+WB7s0ppFDPonuR531P1dm3bFqzwhqvGk6lME8M++2Cr4LEq1f3ZGObdZgBfuM2Vwzgq4QriXSQq2wIMqg6eNGjC4ZFL6I+NnU/3SfOnFU8l99LDh/nCae5lAzO5GLmggyJnKTq6BOQd+3mUXvYwjkMpiB7NKDoeOigh4rVpRNzqr4Eub14sCQN7WSuF5MHKWiF19JYYZFGySVAW+QYFruCkrwGpB2+3YmOUSFG2vxjAnttVawA== Received: from MW4PR03CA0334.namprd03.prod.outlook.com (2603:10b6:303:dc::9) by MW4PR12MB7189.namprd12.prod.outlook.com (2603:10b6:303:224::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:23 +0000 Received: from CO1NAM11FT046.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dc:cafe::79) by MW4PR03CA0334.outlook.office365.com (2603:10b6:303:dc::9) 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:23 +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 CO1NAM11FT046.mail.protection.outlook.com (10.13.174.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.30 via Frontend Transport; Tue, 23 May 2023 21:32:23 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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:12 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail202.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; Tue, 23 May 2023 14:32:11 -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:09 -0700 From: Michael Baum To: CC: Ori Kam , Aman Singh , "Yuying Zhang" , Ferruh Yigit , "Thomas Monjalon" , , Subject: [PATCH v5 3/5] doc: fix wrong indentation in RSS action description Date: Wed, 24 May 2023 00:31:55 +0300 Message-ID: <20230523213157.3905696-4-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523213157.3905696-1-michaelba@nvidia.com> References: <20230523124805.3846360-1-michaelba@nvidia.com> <20230523213157.3905696-1-michaelba@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT046:EE_|MW4PR12MB7189:EE_ X-MS-Office365-Filtering-Correlation-Id: 45834399-e1a0-4506-5359-08db5bd53244 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: Y7svXmWho2w3bLsoCuTU/Mto3/Fjgm5Vkdf2hRTX8z8O8eRtWKpMkgo6o9kSJkRwBh6c2t65vO7XA7+zl7D7THE/SyQpCN+7kH5jz6FEcvXAcv4QA1IjOw0ZfEic0mcuRmm17ghcdQyVTqF2uQelPBH8PFIrUyfH8pbKfxW8uvSO4KyP/rL8AgG/s8f44BVUeijfFdDbTipdUIs1eJ9WPeFIo8dgBrISvmRZlDswNRMUUcrzvUGMtg3IIlNLX2Nl8QDdhJxlr+1gnIjmfjAy7qgTBPX8nQxCbBUL2GhfKlkzLYbuN8MZCcIlWJyJcG8zgg3H6ZJauvaGyHnnVAWpsbFxxDVIfkozD19w3gFsORb7B1LONxVlsgrCnT39Y61uK8uzmDXo2GMzlqPYsjQ/voH6Kn2Ily//+jKfxc1hpPQrquJIJA/Qo6UavNvOOXJhn7eLWLg+OFEp344oRBj91Kit3nmk3tqCZDsQ+Zex14El+XOsTbRBWpVXse0miaQ34qCCD/pjbwPeHEQEl/jKTS3DDrtttaX+DdblRmRUdLKKiTqueuS0ht9dS4Cqo3j3/5es6fE3M3FB4sabL5/CHaPMmrCRHyp1fa/r0zbOFH4cgF8qGseMHpTbk7LHtw3VLmaziv6WWcsl1ubq9pj+iJ9cFS2RuVCUUR8yz0ihdabrvYLUcyfMx93TuP8rDa1DZ9QUWbfo3FmcFjopBY7f3vuwjfTKUEPQkpD+9EmWmkhFFxF9Htxp/LQFUpRV8NYc 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)(346002)(39860400002)(396003)(136003)(376002)(451199021)(40470700004)(36840700001)(46966006)(70206006)(70586007)(83380400001)(8676002)(8936002)(5660300002)(336012)(82310400005)(47076005)(426003)(1076003)(26005)(36860700001)(86362001)(6286002)(186003)(82740400003)(356005)(7636003)(2616005)(40460700003)(6916009)(478600001)(40480700001)(55016003)(6666004)(7696005)(316002)(4326008)(36756003)(41300700001)(54906003)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 21:32:23.1776 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45834399-e1a0-4506-5359-08db5bd53244 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: CO1NAM11FT046.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7189 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 The RSS action description inside "Generic flow API (rte_flow)" documentation, lists the values supported for a encapsulation level field. For "2" value, it uses 3 spaces as an indentation instead of 2 after line breaking, causing the first line to be bold. This patch updates the number of spaces in the indentation. Fixes: 18aee2861a1f ("ethdev: add encap level to RSS flow API action") Cc: adrien.mazarguil@6wind.com Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Ori Kam --- doc/guides/prog_guide/rte_flow.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 76e69190fc..25b57bf86d 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -1954,8 +1954,8 @@ Also, regarding packet encapsulation ``level``: level. - ``2`` and subsequent values request RSS to be performed on the specified - inner packet encapsulation level, from outermost to innermost (lower to - higher values). + inner packet encapsulation level, from outermost to innermost (lower to + higher values). Values other than ``0`` are not necessarily supported. From patchwork Tue May 23 21:31:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 127268 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 9004142B73; Tue, 23 May 2023 23:32:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E472542D63; Tue, 23 May 2023 23:32:31 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2056.outbound.protection.outlook.com [40.107.96.56]) by mails.dpdk.org (Postfix) with ESMTP id 2379E42D61 for ; Tue, 23 May 2023 23:32:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ngw6/bgyuZN6bHYjFGUUUx+BWVhD3zB+Npn2kdH0eye/x6XQ0O86uNybReTdloeLHnsxAUlrh2CU4RWmxXQhKPWJs/6T+DWIeUtFwQ5BkDT3ivt/hKU9oA4mdkZ32nR2o4znmWLoQxokQwgy6uDgzrfJwjgb8WmTksHaazrBIYFCIKxusojDJrPXw0a51m0KB4Wczx75hRocvkrtJ8Us92MddrDRf/gaESu9eF93rt+iQqzjm6vdQS+Pa7Xts2XiBZ069ZWmOUXxnjZ9nniz7qO/X3Dk7P5cAWFswk8p+f6oJd6gy5liKhIwoboc3OfCeTgB3FCgtTz5bh2JGxnygw== 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=9buUDCd18YyXtIhw72tFmB6J+3nRaPdUBWn7LzVSvHE=; b=K4AnLhaoLLNpZezzVw5Zs9HnffjxOmGvpgXY8Ar//VTPiJFCHyQHr9REXJBjsXAdGHh0EMLVlgDPt13Pi4mF4/Y4Y24EzWcui5sudSRZsV3o3jXe6KPevHzCY6r2+YkJUHe8YTyP5Pc/5EnyY1ldgAT63Efy2roTfCuIBY/AtnLRZQ28GsVNrVgW562nTqM/Qz3e05d8dyldRBD2f5vLdNn2/3XWcskXiABpLDZyxsmNGWoQXghO8SqehkNkeWEyOF6gYZmVmuRTBlWDyOB/IgDZ4D6bGBoJDpUh5o7Fv0B+Ca8rsozHYU3KnYAzflFiBwDQFc2hZY9h4IBP/PeYYw== 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=9buUDCd18YyXtIhw72tFmB6J+3nRaPdUBWn7LzVSvHE=; b=bm86t0Fj5XNC2Y+GakhJmnHeMQJLK7zgrRqH2Mgqm8cC3LExHRa+Fp4bZzUViKTlNZ7R4l9duMWOdhqsIhQFPoFdHoBpIEX5xhS5IjlI2bN6aS7XPyH8RfDTxNFV1rRNVNu36RjTZtvdoxmLlizg0zCscGMlvB9nCjuCkq6xb7o6UHs8lDWaoDQ8b+41ZTc9k9SpjHU8UOCWnslQ31VDUfcY3n4VaSkQdltFCF/AYfbTnlgu6nmYervvyoWw4y/WJcraS/d/Ux78DYmOIOMSrevJFp74Okl7s++YW9Phzc6+dafQkb2ZCOHnE6P1mrpH3gR524KH+1uUI58HsL2e6g== Received: from MW4PR03CA0355.namprd03.prod.outlook.com (2603:10b6:303:dc::30) by SA1PR12MB7198.namprd12.prod.outlook.com (2603:10b6:806:2bf::21) 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:27 +0000 Received: from CO1NAM11FT046.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dc:cafe::6c) by MW4PR03CA0355.outlook.office365.com (2603:10b6:303:dc::30) 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:27 +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 CO1NAM11FT046.mail.protection.outlook.com (10.13.174.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.30 via Frontend Transport; Tue, 23 May 2023 21:32:27 +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.5; Tue, 23 May 2023 14:32:14 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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.37; Tue, 23 May 2023 14:32:14 -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:12 -0700 From: Michael Baum To: CC: Ori Kam , Aman Singh , "Yuying Zhang" , Ferruh Yigit , "Thomas Monjalon" Subject: [PATCH v5 4/5] ethdev: add GENEVE TLV option modification support Date: Wed, 24 May 2023 00:31:56 +0300 Message-ID: <20230523213157.3905696-5-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523213157.3905696-1-michaelba@nvidia.com> References: <20230523124805.3846360-1-michaelba@nvidia.com> <20230523213157.3905696-1-michaelba@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT046:EE_|SA1PR12MB7198:EE_ X-MS-Office365-Filtering-Correlation-Id: 62e47fae-72dc-4ebe-ed95-08db5bd534d3 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: YIpsB9yrJUlebtJh5OVpfKRvtjoa0UjuAlz8cPJj8KZ6ZEYxVCtU/PbuwlUd9rpzYcndEThkZlp1T1ZwyNlh3Xh6ZTCi3DOz387BKWUm4JKM1+qBlxu2JOJD6vlC5nosXOdgtZSCpq0hf7KfMw3yyaM+NEIM6roFx/duc8R/0h8AHg5ujdOn3UQtHyd05swDxjv+OEXXjtnpwWgJwcVMmke3IfAF8p1BxCzlqr3ioNAcH9MQIIGCWjPQ9Ab+9ai0473YeBVOMpKDwExl33nsbTVaIhljJ6dIHCq/AfspQc8i8JyZ8NWpHE+/kA78DPpTJEz26M3ac2xK2YJ0yJgNsb9Ai4afhnA0GeOUfjrObeo5QHOqT73sOqs1gLQ9VP8Nm2yPOc0P/wmbktWfuNX4NZf4a+PgBUB+MgOOjTRYShn1SFuRCAndxbksaxQ6J6sTCPt/edKe8PD9LqC7pWaNU0MvFli1+hTY6K2Mw9zJX5GcHrYzQt+v+caI/NusLh0daWLdkJrYB411VSWl382tgbrh21Cab2sg5HgLIEQz4inlOTcfbeaj/8ca313IninQl0bb2RGOG/RvcDig9usTMMb6kb2USV+4xAPopFUgKmPHnPr0FcfsQQUywRwUp49OXC7IrL7+rjg11c+a9J+HKlBGJpte2soBmFVfzbdD9pYBWBhgW0yMYJeCVl8xqQkeV15Qg9q7HJbV3FSpQuSc+nR6tuOVIV+EZrIg77gcIDbLCAIU43X6qZ9K3a8ZLPr9DwfWR/yV3YV3gDUFrS0icg== 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)(396003)(136003)(376002)(346002)(451199021)(46966006)(36840700001)(40470700004)(478600001)(55016003)(40480700001)(26005)(1076003)(316002)(6666004)(54906003)(41300700001)(7696005)(70206006)(6916009)(4326008)(70586007)(5660300002)(40460700003)(82740400003)(36860700001)(83380400001)(47076005)(86362001)(7636003)(356005)(2616005)(426003)(336012)(2906002)(8676002)(36756003)(30864003)(8936002)(82310400005)(186003)(6286002)(21314003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 21:32:27.4429 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62e47fae-72dc-4ebe-ed95-08db5bd534d3 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: CO1NAM11FT046.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7198 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 modify field support for GENEVE option fields: - "RTE_FLOW_FIELD_GENEVE_OPT_TYPE" - "RTE_FLOW_FIELD_GENEVE_OPT_CLASS" - "RTE_FLOW_FIELD_GENEVE_OPT_DATA" Each GENEVE TLV option is identified by both its "class" and "type", so 2 new fields were added to "rte_flow_action_modify_data" structure to help specify which option to modify. To get room for those 2 new fields, the "level" field move to use "uint8_t" which is more than enough for encapsulation level. This patch also reduces all modify field encapsulation level "fully masked" initializations to use UINT8_MAX instead of UINT32_MAX. This change avoids compilation warning caused by this API changing. Signed-off-by: Michael Baum Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 48 +++++++++++++++++++++++++- doc/guides/prog_guide/rte_flow.rst | 23 ++++++++++++ doc/guides/rel_notes/release_23_07.rst | 3 ++ drivers/net/mlx5/mlx5_flow_hw.c | 22 ++++++------ lib/ethdev/rte_flow.h | 48 +++++++++++++++++++++++++- 5 files changed, 131 insertions(+), 13 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 58939ec321..8c1dea53c0 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -636,11 +636,15 @@ enum index { ACTION_MODIFY_FIELD_DST_TYPE_VALUE, ACTION_MODIFY_FIELD_DST_LEVEL, ACTION_MODIFY_FIELD_DST_LEVEL_VALUE, + ACTION_MODIFY_FIELD_DST_TYPE_ID, + ACTION_MODIFY_FIELD_DST_CLASS_ID, ACTION_MODIFY_FIELD_DST_OFFSET, ACTION_MODIFY_FIELD_SRC_TYPE, ACTION_MODIFY_FIELD_SRC_TYPE_VALUE, ACTION_MODIFY_FIELD_SRC_LEVEL, ACTION_MODIFY_FIELD_SRC_LEVEL_VALUE, + ACTION_MODIFY_FIELD_SRC_TYPE_ID, + ACTION_MODIFY_FIELD_SRC_CLASS_ID, ACTION_MODIFY_FIELD_SRC_OFFSET, ACTION_MODIFY_FIELD_SRC_VALUE, ACTION_MODIFY_FIELD_SRC_POINTER, @@ -854,7 +858,9 @@ static const char *const modify_field_ids[] = { "ipv4_ecn", "ipv6_ecn", "gtp_psc_qfi", "meter_color", "ipv6_proto", "flex_item", - "hash_result", NULL + "hash_result", + "geneve_opt_type", "geneve_opt_class", "geneve_opt_data", + NULL }; static const char *const meter_colors[] = { @@ -2295,6 +2301,8 @@ static const enum index next_action_sample[] = { static const enum index action_modify_field_dst[] = { ACTION_MODIFY_FIELD_DST_LEVEL, + ACTION_MODIFY_FIELD_DST_TYPE_ID, + ACTION_MODIFY_FIELD_DST_CLASS_ID, ACTION_MODIFY_FIELD_DST_OFFSET, ACTION_MODIFY_FIELD_SRC_TYPE, ZERO, @@ -2302,6 +2310,8 @@ static const enum index action_modify_field_dst[] = { static const enum index action_modify_field_src[] = { ACTION_MODIFY_FIELD_SRC_LEVEL, + ACTION_MODIFY_FIELD_SRC_TYPE_ID, + ACTION_MODIFY_FIELD_SRC_CLASS_ID, ACTION_MODIFY_FIELD_SRC_OFFSET, ACTION_MODIFY_FIELD_SRC_VALUE, ACTION_MODIFY_FIELD_SRC_POINTER, @@ -6388,6 +6398,24 @@ static const struct token token_list[] = { .call = parse_vc_modify_field_level, .comp = comp_none, }, + [ACTION_MODIFY_FIELD_DST_TYPE_ID] = { + .name = "dst_type_id", + .help = "destination field type ID", + .next = NEXT(action_modify_field_dst, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field, + dst.type)), + .call = parse_vc_conf, + }, + [ACTION_MODIFY_FIELD_DST_CLASS_ID] = { + .name = "dst_class", + .help = "destination field class ID", + .next = NEXT(action_modify_field_dst, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_action_modify_field, + dst.class_id)), + .call = parse_vc_conf, + }, [ACTION_MODIFY_FIELD_DST_OFFSET] = { .name = "dst_offset", .help = "destination field bit offset", @@ -6423,6 +6451,24 @@ static const struct token token_list[] = { .call = parse_vc_modify_field_level, .comp = comp_none, }, + [ACTION_MODIFY_FIELD_SRC_TYPE_ID] = { + .name = "src_type_id", + .help = "source field type ID", + .next = NEXT(action_modify_field_src, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field, + src.type)), + .call = parse_vc_conf, + }, + [ACTION_MODIFY_FIELD_SRC_CLASS_ID] = { + .name = "src_class", + .help = "source field class ID", + .next = NEXT(action_modify_field_src, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_action_modify_field, + src.class_id)), + .call = parse_vc_conf, + }, [ACTION_MODIFY_FIELD_SRC_OFFSET] = { .name = "src_offset", .help = "source field bit offset", diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 25b57bf86d..ec812de335 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -2937,6 +2937,14 @@ as well as any tag element in the tag array: For the tag array (in case of multiple tags are supported and present) ``level`` translates directly into the array index. +``type`` is used to specify (along with ``class_id``) the Geneve option which +is being modified. +This field is relevant only for ``RTE_FLOW_FIELD_GENEVE_OPT_XXXX`` type. + +``class_id`` is used to specify (along with ``type``) the Geneve option which +is being modified. +This field is relevant only for ``RTE_FLOW_FIELD_GENEVE_OPT_XXXX`` type. + ``flex_handle`` is used to specify the flex item pointer which is being modified. ``flex_handle`` and ``level`` are mutually exclusive. @@ -2967,6 +2975,17 @@ to replace the third byte of MAC address with value 0x85, application should specify destination width as 8, destination offset as 16, and provide immediate value as sequence of bytes {xxx, xxx, 0x85, xxx, xxx, xxx}. +The ``RTE_FLOW_FIELD_GENEVE_OPT_DATA`` type supports modifying only one DW in +single action and align to 32 bits. For example, for modifying 16 bits start +from offset 24, 2 different actions should be prepared. The first one includs +``offset=24`` and ``width=8``, and the seconde one includs ``offset=32`` and +``width=8``. +Application should provide the data in immediate value memory only for the +single DW even though the offset is related to start of first DW. For example, +to replace the third byte of second DW in Geneve option data with value 0x85, +application should specify destination width as 8, destination offset as 48, +and provide immediate value 0xXXXX85XX. + .. _table_rte_flow_action_modify_field: .. table:: MODIFY_FIELD @@ -2994,6 +3013,10 @@ value as sequence of bytes {xxx, xxx, 0x85, xxx, xxx, xxx}. +-----------------+----------------------------------------------------------+ | ``level`` | encapsulation level of a packet field or tag array index | +-----------------+----------------------------------------------------------+ + | ``type`` | geneve option type | + +-----------------+----------------------------------------------------------+ + | ``class_id`` | geneve option class ID | + +-----------------+----------------------------------------------------------+ | ``flex_handle`` | flex item handle of a packet field | +-----------------+----------------------------------------------------------+ | ``offset`` | number of bits to skip at the beginning | diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst index a9b1293689..ce1755096f 100644 --- a/doc/guides/rel_notes/release_23_07.rst +++ b/doc/guides/rel_notes/release_23_07.rst @@ -84,6 +84,9 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* The ``level`` field in experimental structure + ``struct rte_flow_action_modify_data`` was reduced to 8 bits. + ABI Changes ----------- diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 7e0ee8d883..1b68a19900 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -3565,7 +3565,7 @@ flow_hw_validate_action_modify_field(const struct rte_flow_action *action, return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "immediate value, pointer and hash result cannot be used as destination"); - if (mask_conf->dst.level != UINT32_MAX) + if (mask_conf->dst.level != UINT8_MAX) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "destination encapsulation level must be fully masked"); @@ -3579,7 +3579,7 @@ flow_hw_validate_action_modify_field(const struct rte_flow_action *action, "destination field mask and template are not equal"); if (action_conf->src.field != RTE_FLOW_FIELD_POINTER && action_conf->src.field != RTE_FLOW_FIELD_VALUE) { - if (mask_conf->src.level != UINT32_MAX) + if (mask_conf->src.level != UINT8_MAX) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "source encapsulation level must be fully masked"); @@ -4450,7 +4450,7 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, .operation = RTE_FLOW_MODIFY_SET, .dst = { .field = RTE_FLOW_FIELD_VLAN_ID, - .level = 0xffffffff, .offset = 0xffffffff, + .level = 0xff, .offset = 0xffffffff, }, .src = { .field = RTE_FLOW_FIELD_VALUE, @@ -4583,12 +4583,12 @@ flow_hw_actions_template_create(struct rte_eth_dev *dev, .operation = RTE_FLOW_MODIFY_SET, .dst = { .field = (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG, - .level = UINT32_MAX, + .level = UINT8_MAX, .offset = UINT32_MAX, }, .src = { .field = (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG, - .level = UINT32_MAX, + .level = UINT8_MAX, .offset = UINT32_MAX, }, .width = UINT32_MAX, @@ -5653,7 +5653,7 @@ flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev) .operation = RTE_FLOW_MODIFY_SET, .dst = { .field = (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG, - .level = UINT32_MAX, + .level = UINT8_MAX, .offset = UINT32_MAX, }, .src = { @@ -5677,12 +5677,12 @@ flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev) .operation = RTE_FLOW_MODIFY_SET, .dst = { .field = (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG, - .level = UINT32_MAX, + .level = UINT8_MAX, .offset = UINT32_MAX, }, .src = { .field = (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG, - .level = UINT32_MAX, + .level = UINT8_MAX, .offset = UINT32_MAX, }, .width = UINT32_MAX, @@ -6009,7 +6009,7 @@ flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev) .operation = RTE_FLOW_MODIFY_SET, .dst = { .field = (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG, - .level = UINT32_MAX, + .level = UINT8_MAX, .offset = UINT32_MAX, }, .src = { @@ -6182,12 +6182,12 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev) .operation = RTE_FLOW_MODIFY_SET, .dst = { .field = (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG, - .level = UINT32_MAX, + .level = UINT8_MAX, .offset = UINT32_MAX, }, .src = { .field = (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG, - .level = UINT32_MAX, + .level = UINT8_MAX, .offset = UINT32_MAX, }, .width = UINT32_MAX, diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index 713ba8b65c..f30d4b033f 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3773,6 +3773,9 @@ enum rte_flow_field_id { RTE_FLOW_FIELD_IPV6_PROTO, /**< IPv6 next header. */ RTE_FLOW_FIELD_FLEX_ITEM, /**< Flex item. */ RTE_FLOW_FIELD_HASH_RESULT, /**< Hash result. */ + RTE_FLOW_FIELD_GENEVE_OPT_TYPE, /**< GENEVE option type */ + RTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class */ + RTE_FLOW_FIELD_GENEVE_OPT_DATA /**< GENEVE option data */ }; /** @@ -3788,7 +3791,50 @@ struct rte_flow_action_modify_data { struct { /** Encapsulation level or tag index or flex item handle. */ union { - uint32_t level; + struct { + /** + * Packet encapsulation level containing + * the field modify to. + * + * - @p 0 requests the default behavior. + * Depending on the packet type, it + * can mean outermost, innermost or + * anything in between. + * + * It basically stands for the + * innermost encapsulation level + * modification can be performed on + * according to PMD and device + * capabilities. + * + * - @p 1 requests modification to be + * performed on the outermost packet + * encapsulation level. + * + * - @p 2 and subsequent values request + * modification to be performed on + * the specified inner packet + * encapsulation level, from + * outermost to innermost (lower to + * higher values). + * + * Values other than @p 0 are not + * necessarily supported. + */ + uint8_t level; + /** + * Geneve option type. relevant only + * for RTE_FLOW_FIELD_GENEVE_OPT_XXXX + * modification type. + */ + uint8_t type; + /** + * Geneve option class. relevant only + * for RTE_FLOW_FIELD_GENEVE_OPT_XXXX + * modification type. + */ + rte_be16_t class_id; + }; struct rte_flow_item_flex_handle *flex_handle; }; /** Number of bits to skip from a field. */ From patchwork Tue May 23 21:31:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 127269 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 C30BA42B73; Tue, 23 May 2023 23:33:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B01D42D61; Tue, 23 May 2023 23:32:36 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2053.outbound.protection.outlook.com [40.107.220.53]) by mails.dpdk.org (Postfix) with ESMTP id 1AD0442D4A for ; Tue, 23 May 2023 23:32:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SZkdf6ZknYNIm0zn1BBBO/yvIZsNMFb6IlOfkbpgxLXj0jSBdgnLLwsXz9JLZ9is7YZcH2oSETMtMMeceR4COi/5EOAyqgSv2rZRIOO+7guNbXSKloi+GxDRXOfftytSgn7YDxeVYJCBCaaEXray9B30imrkQDHl0ocH99i6if6PnGl8wswZw0lAqQpjge6TKGHaP6O31nGnjDCiQ26fpSFVAah6zLj+f1871pNhjB9eXVaUe7qFdP1BHq7G9oOMSisoLUtVGN3KPRQpu7bE4XLLi/yQlVzp5TGt6DhMcZRXBKZNMYbuCT0O4EFbEi0ZHKN6F25mthvMOAiuAyCUZw== 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=DuW+vxrbtyWcURs6/j3GY5r7k3pCAa9oLQrn1h7pC9o=; b=NbQrS+Xm7KgzTVWwaMmt4YuaVIMBBCgO5sIuITZUJCnmxk8Ca2wshGsji+Vts+1TIYMZgCz+k9VMUx4f6ZwhJarbBLwt/4FDoU1R0JNg5vGD4dd6N6V2kaXmiye13s4Mi4QRZCt1BcCieH/oSoNPOSXgNe/6Wu8K1C7ULe7qeLQboySMtGNa5nglgTeQwnWlSp4zRNAf67sGcEus6ux6/ikajSkC5IOc5Clmaky2ty8eQRH4otRe/cxFqpiEq+xsPekbwSI7JCbag5iQ88UDR9NE3jXh6eFqN1/LNjFYZmilkSguE/K7hYkRUW1CXmGtQkjrxs8EV87P5BLo9FtmOA== 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=DuW+vxrbtyWcURs6/j3GY5r7k3pCAa9oLQrn1h7pC9o=; b=ebqBlemiRNTVcnWC74+ubZo8iIjfXX9ZT4nq6a6/lut89iuOCVTPz7/shIMdg/lni/arWMD5zMhjJypmSZRwbVn8Xp6SfTRdz6dcdzwGyHZAuoHExJ6GGVC+FmX4ybFJPK/ue30c30/FmzDuh87B3GsgLwZOEAkngprkJWH5Ud9P+5OY4TxqksGVKebfWoGqFeQc0PG5vxy4a9I+cif3roA9UEmf3QIX5jnIPUEjJdBOJWIrCbnWSnX1TZwV8mQSZoss8GAxEf2gqrKeHyvNWQG9Jd3xeAEHZtJb3osUFQfxKgjEHEI54vAuFSYJRHcC8T+1/h7XpBaai/ibqls4Lg== Received: from MW4PR04CA0251.namprd04.prod.outlook.com (2603:10b6:303:88::16) by PH0PR12MB5484.namprd12.prod.outlook.com (2603:10b6:510:eb::14) 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:32 +0000 Received: from CO1NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:303:88:cafe::a4) by MW4PR04CA0251.outlook.office365.com (2603:10b6:303:88::16) 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:32 +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 CO1NAM11FT006.mail.protection.outlook.com (10.13.174.246) 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:32 +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.5; Tue, 23 May 2023 14:32:17 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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.37; Tue, 23 May 2023 14:32:16 -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:14 -0700 From: Michael Baum To: CC: Ori Kam , Aman Singh , "Yuying Zhang" , Ferruh Yigit , "Thomas Monjalon" Subject: [PATCH v5 5/5] ethdev: add MPLS header modification support Date: Wed, 24 May 2023 00:31:57 +0300 Message-ID: <20230523213157.3905696-6-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523213157.3905696-1-michaelba@nvidia.com> References: <20230523124805.3846360-1-michaelba@nvidia.com> <20230523213157.3905696-1-michaelba@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT006:EE_|PH0PR12MB5484:EE_ X-MS-Office365-Filtering-Correlation-Id: 18b99d75-95c8-4945-8b02-08db5bd537a1 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: QptqfKK8Eu+e0FWXivLvVb6E/BZAIaT4UgWN9EGPeCW2KPmwjxF3Z2z8ainfKFVjYSvEI4RpKveQTtnm87j5jWUadJ0JoFif2r6CkpAOTTwGsJirAD66Psy9kgKmKH+brpOL8Hyy5QU+vCSOwcpGl/zXzx/JdY0veBY5OfTamYPdddl106txeXcSFxurptmg9dyORr1i6XeQzlZI2sIv7m+8KXCs5OwvCIrABKhSvdYcajwO7cHYfTMQYuFINuB28Ct8nEOmnjgrvgOai/qa5KljkMCObQ3FBX8GWs4SicakFRN2vmtWCjmaOv/K6ywNPMo8bcj9Hh94WD9VuGh5OffEHyJvgCO26W61y141AZx3++w90oADxHcavyjIL36Q0LT4O/mw3eHD6+fkUrQm9zog6yjfx2kOnbEbSHjIgw/q0mPBzh+0Bvje6iKET+o/eYI3clEvsJE7/poAwpC6ZS6dq3dtFMgFQFlE9VYyVs6xgL1NpmcixxF8G6KeMZFCWe2+j0S0Dun+LrNjikzGW2OUR+cnv5FruRCvYt+9nVgjZTQ42bzSzzkSprVyLNxaIFvjTBwBq2kSSU2qGWockKCxND9Ewz+vtnOzXxK64KrP+4721jtGcbDpcLVK0EqdAsuvUo3sP+YxzDh+Crh1ef8FQh5alRIpdmU/LjSYflsrPqd6X51LNCmd3JIB74sUmgzjvOBUpT2g2mqR2/G0PC/VksksHkVFW+TA/jP78YYMTpNyfTK8tVQcITKNbg2W 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)(376002)(346002)(396003)(136003)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(336012)(426003)(83380400001)(4326008)(70586007)(70206006)(86362001)(36860700001)(36756003)(6666004)(54906003)(7636003)(356005)(82740400003)(55016003)(478600001)(40480700001)(30864003)(2906002)(82310400005)(47076005)(40460700003)(6916009)(7696005)(8936002)(6286002)(8676002)(186003)(41300700001)(26005)(1076003)(5660300002)(2616005)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 21:32:32.1615 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 18b99d75-95c8-4945-8b02-08db5bd537a1 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: CO1NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5484 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 support for MPLS modify header using "RTE_FLOW_FIELD_MPLS" id. Since MPLS heaser might appear more the one time in inner/outer/tunnel, a new field was added to "rte_flow_action_modify_data" structure in addition to "level" field. The "tag_index" field is the index of the header inside encapsulation level. It is used for modify multiple MPLS headers in same encapsulation level. This addition enables to modify multiple VLAN headers too, so the description of "RTE_FLOW_FIELD_VLAN_XXXX" was updated. Since the "tag_index" field is added, the "RTE_FLOW_FIELD_TAG" type moves to use it for tag array instead of using "level" field. Using "level" is still supported for backwards compatibility when "tag_index" field is zero. Signed-off-by: Michael Baum Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 24 +++++- doc/guides/prog_guide/rte_flow.rst | 18 ++-- doc/guides/rel_notes/release_23_07.rst | 8 +- 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 | 21 +++-- lib/ethdev/rte_flow.h | 51 ++++++++---- 8 files changed, 199 insertions(+), 90 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 8c1dea53c0..a51e37276b 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -636,6 +636,7 @@ enum index { ACTION_MODIFY_FIELD_DST_TYPE_VALUE, ACTION_MODIFY_FIELD_DST_LEVEL, ACTION_MODIFY_FIELD_DST_LEVEL_VALUE, + ACTION_MODIFY_FIELD_DST_TAG_INDEX, ACTION_MODIFY_FIELD_DST_TYPE_ID, ACTION_MODIFY_FIELD_DST_CLASS_ID, ACTION_MODIFY_FIELD_DST_OFFSET, @@ -643,6 +644,7 @@ enum index { ACTION_MODIFY_FIELD_SRC_TYPE_VALUE, ACTION_MODIFY_FIELD_SRC_LEVEL, ACTION_MODIFY_FIELD_SRC_LEVEL_VALUE, + ACTION_MODIFY_FIELD_SRC_TAG_INDEX, ACTION_MODIFY_FIELD_SRC_TYPE_ID, ACTION_MODIFY_FIELD_SRC_CLASS_ID, ACTION_MODIFY_FIELD_SRC_OFFSET, @@ -859,7 +861,7 @@ static const char *const modify_field_ids[] = { "ipv6_proto", "flex_item", "hash_result", - "geneve_opt_type", "geneve_opt_class", "geneve_opt_data", + "geneve_opt_type", "geneve_opt_class", "geneve_opt_data", "mpls", NULL }; @@ -2301,6 +2303,7 @@ static const enum index next_action_sample[] = { static const enum index action_modify_field_dst[] = { ACTION_MODIFY_FIELD_DST_LEVEL, + ACTION_MODIFY_FIELD_DST_TAG_INDEX, ACTION_MODIFY_FIELD_DST_TYPE_ID, ACTION_MODIFY_FIELD_DST_CLASS_ID, ACTION_MODIFY_FIELD_DST_OFFSET, @@ -2310,6 +2313,7 @@ static const enum index action_modify_field_dst[] = { static const enum index action_modify_field_src[] = { ACTION_MODIFY_FIELD_SRC_LEVEL, + ACTION_MODIFY_FIELD_SRC_TAG_INDEX, ACTION_MODIFY_FIELD_SRC_TYPE_ID, ACTION_MODIFY_FIELD_SRC_CLASS_ID, ACTION_MODIFY_FIELD_SRC_OFFSET, @@ -6398,6 +6402,15 @@ static const struct token token_list[] = { .call = parse_vc_modify_field_level, .comp = comp_none, }, + [ACTION_MODIFY_FIELD_DST_TAG_INDEX] = { + .name = "dst_tag_index", + .help = "destination field tag array", + .next = NEXT(action_modify_field_dst, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field, + dst.tag_index)), + .call = parse_vc_conf, + }, [ACTION_MODIFY_FIELD_DST_TYPE_ID] = { .name = "dst_type_id", .help = "destination field type ID", @@ -6451,6 +6464,15 @@ static const struct token token_list[] = { .call = parse_vc_modify_field_level, .comp = comp_none, }, + [ACTION_MODIFY_FIELD_SRC_TAG_INDEX] = { + .name = "stc_tag_index", + .help = "source field tag array", + .next = NEXT(action_modify_field_src, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field, + src.tag_index)), + .call = parse_vc_conf, + }, [ACTION_MODIFY_FIELD_SRC_TYPE_ID] = { .name = "src_type_id", .help = "source field type ID", diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index ec812de335..e4328e7ed6 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -2925,8 +2925,7 @@ See ``enum rte_flow_field_id`` for the list of supported fields. ``width`` defines a number of bits to use from ``src`` field. -``level`` is used to access any packet field on any encapsulation level -as well as any tag element in the tag array: +``level`` is used to access any packet field on any encapsulation level: - ``0`` means the default behaviour. Depending on the packet type, it can mean outermost, innermost or anything in between. @@ -2934,8 +2933,15 @@ as well as any tag element in the tag array: - ``2`` and subsequent values requests access to the specified packet encapsulation level, from outermost to innermost (lower to higher values). -For the tag array (in case of multiple tags are supported and present) -``level`` translates directly into the array index. +``tag_index`` is the index of the header inside encapsulation level. +It is used for modify either ``VLAN`` or ``MPLS`` or ``TAG`` headers which +multiple of them might be supported in same encapsulation level. + +.. note:: + + For ``RTE_FLOW_FIELD_TAG`` type, the tag array was provided in ``level`` + field and it is still supported for backwards compatibility. + When ``tag_index`` is zero, the tag array is taken from ``level`` field. ``type`` is used to specify (along with ``class_id``) the Geneve option which is being modified. @@ -3011,7 +3017,9 @@ and provide immediate value 0xXXXX85XX. +=================+==========================================================+ | ``field`` | ID: packet field, mark, meta, tag, immediate, pointer | +-----------------+----------------------------------------------------------+ - | ``level`` | encapsulation level of a packet field or tag array index | + | ``level`` | encapsulation level of a packet field | + +-----------------+----------------------------------------------------------+ + | ``tag_index`` | tag index inside encapsulation level | +-----------------+----------------------------------------------------------+ | ``type`` | geneve option type | +-----------------+----------------------------------------------------------+ diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst index ce1755096f..fd3e35eea3 100644 --- a/doc/guides/rel_notes/release_23_07.rst +++ b/doc/guides/rel_notes/release_23_07.rst @@ -84,8 +84,12 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= -* The ``level`` field in experimental structure - ``struct rte_flow_action_modify_data`` was reduced to 8 bits. +* ethdev: in experimental structure ``struct rte_flow_action_modify_data``: + + * ``level`` field was reduced to 8 bits. + + * ``tag_index`` field replaced ``level`` field in representing tag array for + ``RTE_FLOW_FIELD_TAG`` type. ABI Changes diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 19f7f92717..867b7b8ea2 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2318,6 +2318,40 @@ mlx5_validate_action_ct(struct rte_eth_dev *dev, return 0; } +/** + * Validate the level value for modify field action. + * + * @param[in] data + * Pointer to the rte_flow_action_modify_data structure either src or dst. + * @param[out] error + * Pointer to error structure. + * + * @return + * 0 on success, a negative errno value otherwise and rte_errno is set. + */ +int +flow_validate_modify_field_level(const struct rte_flow_action_modify_data *data, + struct rte_flow_error *error) +{ + if (data->level == 0) + return 0; + if (data->field != RTE_FLOW_FIELD_TAG) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_ACTION, NULL, + "inner header fields modification is not supported"); + if (data->tag_index != 0) + return rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, NULL, + "tag array can be provided using 'level' or 'tag_index' fields, not both"); + /* + * The tag array for RTE_FLOW_FIELD_TAG type is provided using + * 'tag_index' field. In old API, it was provided using 'level' field + * and it is still supported for backwards compatibility. + */ + DRV_LOG(WARNING, "tag array provided in 'level' field instead of 'tag_index' field."); + return 0; +} + /** * Validate ICMP6 item. * diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 1d116ea0f6..cba04b4f45 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1045,6 +1045,26 @@ flow_items_to_tunnel(const struct rte_flow_item items[]) return items[0].spec; } +/** + * Gets the tag array given for RTE_FLOW_FIELD_TAG type. + * + * In old API the value was provided in "level" field, but in new API + * it is provided in "tag_array" field. Since encapsulation level is not + * relevant for metadata, the tag array can be still provided in "level" + * for backwards compatibility. + * + * @param[in] data + * Pointer to tag modify data structure. + * + * @return + * Tag array index. + */ +static inline uint8_t +flow_tag_index_get(const struct rte_flow_action_modify_data *data) +{ + return data->tag_index ? data->tag_index : data->level; +} + /** * Fetch 1, 2, 3 or 4 byte field from the byte array * and return as unsigned integer in host-endian format. @@ -2276,6 +2296,9 @@ int mlx5_flow_validate_action_rss(const struct rte_flow_action *action, int mlx5_flow_validate_action_default_miss(uint64_t action_flags, const struct rte_flow_attr *attr, struct rte_flow_error *error); +int flow_validate_modify_field_level + (const struct rte_flow_action_modify_data *data, + struct rte_flow_error *error); int mlx5_flow_item_acceptable(const struct rte_flow_item *item, const uint8_t *mask, const uint8_t *nic_mask, diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index f136f43b0a..3070f75ce8 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1896,16 +1896,17 @@ mlx5_flow_field_id_to_modify_info case RTE_FLOW_FIELD_TAG: { MLX5_ASSERT(data->offset + width <= 32); + uint8_t tag_index = flow_tag_index_get(data); int reg; - off_be = (data->level == MLX5_LINEAR_HASH_TAG_INDEX) ? + off_be = (tag_index == MLX5_LINEAR_HASH_TAG_INDEX) ? 16 - (data->offset + width) + 16 : data->offset; if (priv->sh->config.dv_flow_en == 2) reg = flow_hw_get_reg_id(RTE_FLOW_ITEM_TYPE_TAG, - data->level); + tag_index); else reg = mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, - data->level, error); + tag_index, error); if (reg < 0) return; MLX5_ASSERT(reg != REG_NON); @@ -1985,7 +1986,7 @@ mlx5_flow_field_id_to_modify_info { uint32_t meta_mask = priv->sh->dv_meta_mask; uint32_t meta_count = __builtin_popcount(meta_mask); - uint32_t reg = data->level; + uint8_t reg = flow_tag_index_get(data); RTE_SET_USED(meta_count); MLX5_ASSERT(data->offset + width <= meta_count); @@ -5245,115 +5246,105 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev, struct mlx5_priv *priv = dev->data->dev_private; struct mlx5_sh_config *config = &priv->sh->config; struct mlx5_hca_attr *hca_attr = &priv->sh->cdev->config.hca_attr; - const struct rte_flow_action_modify_field *action_modify_field = - action->conf; - uint32_t dst_width, src_width; + const struct rte_flow_action_modify_field *conf = action->conf; + const struct rte_flow_action_modify_data *src_data = &conf->src; + const struct rte_flow_action_modify_data *dst_data = &conf->dst; + uint32_t dst_width, src_width, width = conf->width; ret = flow_dv_validate_action_modify_hdr(action_flags, action, error); if (ret) return ret; - if (action_modify_field->src.field == RTE_FLOW_FIELD_FLEX_ITEM || - action_modify_field->dst.field == RTE_FLOW_FIELD_FLEX_ITEM) + if (src_data->field == RTE_FLOW_FIELD_FLEX_ITEM || + dst_data->field == RTE_FLOW_FIELD_FLEX_ITEM) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "flex item fields modification" " is not supported"); - dst_width = mlx5_flow_item_field_width(dev, action_modify_field->dst.field, + dst_width = mlx5_flow_item_field_width(dev, dst_data->field, -1, attr, error); - src_width = mlx5_flow_item_field_width(dev, action_modify_field->src.field, + src_width = mlx5_flow_item_field_width(dev, src_data->field, dst_width, attr, error); - if (action_modify_field->width == 0) + if (width == 0) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "no bits are requested to be modified"); - else if (action_modify_field->width > dst_width || - action_modify_field->width > src_width) + else if (width > dst_width || width > src_width) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "cannot modify more bits than" " the width of a field"); - if (action_modify_field->dst.field != RTE_FLOW_FIELD_VALUE && - action_modify_field->dst.field != RTE_FLOW_FIELD_POINTER) { - if (action_modify_field->dst.offset + - action_modify_field->width > dst_width) + if (dst_data->field != RTE_FLOW_FIELD_VALUE && + dst_data->field != RTE_FLOW_FIELD_POINTER) { + if (dst_data->offset + width > dst_width) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "destination offset is too big"); - if (action_modify_field->dst.level && - action_modify_field->dst.field != RTE_FLOW_FIELD_TAG) - return rte_flow_error_set(error, ENOTSUP, - RTE_FLOW_ERROR_TYPE_ACTION, action, - "inner header fields modification" - " is not supported"); + ret = flow_validate_modify_field_level(dst_data, error); + if (ret) + return ret; } - if (action_modify_field->src.field != RTE_FLOW_FIELD_VALUE && - action_modify_field->src.field != RTE_FLOW_FIELD_POINTER) { + if (src_data->field != RTE_FLOW_FIELD_VALUE && + src_data->field != RTE_FLOW_FIELD_POINTER) { if (root) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "modify field action is not" " supported for group 0"); - if (action_modify_field->src.offset + - action_modify_field->width > src_width) + if (src_data->offset + width > src_width) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "source offset is too big"); - if (action_modify_field->src.level && - action_modify_field->src.field != RTE_FLOW_FIELD_TAG) - return rte_flow_error_set(error, ENOTSUP, - RTE_FLOW_ERROR_TYPE_ACTION, action, - "inner header fields modification" - " is not supported"); + ret = flow_validate_modify_field_level(src_data, error); + if (ret) + return ret; } - if ((action_modify_field->dst.field == - action_modify_field->src.field) && - (action_modify_field->dst.level == - action_modify_field->src.level)) + if ((dst_data->field == src_data->field) && + (dst_data->level == src_data->level)) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "source and destination fields" " cannot be the same"); - if (action_modify_field->dst.field == RTE_FLOW_FIELD_VALUE || - action_modify_field->dst.field == RTE_FLOW_FIELD_POINTER || - action_modify_field->dst.field == RTE_FLOW_FIELD_MARK) + if (dst_data->field == RTE_FLOW_FIELD_VALUE || + dst_data->field == RTE_FLOW_FIELD_POINTER || + dst_data->field == RTE_FLOW_FIELD_MARK) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "mark, immediate value or a pointer to it" " cannot be used as a destination"); - if (action_modify_field->dst.field == RTE_FLOW_FIELD_START || - action_modify_field->src.field == RTE_FLOW_FIELD_START) + if (dst_data->field == RTE_FLOW_FIELD_START || + src_data->field == RTE_FLOW_FIELD_START) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "modifications of an arbitrary" " place in a packet is not supported"); - if (action_modify_field->dst.field == RTE_FLOW_FIELD_VLAN_TYPE || - action_modify_field->src.field == RTE_FLOW_FIELD_VLAN_TYPE) + if (dst_data->field == RTE_FLOW_FIELD_VLAN_TYPE || + src_data->field == RTE_FLOW_FIELD_VLAN_TYPE) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "modifications of the 802.1Q Tag" " Identifier is not supported"); - if (action_modify_field->dst.field == RTE_FLOW_FIELD_VXLAN_VNI || - action_modify_field->src.field == RTE_FLOW_FIELD_VXLAN_VNI) + if (dst_data->field == RTE_FLOW_FIELD_VXLAN_VNI || + src_data->field == RTE_FLOW_FIELD_VXLAN_VNI) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "modifications of the VXLAN Network" " Identifier is not supported"); - if (action_modify_field->dst.field == RTE_FLOW_FIELD_GENEVE_VNI || - action_modify_field->src.field == RTE_FLOW_FIELD_GENEVE_VNI) + if (dst_data->field == RTE_FLOW_FIELD_GENEVE_VNI || + src_data->field == RTE_FLOW_FIELD_GENEVE_VNI) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "modifications of the GENEVE Network" " Identifier is not supported"); - if (action_modify_field->dst.field == RTE_FLOW_FIELD_MARK || - action_modify_field->src.field == RTE_FLOW_FIELD_MARK) + if (dst_data->field == RTE_FLOW_FIELD_MARK || + src_data->field == RTE_FLOW_FIELD_MARK) if (config->dv_xmeta_en == MLX5_XMETA_MODE_LEGACY || !mlx5_flow_ext_mreg_supported(dev)) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "cannot modify mark in legacy mode" " or without extensive registers"); - if (action_modify_field->dst.field == RTE_FLOW_FIELD_META || - action_modify_field->src.field == RTE_FLOW_FIELD_META) { + if (dst_data->field == RTE_FLOW_FIELD_META || + src_data->field == RTE_FLOW_FIELD_META) { if (config->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY && !mlx5_flow_ext_mreg_supported(dev)) return rte_flow_error_set(error, ENOTSUP, @@ -5367,20 +5358,19 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev, "cannot modify meta without" " extensive registers available"); } - if (action_modify_field->operation == RTE_FLOW_MODIFY_SUB) + if (conf->operation == RTE_FLOW_MODIFY_SUB) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "sub operations are not supported"); - if (action_modify_field->dst.field == RTE_FLOW_FIELD_IPV4_ECN || - action_modify_field->src.field == RTE_FLOW_FIELD_IPV4_ECN || - action_modify_field->dst.field == RTE_FLOW_FIELD_IPV6_ECN || - action_modify_field->src.field == RTE_FLOW_FIELD_IPV6_ECN) + if (dst_data->field == RTE_FLOW_FIELD_IPV4_ECN || + src_data->field == RTE_FLOW_FIELD_IPV4_ECN || + dst_data->field == RTE_FLOW_FIELD_IPV6_ECN || + src_data->field == RTE_FLOW_FIELD_IPV6_ECN) if (!hca_attr->modify_outer_ip_ecn && root) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "modifications of the ECN for current firmware is not supported"); - return (action_modify_field->width / 32) + - !!(action_modify_field->width % 32); + return (width / 32) + !!(width % 32); } /** diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 1b68a19900..39ea76c0c0 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -1022,9 +1022,11 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev, conf->dst.field == RTE_FLOW_FIELD_TAG || conf->dst.field == RTE_FLOW_FIELD_METER_COLOR || conf->dst.field == (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG) { + uint8_t tag_index = flow_tag_index_get(&conf->dst); + value = *(const unaligned_uint32_t *)item.spec; if (conf->dst.field == RTE_FLOW_FIELD_TAG && - conf->dst.level == MLX5_LINEAR_HASH_TAG_INDEX) + tag_index == MLX5_LINEAR_HASH_TAG_INDEX) value = rte_cpu_to_be_32(value << 16); else value = rte_cpu_to_be_32(value); @@ -2055,9 +2057,11 @@ flow_hw_modify_field_construct(struct mlx5_hw_q_job *job, mhdr_action->dst.field == RTE_FLOW_FIELD_TAG || mhdr_action->dst.field == RTE_FLOW_FIELD_METER_COLOR || mhdr_action->dst.field == (enum rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG) { + uint8_t tag_index = flow_tag_index_get(&mhdr_action->dst); + value_p = (unaligned_uint32_t *)values; if (mhdr_action->dst.field == RTE_FLOW_FIELD_TAG && - mhdr_action->dst.level == MLX5_LINEAR_HASH_TAG_INDEX) + tag_index == MLX5_LINEAR_HASH_TAG_INDEX) *value_p = rte_cpu_to_be_32(*value_p << 16); else *value_p = rte_cpu_to_be_32(*value_p); @@ -3546,10 +3550,9 @@ flow_hw_validate_action_modify_field(const struct rte_flow_action *action, const struct rte_flow_action *mask, struct rte_flow_error *error) { - const struct rte_flow_action_modify_field *action_conf = - action->conf; - const struct rte_flow_action_modify_field *mask_conf = - mask->conf; + const struct rte_flow_action_modify_field *action_conf = action->conf; + const struct rte_flow_action_modify_field *mask_conf = mask->conf; + int ret; if (action_conf->operation != mask_conf->operation) return rte_flow_error_set(error, EINVAL, @@ -3565,6 +3568,9 @@ flow_hw_validate_action_modify_field(const struct rte_flow_action *action, return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "immediate value, pointer and hash result cannot be used as destination"); + ret = flow_validate_modify_field_level(&action_conf->dst, error); + if (ret) + return ret; if (mask_conf->dst.level != UINT8_MAX) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, @@ -3587,6 +3593,9 @@ flow_hw_validate_action_modify_field(const struct rte_flow_action *action, return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "source offset level must be fully masked"); + ret = flow_validate_modify_field_level(&action_conf->src, error); + if (ret) + return ret; } if (mask_conf->width != UINT32_MAX) return rte_flow_error_set(error, EINVAL, diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index f30d4b033f..1df4b49219 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3740,8 +3740,8 @@ enum rte_flow_field_id { RTE_FLOW_FIELD_START = 0, /**< Start of a packet. */ RTE_FLOW_FIELD_MAC_DST, /**< Destination MAC Address. */ RTE_FLOW_FIELD_MAC_SRC, /**< Source MAC Address. */ - RTE_FLOW_FIELD_VLAN_TYPE, /**< 802.1Q Tag Identifier. */ - RTE_FLOW_FIELD_VLAN_ID, /**< 802.1Q VLAN Identifier. */ + RTE_FLOW_FIELD_VLAN_TYPE, /**< VLAN Tag Identifier. */ + RTE_FLOW_FIELD_VLAN_ID, /**< VLAN Identifier. */ RTE_FLOW_FIELD_MAC_TYPE, /**< EtherType. */ RTE_FLOW_FIELD_IPV4_DSCP, /**< IPv4 DSCP. */ RTE_FLOW_FIELD_IPV4_TTL, /**< IPv4 Time To Live. */ @@ -3775,7 +3775,8 @@ enum rte_flow_field_id { RTE_FLOW_FIELD_HASH_RESULT, /**< Hash result. */ RTE_FLOW_FIELD_GENEVE_OPT_TYPE, /**< GENEVE option type */ RTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class */ - RTE_FLOW_FIELD_GENEVE_OPT_DATA /**< GENEVE option data */ + RTE_FLOW_FIELD_GENEVE_OPT_DATA, /**< GENEVE option data */ + RTE_FLOW_FIELD_MPLS /**< MPLS header. */ }; /** @@ -3789,7 +3790,7 @@ struct rte_flow_action_modify_data { RTE_STD_C11 union { struct { - /** Encapsulation level or tag index or flex item handle. */ + /** Encapsulation level and tag index or flex item handle. */ union { struct { /** @@ -3820,20 +3821,38 @@ struct rte_flow_action_modify_data { * * Values other than @p 0 are not * necessarily supported. + * + * @note that for MPLS field, + * encapsulation level also include + * tunnel since MPLS may appear in + * outer, inner or tunnel. */ uint8_t level; - /** - * Geneve option type. relevant only - * for RTE_FLOW_FIELD_GENEVE_OPT_XXXX - * modification type. - */ - uint8_t type; - /** - * Geneve option class. relevant only - * for RTE_FLOW_FIELD_GENEVE_OPT_XXXX - * modification type. - */ - rte_be16_t class_id; + union { + /** + * Tag index array inside + * encapsulation level. + * Used for VLAN, MPLS or TAG + * types. + */ + uint8_t tag_index; + /** + * Geneve option identifier. + * relevant only for + * RTE_FLOW_FIELD_GENEVE_OPT_XXXX + * modification type. + */ + struct { + /** + * Geneve option type. + */ + uint8_t type; + /** + * Geneve option class. + */ + rte_be16_t class_id; + }; + }; }; struct rte_flow_item_flex_handle *flex_handle; };