get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/123069/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 123069,
    "url": "https://patches.dpdk.org/api/patches/123069/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230206033908.2770135-2-rongweil@nvidia.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230206033908.2770135-2-rongweil@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230206033908.2770135-2-rongweil@nvidia.com",
    "date": "2023-02-06T03:39:05",
    "name": "[v4,1/4] ethdev: add flex item modify field support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ea6e690e97fccf5514db5f1290fb55c8ad91d4ec",
    "submitter": {
        "id": 2223,
        "url": "https://patches.dpdk.org/api/people/2223/?format=api",
        "name": "rongwei liu",
        "email": "rongweil@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230206033908.2770135-2-rongweil@nvidia.com/mbox/",
    "series": [
        {
            "id": 26802,
            "url": "https://patches.dpdk.org/api/series/26802/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=26802",
            "date": "2023-02-06T03:39:04",
            "name": "add flex item support",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/26802/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/123069/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/123069/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 182BF41BE4;\n\tMon,  6 Feb 2023 04:39:41 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 31ED842D0D;\n\tMon,  6 Feb 2023 04:39:39 +0100 (CET)",
            "from NAM11-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam11on2078.outbound.protection.outlook.com [40.107.223.78])\n by mails.dpdk.org (Postfix) with ESMTP id 3AAB542C24\n for <dev@dpdk.org>; Mon,  6 Feb 2023 04:39:37 +0100 (CET)",
            "from DS7PR03CA0141.namprd03.prod.outlook.com (2603:10b6:5:3b4::26)\n by DM4PR12MB5184.namprd12.prod.outlook.com (2603:10b6:5:397::18) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Mon, 6 Feb\n 2023 03:39:34 +0000",
            "from DS1PEPF0000E650.namprd02.prod.outlook.com\n (2603:10b6:5:3b4:cafe::30) by DS7PR03CA0141.outlook.office365.com\n (2603:10b6:5:3b4::26) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.32 via Frontend\n Transport; Mon, 6 Feb 2023 03:39:34 +0000",
            "from mail.nvidia.com (216.228.117.160) by\n DS1PEPF0000E650.mail.protection.outlook.com (10.167.18.6) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.6064.21 via Frontend Transport; Mon, 6 Feb 2023 03:39:33 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 5 Feb 2023\n 19:39:28 -0800",
            "from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 5 Feb 2023\n 19:39:24 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=N3YiG6+tO/tpEvnaHFdBFUX1stH185G69MyGhbGmb7jhykt6W/eWaZztBg2v70hnSDpSvFU+EfNF5z7KkGA2oWFTYx9LI3LjEHf+B8Iz6Z5G6Ks7idUx0uMZfSvnz3mFAGm2dF05XOu/hDDzwDZKJymjzQRSK+6T+tIr6K4zeCBU6U4xpWk5a1ZFgkwQzC2zlGF9xTS7XZ1S4zvkY+AVZJlHOCRDL0CQ2DhDb+piJc+OXiu+5fSKpwEJrwLfZsWfAPApf9RZKD2f83oiz42Oq1kIVP0/NrLtci9Y5te0zqcpDUcG+ABaL59lt/gfBUE+vFGNm1Z/hmHpxa7LX8AhWg==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n 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;\n bh=zjcBBN9JnjnVL++Y6uGtR2606yzc6aIQEtoD/PCHMY0=;\n b=UajHp8HmSqCRy7VfXVz5fzWhPRCEjm706YwY/+yhYkGFkn09eIcRcY1EnST1c0rCwupL0LQlC9rXMZqw1TmKo84ToPh1+CR+a3bOu4L9lhawsEdouoy0YW8Nx+prXdUrrkXkmweSQc7+nJTUSjSylLyqUrZzd0dz+ta4T8k+M5Xg7IESw2VXxMTUGtLIkGLxWEYKWbHgbQx943DaTNCzBLgUr2Myv9otIMVfZvTXp3DhyV6yXT5R/SPJ4nABPE5Hn2b0L/yNnFRajxadU2QiIpEHCwMN4jgLvMdcoPmPuWq3yPVhCPBVQ5heqJLQhNJEGgIUv6nALuDg12BNoaGl0g==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=zjcBBN9JnjnVL++Y6uGtR2606yzc6aIQEtoD/PCHMY0=;\n b=aFuCROciV2Xdrt/AdOJsA4THQh4xduvQXSak2bE4Fxs0Znwddje6edmksZYK8vV6HPtcQIaAMrTS5ACkd0ys3vGvdlEnHP6qIEISajp2cKIXdVaUmPxpa2if6Q7Td2Uw2JUjorBXHqGe34sanjMzH/900MAFR3sgrBSGw2yovHk6u0RC4Pn7gzr+ylwo03/9L5RdnEUwUquey+OeOwN1oX7z7GDLVxUQm4G5mLS/B30uIlwYn4A40UOPj34IWoJT2H1z+tVBBS62HUM7EiDTiaTXXs/TSMZS/3IbsthHkWQ8mJkCFjCtVaFPNG1Zy+wDNzWvwfaLJ+ZEdooYUX6M1w==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.160)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.160 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C",
        "From": "Rongwei Liu <rongweil@nvidia.com>",
        "To": "<dev@dpdk.org>, <matan@nvidia.com>, <viacheslavo@nvidia.com>,\n <orika@nvidia.com>, <thomas@monjalon.net>",
        "CC": "<rasland@nvidia.com>, Aman Singh <aman.deep.singh@intel.com>, Yuying Zhang\n <yuying.zhang@intel.com>, Ferruh Yigit <ferruh.yigit@amd.com>, \"Andrew\n Rybchenko\" <andrew.rybchenko@oktetlabs.ru>",
        "Subject": "[PATCH v4 1/4] ethdev: add flex item modify field support",
        "Date": "Mon, 6 Feb 2023 05:39:05 +0200",
        "Message-ID": "<20230206033908.2770135-2-rongweil@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20230206033908.2770135-1-rongweil@nvidia.com>",
        "References": "<20230130132000.1715473-2-rongweil@nvidia.com>\n <20230206033908.2770135-1-rongweil@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.37]",
        "X-ClientProxiedBy": "rnnvmail203.nvidia.com (10.129.68.9) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "DS1PEPF0000E650:EE_|DM4PR12MB5184:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "4126b7e1-15b0-431b-8e5a-08db07f3c374",
        "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": "\n dLfV4gF/sZJLuHWmsr5g9ga4GBPgtL+t7Pu+B9RapUNwoGfGAkmyrA0BZz/QXriJvDDsa60G8kEZckv31zQXqWkD0briAofN9/HnH1eEiGHEEDC1OuvlLAgLm56e/pQFJ5jhjts05P/KJMg5sc76fCHuXT/sD4Ecj+JP5DJXfkhDZqBz6/m2WTBFHPC2VQYP3mHsCVKbO+jkrz4EpENvExjPXoM1hrhT9RIvVDGTsi0S2qX/yw+kmLYJHt5AnBae/WBoHcrC1Rc754rW6p5Mz4YziLbrGu54uGL4cQfFp1jqfrPPsEIDGOHa9BbtAQuDNZPsv7cFCA6MEvDXJ+4KTfCAYQsMtCx5xUhtGwcswHt0XmuRstyKfeLTwUQ8sjczjq8sGka11UotSvCb73oH8VvQJfgI1/SuLYY61E0nZgHG6MPojggRi6TLMZUIZ56LZ0V1oZd8btr4fjIJjlY+mwE0scvUxjFDAzLa/K6/aRtAPY4fknL6C3ADiy7LM9U1/0Gf8p7r+H0Q2H0Em0IG5i5PXlLANTg7e5Oej73uwnZ5U8P5rQ4m7SLtcBv/MbBCd/xqjAGmAo2DtzvZWLTKBJMwC8pNLE8KHS4fTQyf+ixkMXlE/L0QMacwPwa8HCP1blKZgVuCBKSaR0r4PzFUxUBuLgcZK7iLiRUZ/qp/VsWyS6teNk6RKdS/0l8x1kQs9KupOz100fL034RoOZ8tQBAaWJkZJNcxt4tjT5MFdCI=",
        "X-Forefront-Antispam-Report": "CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE;\n SFS:(13230025)(4636009)(346002)(136003)(376002)(39860400002)(396003)(451199018)(36840700001)(46966006)(40470700004)(186003)(16526019)(36756003)(1076003)(6286002)(6666004)(40460700003)(26005)(82310400005)(356005)(47076005)(7636003)(82740400003)(54906003)(316002)(110136005)(36860700001)(8936002)(40480700001)(55016003)(5660300002)(41300700001)(2906002)(30864003)(7696005)(336012)(83380400001)(426003)(8676002)(4326008)(70206006)(70586007)(2616005)(86362001)(478600001)(21314003);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "06 Feb 2023 03:39:33.9293 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 4126b7e1-15b0-431b-8e5a-08db07f3c374",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n DS1PEPF0000E650.namprd02.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM4PR12MB5184",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Add flex item as modify field destination.\nAdd \"struct rte_flow_item_flex_handle *flex_handle\" into\n\"struct rte_flow_action_modify_data\" as union with existed\n\"level\" member. This new member is dedicated for modifying\nflex item.\n\nAdd flex item modify field cmdline support. Now user can use\ntestpmd cli to specify which flex item to be modified, either\nsource or destination.\n\nSyntax is as below:\nmodify_field op set dst_type flex_item dst_level 0\ndst_offset 16 src_type value src_value 0x123456781020 width 8\n\nSigned-off-by: Rongwei Liu <rongweil@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\n---\n app/test-pmd/cmdline_flow.c            | 89 ++++++++++++++++++++++++--\n doc/guides/prog_guide/rte_flow.rst     | 41 +++++++-----\n doc/guides/rel_notes/release_23_03.rst |  4 ++\n lib/ethdev/rte_flow.h                  |  8 ++-\n 4 files changed, 116 insertions(+), 26 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 88108498e0..7c12d63cbc 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -601,10 +601,12 @@ enum index {\n \tACTION_MODIFY_FIELD_DST_TYPE,\n \tACTION_MODIFY_FIELD_DST_TYPE_VALUE,\n \tACTION_MODIFY_FIELD_DST_LEVEL,\n+\tACTION_MODIFY_FIELD_DST_LEVEL_VALUE,\n \tACTION_MODIFY_FIELD_DST_OFFSET,\n \tACTION_MODIFY_FIELD_SRC_TYPE,\n \tACTION_MODIFY_FIELD_SRC_TYPE_VALUE,\n \tACTION_MODIFY_FIELD_SRC_LEVEL,\n+\tACTION_MODIFY_FIELD_SRC_LEVEL_VALUE,\n \tACTION_MODIFY_FIELD_SRC_OFFSET,\n \tACTION_MODIFY_FIELD_SRC_VALUE,\n \tACTION_MODIFY_FIELD_SRC_POINTER,\n@@ -807,7 +809,8 @@ static const char *const modify_field_ids[] = {\n \t\"udp_port_src\", \"udp_port_dst\",\n \t\"vxlan_vni\", \"geneve_vni\", \"gtp_teid\",\n \t\"tag\", \"mark\", \"meta\", \"pointer\", \"value\",\n-\t\"ipv4_ecn\", \"ipv6_ecn\", \"gtp_psc_qfi\", \"meter_color\", NULL\n+\t\"ipv4_ecn\", \"ipv6_ecn\", \"gtp_psc_qfi\", \"meter_color\",\n+\t\"flex_item\", NULL\n };\n \n static const char *const meter_colors[] = {\n@@ -2282,6 +2285,10 @@ parse_vc_modify_field_id(struct context *ctx, const struct token *token,\n \t\t\t\tconst char *str, unsigned int len, void *buf,\n \t\t\t\tunsigned int size);\n static int\n+parse_vc_modify_field_level(struct context *ctx, const struct token *token,\n+\t\t\t\tconst char *str, unsigned int len, void *buf,\n+\t\t\t\tunsigned int size);\n+static int\n parse_vc_action_conntrack_update(struct context *ctx, const struct token *token,\n \t\t\t const char *str, unsigned int len, void *buf,\n \t\t\t unsigned int size);\n@@ -5976,11 +5983,15 @@ static const struct token token_list[] = {\n \t\t.name = \"dst_level\",\n \t\t.help = \"destination field level\",\n \t\t.next = NEXT(action_modify_field_dst,\n-\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED)),\n-\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,\n-\t\t\t\t\tdst.level)),\n+\t\t\t     NEXT_ENTRY(ACTION_MODIFY_FIELD_DST_LEVEL_VALUE)),\n \t\t.call = parse_vc_conf,\n \t},\n+\t[ACTION_MODIFY_FIELD_DST_LEVEL_VALUE] = {\n+\t\t.name = \"{dst_level}\",\n+\t\t.help = \"destination field level value\",\n+\t\t.call = parse_vc_modify_field_level,\n+\t\t.comp = comp_none,\n+\t},\n \t[ACTION_MODIFY_FIELD_DST_OFFSET] = {\n \t\t.name = \"dst_offset\",\n \t\t.help = \"destination field bit offset\",\n@@ -6007,11 +6018,15 @@ static const struct token token_list[] = {\n \t\t.name = \"src_level\",\n \t\t.help = \"source field level\",\n \t\t.next = NEXT(action_modify_field_src,\n-\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED)),\n-\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,\n-\t\t\t\t\tsrc.level)),\n+\t\t\t     NEXT_ENTRY(ACTION_MODIFY_FIELD_SRC_LEVEL_VALUE)),\n \t\t.call = parse_vc_conf,\n \t},\n+\t[ACTION_MODIFY_FIELD_SRC_LEVEL_VALUE] = {\n+\t\t.name = \"{src_level}\",\n+\t\t.help = \"source field level value\",\n+\t\t.call = parse_vc_modify_field_level,\n+\t\t.comp = comp_none,\n+\t},\n \t[ACTION_MODIFY_FIELD_SRC_OFFSET] = {\n \t\t.name = \"src_offset\",\n \t\t.help = \"source field bit offset\",\n@@ -8477,6 +8492,66 @@ parse_vc_modify_field_id(struct context *ctx, const struct token *token,\n \treturn len;\n }\n \n+/** Parse level for modify_field command. */\n+static int\n+parse_vc_modify_field_level(struct context *ctx, const struct token *token,\n+\t\t\t const char *str, unsigned int len, void *buf,\n+\t\t\t unsigned int size)\n+{\n+\tstruct rte_flow_action_modify_field *action;\n+\tstruct flex_item *fp;\n+\tuint32_t val;\n+\tstruct buffer *out = buf;\n+\tchar *end;\n+\n+\t(void)token;\n+\t(void)size;\n+\tif (ctx->curr != ACTION_MODIFY_FIELD_DST_LEVEL_VALUE &&\n+\t\tctx->curr != ACTION_MODIFY_FIELD_SRC_LEVEL_VALUE)\n+\t\treturn -1;\n+\tif (!ctx->object)\n+\t\treturn len;\n+\taction = ctx->object;\n+\terrno = 0;\n+\tval = strtoumax(str, &end, 0);\n+\tif (errno || (size_t)(end - str) != len)\n+\t\treturn -1;\n+\t/* No need to validate action template mask value */\n+\tif (out->args.vc.masks) {\n+\t\tif (ctx->curr == ACTION_MODIFY_FIELD_DST_LEVEL_VALUE)\n+\t\t\taction->dst.level = val;\n+\t\telse\n+\t\t\taction->src.level = val;\n+\t\treturn len;\n+\t}\n+\tif ((ctx->curr == ACTION_MODIFY_FIELD_DST_LEVEL_VALUE &&\n+\t\taction->dst.field == RTE_FLOW_FIELD_FLEX_ITEM) ||\n+\t\t(ctx->curr == ACTION_MODIFY_FIELD_SRC_LEVEL_VALUE &&\n+\t\taction->src.field == RTE_FLOW_FIELD_FLEX_ITEM)) {\n+\t\tif (val >= FLEX_MAX_PARSERS_NUM) {\n+\t\t\tprintf(\"Bad flex item handle\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tfp = flex_items[ctx->port][val];\n+\t\tif (!fp) {\n+\t\t\tprintf(\"Bad flex item handle\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\tif (ctx->curr == ACTION_MODIFY_FIELD_DST_LEVEL_VALUE) {\n+\t\tif (action->dst.field != RTE_FLOW_FIELD_FLEX_ITEM)\n+\t\t\taction->dst.level = val;\n+\t\telse\n+\t\t\taction->dst.flex_handle = fp->flex_handle;\n+\t} else if (ctx->curr == ACTION_MODIFY_FIELD_SRC_LEVEL_VALUE) {\n+\t\tif (action->src.field != RTE_FLOW_FIELD_FLEX_ITEM)\n+\t\t\taction->src.level = val;\n+\t\telse\n+\t\t\taction->src.flex_handle = fp->flex_handle;\n+\t}\n+\treturn len;\n+}\n+\n /** Parse the conntrack update, not a rte_flow_action. */\n static int\n parse_vc_action_conntrack_update(struct context *ctx, const struct token *token,\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 3e6242803d..9ffd7baa7a 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -2905,6 +2905,9 @@ encapsulation level, from outermost to innermost (lower to higher values).\n For the tag array (in case of multiple tags are supported and present)\n ``level`` translates directly into the array index.\n \n+``flex_handle`` is used to specify the flex item pointer which is being\n+modified. ``flex_handle`` and ``level`` are mutually exclusive.\n+\n ``offset`` specifies the number of bits to skip from a field's start.\n That allows performing a partial copy of the needed part or to divide a big\n packet field into multiple smaller fields. Alternatively, ``offset`` allows\n@@ -2952,23 +2955,27 @@ value as sequence of bytes {xxx, xxx, 0x85, xxx, xxx, xxx}.\n \n .. table:: destination/source field definition\n \n-   +---------------+----------------------------------------------------------+\n-   | Field         | Value                                                    |\n-   +===============+==========================================================+\n-   | ``field``     | ID: packet field, mark, meta, tag, immediate, pointer    |\n-   +---------------+----------------------------------------------------------+\n-   | ``level``     | encapsulation level of a packet field or tag array index |\n-   +---------------+----------------------------------------------------------+\n-   | ``offset``    | number of bits to skip at the beginning                  |\n-   +---------------+----------------------------------------------------------+\n-   | ``value``     | immediate value buffer (source field only, not           |\n-   |               | applicable to destination) for RTE_FLOW_FIELD_VALUE      |\n-   |               | field type                                               |\n-   +---------------+----------------------------------------------------------+\n-   | ``pvalue``    | pointer to immediate value data (source field only, not  |\n-   |               | applicable to destination) for RTE_FLOW_FIELD_POINTER    |\n-   |               | field type                                               |\n-   +---------------+----------------------------------------------------------+\n+   +-----------------+----------------------------------------------------------+\n+   | Field           | Value                                                    |\n+   +=================+==========================================================+\n+   | ``field``       | ID: packet field, mark, meta, tag, immediate, pointer    |\n+   +-----------------+----------------------------------------------------------+\n+   | ``level``       | encapsulation level of a packet field or tag array index |\n+   +-----------------+----------------------------------------------------------+\n+   | ``flex_handle`` | flex item handle of a packet field                       |\n+   +-----------------+----------------------------------------------------------+\n+   | ``offset``      | number of bits to skip at the beginning                  |\n+   +-----------------+----------------------------------------------------------+\n+   | ``value``       | immediate value buffer (source field only, not           |\n+   |                 | applicable to destination) for RTE_FLOW_FIELD_VALUE      |\n+   |                 | field type                                               |\n+   |                 | This field is only 16 bytes, maybe not big enough for    |\n+   |                 | all NICs' flex item                                      |\n+   +-----------------+----------------------------------------------------------+\n+   | ``pvalue``      | pointer to immediate value data (source field only, not  |\n+   |                 | applicable to destination) for RTE_FLOW_FIELD_POINTER    |\n+   |                 | field type                                               |\n+   +-----------------+----------------------------------------------------------+\n \n Action: ``CONNTRACK``\n ^^^^^^^^^^^^^^^^^^^^^\ndiff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst\nindex c15f6fbb9f..3fb6e738e2 100644\n--- a/doc/guides/rel_notes/release_23_03.rst\n+++ b/doc/guides/rel_notes/release_23_03.rst\n@@ -69,6 +69,10 @@ New Features\n     ``rte_event_dev_config::nb_single_link_event_port_queues`` parameter\n     required for eth_rx, eth_tx, crypto and timer eventdev adapters.\n \n+* ethdev: added a new field:\n+\n+  - modify flex item: ``rte_flow_action_modify_data.flex_handle``.\n+\n \n Removed Items\n -------------\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex b60987db4b..ba9f3d50a3 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -3528,6 +3528,7 @@ enum rte_flow_field_id {\n \tRTE_FLOW_FIELD_IPV6_ECN,\t/**< IPv6 ECN. */\n \tRTE_FLOW_FIELD_GTP_PSC_QFI,\t/**< GTP QFI. */\n \tRTE_FLOW_FIELD_METER_COLOR,\t/**< Meter color marker. */\n+\tRTE_FLOW_FIELD_FLEX_ITEM,\t/**< Flex item. */\n };\n \n /**\n@@ -3541,8 +3542,11 @@ struct rte_flow_action_modify_data {\n \tRTE_STD_C11\n \tunion {\n \t\tstruct {\n-\t\t\t/** Encapsulation level or tag index. */\n-\t\t\tuint32_t level;\n+\t\t\t/** Encapsulation level or tag index or flex item handle. */\n+\t\t\tunion {\n+\t\t\t\tuint32_t level;\n+\t\t\t\tstruct rte_flow_item_flex_handle *flex_handle;\n+\t\t\t};\n \t\t\t/** Number of bits to skip from a field. */\n \t\t\tuint32_t offset;\n \t\t};\n",
    "prefixes": [
        "v4",
        "1/4"
    ]
}