From patchwork Sat Jan 16 04:50:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 86718 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 4D67FA0A02; Sat, 16 Jan 2021 05:51:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 446DE140DE6; Sat, 16 Jan 2021 05:51:00 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 4CD09140DD2 for ; Sat, 16 Jan 2021 05:50:57 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from akozyrev@nvidia.com) with SMTP; 16 Jan 2021 06:50:55 +0200 Received: from nvidia.com (pegasus02.mtr.labs.mlnx [10.210.16.122]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 10G4otZH019927; Sat, 16 Jan 2021 06:50:55 +0200 From: Alexander Kozyrev To: dev@dpdk.org Cc: viacheslavo@nvidia.com, orika@nvidia.com, thomas@monjalon.net, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru, jerinjacobk@gmail.com Date: Sat, 16 Jan 2021 04:50:52 +0000 Message-Id: <20210116045054.14539-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20210116044407.13596-1-akozyrev@nvidia.com> References: <20210116044407.13596-1-akozyrev@nvidia.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v7 0/2] generic modify rte flow action support 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 Sender: "dev" Implement a generic modify rte flow API as described in RFC: http://patches.dpdk.org/patch/85384/ This API allows modifying a destination header field with data from a source header field. Number of bits to use from the source is specified. Tag, Mark or Metadata can also be used as a source/destination to allow saving/overwriting an arbitrary header field with a user-specified value. Alternatively, an immediate value can be provided by a user as a source. Outermost/innermost packet fields (and Tag array elements) are accessible via the level parameter to facilitate the modification of encapsulated packet header fields. The offset parameter provides the flexibility to copy/set any part of a packet starting the specified packet header field. --- v1: https://patchwork.dpdk.org/patch/86173/ Initial design. v2: https://patchwork.dpdk.org/cover/86369/ Added testpmd support. v3: https://patchwork.dpdk.org/cover/86442/ Made dst_type, src_type and width only mandatory parameters. v4: https://patchwork.dpdk.org/cover/86488/ Renamed action to RTE_FLOW_ACTION_TYPE_COPY_FIELD. v5: Redesigned as RTE_FLOW_ACTION_TYPE_MODIFY_FIELD. v6: Fixed typos in documentation. Alexander Kozyrev (2): ethdev: introduce generic modify rte flow action app/testpmd: add support for modify field flow action app/test-pmd/cmdline_flow.c | 246 +++++++++++++++++++++++++ doc/guides/prog_guide/rte_flow.rst | 65 +++++++ doc/guides/rel_notes/release_21_02.rst | 8 + lib/librte_ethdev/rte_flow.c | 2 + lib/librte_ethdev/rte_flow.h | 79 +++++++- 5 files changed, 399 insertions(+), 1 deletion(-)