get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 136258,
    "url": "http://patches.dpdk.org/api/patches/136258/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240201122922.474250-3-suanmingm@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20240201122922.474250-3-suanmingm@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240201122922.474250-3-suanmingm@nvidia.com",
    "date": "2024-02-01T12:29:21",
    "name": "[v5,2/3] ethdev: add compare item",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5bb912d081a3531ea976418b6f005ec16b5ae52e",
    "submitter": {
        "id": 1887,
        "url": "http://patches.dpdk.org/api/people/1887/?format=api",
        "name": "Suanming Mou",
        "email": "suanmingm@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240201122922.474250-3-suanmingm@nvidia.com/mbox/",
    "series": [
        {
            "id": 30965,
            "url": "http://patches.dpdk.org/api/series/30965/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30965",
            "date": "2024-02-01T12:29:19",
            "name": "ethdev: add RTE_FLOW_ITEM_TYPE_COMPARE",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/30965/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/136258/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/136258/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 4EEB643A39;\n\tThu,  1 Feb 2024 13:30:21 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3DEDC42E12;\n\tThu,  1 Feb 2024 13:30:21 +0100 (CET)",
            "from NAM10-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam10on2079.outbound.protection.outlook.com [40.107.94.79])\n by mails.dpdk.org (Postfix) with ESMTP id 6446642E0F\n for <dev@dpdk.org>; Thu,  1 Feb 2024 13:30:19 +0100 (CET)",
            "from CH2PR07CA0037.namprd07.prod.outlook.com (2603:10b6:610:5b::11)\n by SA1PR12MB8743.namprd12.prod.outlook.com (2603:10b6:806:37c::18)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.24; Thu, 1 Feb\n 2024 12:30:15 +0000",
            "from CH2PEPF0000009A.namprd02.prod.outlook.com\n (2603:10b6:610:5b:cafe::a3) by CH2PR07CA0037.outlook.office365.com\n (2603:10b6:610:5b::11) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.24 via Frontend\n Transport; Thu, 1 Feb 2024 12:30:15 +0000",
            "from mail.nvidia.com (216.228.117.160) by\n CH2PEPF0000009A.mail.protection.outlook.com (10.167.244.22) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.7249.19 via Frontend Transport; Thu, 1 Feb 2024 12:30:15 +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.41; Thu, 1 Feb 2024\n 04:30:04 -0800",
            "from nvidia.com (10.126.231.35) 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.41; Thu, 1 Feb 2024\n 04:29:59 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=m7gcXe8Nl7XojOrcqJdt2ITtzLNJiNMCrPRBT4x5iAKrNcIP/jsR9xT657nqJ3CCSjG6L/gXGqj/0z2k9Igs9p6W249n8JFMA14fHu44grMHLwAL+H0m02vSX0MHXTNiAzrscatov9hrFtKhiplW3zY2fSvYVBHD984MxgNSnQM8j27QHfIUOQQaJil4bRnonvLUaZARqYljxZqgiSqEAx3FrFDN84qZ8uwtGRGBmNwyL+sE9xsq28+wNZJXV0uR0B/qSxTYGROMtc+ZEzruRrnWpb6nc7djfcXcWQkDlMR6xy95DZXgejgR+Tqijy3ykZZ29XlzdNbU7OJGmrld+A==",
        "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=KAQBbQDIUq9RfxeRqxQivXdsBoe5Su70f7xx1a3KzYg=;\n b=Xl2FqK5yTqtYKDPySPY/idUQL8yXOnCtRYsAiK7gsAVrq7rVngZEB1/8PbQULT5UCO4rXWC561HBwxIJ9+gPo3f+NR4Z4YB2QXt/x6Caji3bjV8+Sgs81EeJ6MDzdUmnrmUZl9ZyrudnJlI12wDY8Jj6//JGf9OGRH0FLqemt9tQi8QgbV6SX4nj/fng9cxPuwFZFqDnzu0oyYSaPnrXziB1sFrKXgEopogNbehdgmwi2KsoRobQhmEOBJwJmlKzQ0GDzrSgubqUgGRwWr3+crsQ95xULrioSTP5cT4jXJisYYisz5TuiUnpk2xEBcdDHcGt5mCP8AeApzWFNIPH5A==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.160) smtp.rcpttodomain=amd.com 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 (0)",
        "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=KAQBbQDIUq9RfxeRqxQivXdsBoe5Su70f7xx1a3KzYg=;\n b=STq2lGIkPE/8q/399O0T7FsJJ3kUfRXHf4zawk28P9OPg0hIagJevqqRFB4F2g2Z7i9nIN3ytko7v5pbT3hgiyV/xysLtHxjaUGf3wRaMTEXtx9oiF5Q4NtrGZfSkyvCa8nf1u8KRIuZtrj3kSMLI4iwXqwloJZ/P0R1nF8YfT2pVjfjSqa7Q1xbueo38DJLE6U5xfO5CJtBpqjBcKu/2hTcRF6n5hhsGrKuTqadlwQbQSR4+TagwSHAa4aUV4HkNlbOIp+jcwSo0WpfF4N+QDSVS6DqbLFGIC+70m5Lwi5wPW6uPM1I6chdZR/Nbzbpjjylt9yUf6ZADASQv9rRCA==",
        "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": "Suanming Mou <suanmingm@nvidia.com>",
        "To": "<ferruh.yigit@amd.com>, Ori Kam <orika@nvidia.com>, Aman Singh\n <aman.deep.singh@intel.com>, Yuying Zhang <yuying.zhang@intel.com>, \"Thomas\n Monjalon\" <thomas@monjalon.net>, Andrew Rybchenko\n <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<dev@dpdk.org>",
        "Subject": "[PATCH v5 2/3] ethdev: add compare item",
        "Date": "Thu, 1 Feb 2024 20:29:21 +0800",
        "Message-ID": "<20240201122922.474250-3-suanmingm@nvidia.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240201122922.474250-1-suanmingm@nvidia.com>",
        "References": "<20231214031227.363911-1-suanmingm@nvidia.com>\n <20240201122922.474250-1-suanmingm@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.231.35]",
        "X-ClientProxiedBy": "rnnvmail201.nvidia.com (10.129.68.8) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "CH2PEPF0000009A:EE_|SA1PR12MB8743:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "d3d1d11e-ac55-40a3-6b52-08dc23218b16",
        "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 pt5s+MZbl9rZKMPFiP81k/aY8+mU9HowEWzER4OEvfWYHX6Wqtn0ERhYY67aQ4mHXNCo1eofd1qGLf8VBIXzmit55GO/FMmwvgzNFG8yneCOrF/HbSRfLxc7a4X/TrDkWZU+Q3vJDWNFM+agM+0i2TPDCEA1azZj7Bb6MpoDLnIiB5RNaR1sohc6BYifCzHqzskyAdBI3KXzM2Xq9TK3mbzXlNxWXFBU9IVO0JQsdw5t6yD8bNAObfnDxf1AvPJkeTITgtKycbQ+u3BDjPBd/tD+kdJxNfRUWLsE/VMO1P//xNNeAkBIl3OF2gYG7qp9GlRPh8U28SSjuRreEijfH6zpJQP7Yqk5+us02m0lXi9jV4jySydlmg1g3u4OuV9UlTLfAMykrsEhw4+tM9E+Ffdh6P5EIgyuWfMoOMeFX39VjcxqLkhwdv+frMnvJFJ5bq2YVQAwP5KZ1GF1oNl1Fz5plLeiBbXX/gCRewoW/HQPdmEJ7uU1to+RN5Mhc58ATCLRyUJpO69qmhGc4MxRvEwWdO7iERI0j4Tfy1cH6fepPCa6JDVCHoKnCXNx5fuSJGpyLOaKgzGO4bqan32BmCUFnIAe8sftpdA4YycTQoSiPfo96ACLZF00AXMWUUj7NEsPEE+TWXNplvMguGEAPHW0li2N3a08QqwezdKZ91hMXCisHyT5uTNKxRJCPg6fO1fEijIu52YileL6kgsMaqWFFEw4JWPtzaUeDQt+WAP3EACliEWoZx0m7qyAPzwk2rFkGDOHm5LceSzeJK6kumcFRph5VSTOZJkpTeXSKHMBgp1OcFYgB6IwK/W1Fzq3",
        "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:(13230031)(4636009)(376002)(39860400002)(346002)(396003)(136003)(230173577357003)(230273577357003)(230922051799003)(451199024)(64100799003)(186009)(82310400011)(1800799012)(40470700004)(46966006)(36840700001)(40460700003)(40480700001)(55016003)(30864003)(16526019)(26005)(70586007)(478600001)(70206006)(6286002)(5660300002)(2906002)(83380400001)(336012)(7696005)(6666004)(8676002)(8936002)(316002)(1076003)(2616005)(110136005)(36860700001)(47076005)(356005)(4326008)(82740400003)(86362001)(426003)(7636003)(36756003)(41300700001)(21314003);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "01 Feb 2024 12:30:15.2600 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n d3d1d11e-ac55-40a3-6b52-08dc23218b16",
        "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 CH2PEPF0000009A.namprd02.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SA1PR12MB8743",
        "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": "The new item type is added for the case user wants to match traffic\nbased on packet field compare result with other fields or immediate\nvalue.\n\ne.g. take advantage the compare item user will be able to accumulate\na IPv4/TCP packet's TCP data_offset and IPv4 IHL field to a tag\nregister, then compare the tag register with IPv4 header total length\nto understand the packet has payload or not.\n\nThe supported operations can be as below:\n - RTE_FLOW_ITEM_COMPARE_EQ (equal)\n - RTE_FLOW_ITEM_COMPARE_NE (not equal)\n - RTE_FLOW_ITEM_COMPARE_LT (less than)\n - RTE_FLOW_ITEM_COMPARE_LE (less than or equal)\n - RTE_FLOW_ITEM_COMPARE_GT (great than)\n - RTE_FLOW_ITEM_COMPARE_GE (great than or equal)\n\nA sample for create the comparison flow:\nflow pattern_template 0 create ingress pattern_template_id 1 template \\\n\tcompare op mask le a_type mask tag a_tag_index mask 1 b_type \\\n\tmask tag b_tag_index mask 2 width mask 0xffffffff / end\nflow actions_template 0 create ingress actions_template_id 1 template \\\n\tcount / drop / end mask count / drop  / end\nflow template_table 0 create table_id 1 group 2 priority 1  ingress \\\n\trules_number 1 pattern_template 1 actions_template 1\nflow queue 0 create 0 template_table 1 pattern_template 0 \\\n\tactions_template 0 postpone no pattern compare op is le \\\n\ta_type is tag a_tag_index is 1 b_type is tag b_tag_index is 2 \\\n\twidth is 32 / end actions count / drop / end\n\nSigned-off-by: Suanming Mou <suanmingm@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\nAcked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n app/test-pmd/cmdline_flow.c                 | 394 ++++++++++++++++++++\n doc/guides/nics/features/default.ini        |   1 +\n doc/guides/prog_guide/rte_flow.rst          |   7 +\n doc/guides/rel_notes/release_24_03.rst      |   5 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  24 ++\n lib/ethdev/rte_flow.c                       |   1 +\n lib/ethdev/rte_flow.h                       | 332 +++++++++--------\n 7 files changed, 615 insertions(+), 149 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 972c6ae490..69b14c6eb1 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -545,6 +545,28 @@ enum index {\n \tITEM_PTYPE,\n \tITEM_PTYPE_VALUE,\n \tITEM_NSH,\n+\tITEM_COMPARE,\n+\tITEM_COMPARE_OP,\n+\tITEM_COMPARE_OP_VALUE,\n+\tITEM_COMPARE_FIELD_A_TYPE,\n+\tITEM_COMPARE_FIELD_A_TYPE_VALUE,\n+\tITEM_COMPARE_FIELD_A_LEVEL,\n+\tITEM_COMPARE_FIELD_A_LEVEL_VALUE,\n+\tITEM_COMPARE_FIELD_A_TAG_INDEX,\n+\tITEM_COMPARE_FIELD_A_TYPE_ID,\n+\tITEM_COMPARE_FIELD_A_CLASS_ID,\n+\tITEM_COMPARE_FIELD_A_OFFSET,\n+\tITEM_COMPARE_FIELD_B_TYPE,\n+\tITEM_COMPARE_FIELD_B_TYPE_VALUE,\n+\tITEM_COMPARE_FIELD_B_LEVEL,\n+\tITEM_COMPARE_FIELD_B_LEVEL_VALUE,\n+\tITEM_COMPARE_FIELD_B_TAG_INDEX,\n+\tITEM_COMPARE_FIELD_B_TYPE_ID,\n+\tITEM_COMPARE_FIELD_B_CLASS_ID,\n+\tITEM_COMPARE_FIELD_B_OFFSET,\n+\tITEM_COMPARE_FIELD_B_VALUE,\n+\tITEM_COMPARE_FIELD_B_POINTER,\n+\tITEM_COMPARE_FIELD_WIDTH,\n \n \t/* Validate/create actions. */\n \tACTIONS,\n@@ -742,6 +764,10 @@ enum index {\n #define ITEM_RAW_SIZE \\\n \t(sizeof(struct rte_flow_item_raw) + ITEM_RAW_PATTERN_SIZE)\n \n+static const char *const compare_ops[] = {\n+\t\"eq\", \"ne\", \"lt\", \"le\", \"gt\", \"ge\", NULL\n+};\n+\n /** Maximum size for external pattern in struct rte_flow_field_data. */\n #define FLOW_FIELD_PATTERN_SIZE 32\n \n@@ -1594,6 +1620,7 @@ static const enum index next_item[] = {\n \tITEM_IB_BTH,\n \tITEM_PTYPE,\n \tITEM_NSH,\n+\tITEM_COMPARE,\n \tEND_SET,\n \tZERO,\n };\n@@ -2131,6 +2158,38 @@ static const enum index item_nsh[] = {\n \tZERO,\n };\n \n+static const enum index item_compare_field[] = {\n+\tITEM_COMPARE_OP,\n+\tITEM_COMPARE_FIELD_A_TYPE,\n+\tITEM_COMPARE_FIELD_B_TYPE,\n+\tITEM_NEXT,\n+\tZERO,\n+};\n+\n+static const enum index compare_field_a[] = {\n+\tITEM_COMPARE_FIELD_A_TYPE,\n+\tITEM_COMPARE_FIELD_A_LEVEL,\n+\tITEM_COMPARE_FIELD_A_TAG_INDEX,\n+\tITEM_COMPARE_FIELD_A_TYPE_ID,\n+\tITEM_COMPARE_FIELD_A_CLASS_ID,\n+\tITEM_COMPARE_FIELD_A_OFFSET,\n+\tITEM_COMPARE_FIELD_B_TYPE,\n+\tZERO,\n+};\n+\n+static const enum index compare_field_b[] = {\n+\tITEM_COMPARE_FIELD_B_TYPE,\n+\tITEM_COMPARE_FIELD_B_LEVEL,\n+\tITEM_COMPARE_FIELD_B_TAG_INDEX,\n+\tITEM_COMPARE_FIELD_B_TYPE_ID,\n+\tITEM_COMPARE_FIELD_B_CLASS_ID,\n+\tITEM_COMPARE_FIELD_B_OFFSET,\n+\tITEM_COMPARE_FIELD_B_VALUE,\n+\tITEM_COMPARE_FIELD_B_POINTER,\n+\tITEM_COMPARE_FIELD_WIDTH,\n+\tZERO,\n+};\n+\n static const enum index next_action[] = {\n \tACTION_END,\n \tACTION_VOID,\n@@ -2873,6 +2932,24 @@ comp_quota_update_name(struct context *ctx, const struct token *token,\n static int\n comp_qu_mode_name(struct context *ctx, const struct token *token,\n \t\t  unsigned int ent, char *buf, unsigned int size);\n+static int\n+comp_set_compare_field_id(struct context *ctx, const struct token *token,\n+\t\t\t  unsigned int ent, char *buf, unsigned int size);\n+static int\n+comp_set_compare_op(struct context *ctx, const struct token *token,\n+\t\t    unsigned int ent, char *buf, unsigned int size);\n+static int\n+parse_vc_compare_op(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+static int\n+parse_vc_compare_field_id(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+static int\n+parse_vc_compare_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 struct indlst_conf {\n \tuint32_t id;\n@@ -6007,6 +6084,174 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(item_nsh),\n \t\t.call = parse_vc,\n \t},\n+\t[ITEM_COMPARE] = {\n+\t\t.name = \"compare\",\n+\t\t.help = \"match with the comparison result\",\n+\t\t.priv = PRIV_ITEM(COMPARE, sizeof(struct rte_flow_item_compare)),\n+\t\t.next = NEXT(NEXT_ENTRY(ITEM_COMPARE_OP)),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ITEM_COMPARE_OP] = {\n+\t\t.name = \"op\",\n+\t\t.help = \"operation type\",\n+\t\t.next = NEXT(item_compare_field,\n+\t\t\tNEXT_ENTRY(ITEM_COMPARE_OP_VALUE), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare, operation)),\n+\t},\n+\t[ITEM_COMPARE_OP_VALUE] = {\n+\t\t.name = \"{operation}\",\n+\t\t.help = \"operation type value\",\n+\t\t.call = parse_vc_compare_op,\n+\t\t.comp = comp_set_compare_op,\n+\t},\n+\t[ITEM_COMPARE_FIELD_A_TYPE] = {\n+\t\t.name = \"a_type\",\n+\t\t.help = \"compared field type\",\n+\t\t.next = NEXT(compare_field_a,\n+\t\t\tNEXT_ENTRY(ITEM_COMPARE_FIELD_A_TYPE_VALUE), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare, a.field)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_A_TYPE_VALUE] = {\n+\t\t.name = \"{a_type}\",\n+\t\t.help = \"compared field type value\",\n+\t\t.call = parse_vc_compare_field_id,\n+\t\t.comp = comp_set_compare_field_id,\n+\t},\n+\t[ITEM_COMPARE_FIELD_A_LEVEL] = {\n+\t\t.name = \"a_level\",\n+\t\t.help = \"compared field level\",\n+\t\t.next = NEXT(compare_field_a,\n+\t\t\t     NEXT_ENTRY(ITEM_COMPARE_FIELD_A_LEVEL_VALUE), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare, a.level)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_A_LEVEL_VALUE] = {\n+\t\t.name = \"{a_level}\",\n+\t\t.help = \"compared field level value\",\n+\t\t.call = parse_vc_compare_field_level,\n+\t\t.comp = comp_none,\n+\t},\n+\t[ITEM_COMPARE_FIELD_A_TAG_INDEX] = {\n+\t\t.name = \"a_tag_index\",\n+\t\t.help = \"compared field tag array\",\n+\t\t.next = NEXT(compare_field_a,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\ta.tag_index)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_A_TYPE_ID] = {\n+\t\t.name = \"a_type_id\",\n+\t\t.help = \"compared field type ID\",\n+\t\t.next = NEXT(compare_field_a,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\ta.type)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_A_CLASS_ID] = {\n+\t\t.name = \"a_class\",\n+\t\t.help = \"compared field class ID\",\n+\t\t.next = NEXT(compare_field_a,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_compare,\n+\t\t\t\t\t     a.class_id)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_A_OFFSET] = {\n+\t\t.name = \"a_offset\",\n+\t\t.help = \"compared field bit offset\",\n+\t\t.next = NEXT(compare_field_a,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\ta.offset)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_TYPE] = {\n+\t\t.name = \"b_type\",\n+\t\t.help = \"comparator field type\",\n+\t\t.next = NEXT(compare_field_b,\n+\t\t\tNEXT_ENTRY(ITEM_COMPARE_FIELD_B_TYPE_VALUE), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\tb.field)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_TYPE_VALUE] = {\n+\t\t.name = \"{b_type}\",\n+\t\t.help = \"comparator field type value\",\n+\t\t.call = parse_vc_compare_field_id,\n+\t\t.comp = comp_set_compare_field_id,\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_LEVEL] = {\n+\t\t.name = \"b_level\",\n+\t\t.help = \"comparator field level\",\n+\t\t.next = NEXT(compare_field_b,\n+\t\t\t     NEXT_ENTRY(ITEM_COMPARE_FIELD_B_LEVEL_VALUE), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\tb.level)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_LEVEL_VALUE] = {\n+\t\t.name = \"{b_level}\",\n+\t\t.help = \"comparator field level value\",\n+\t\t.call = parse_vc_compare_field_level,\n+\t\t.comp = comp_none,\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_TAG_INDEX] = {\n+\t\t.name = \"b_tag_index\",\n+\t\t.help = \"comparator field tag array\",\n+\t\t.next = NEXT(compare_field_b,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\tb.tag_index)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_TYPE_ID] = {\n+\t\t.name = \"b_type_id\",\n+\t\t.help = \"comparator field type ID\",\n+\t\t.next = NEXT(compare_field_b,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\tb.type)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_CLASS_ID] = {\n+\t\t.name = \"b_class\",\n+\t\t.help = \"comparator field class ID\",\n+\t\t.next = NEXT(compare_field_b,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_compare,\n+\t\t\t\t\t     b.class_id)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_OFFSET] = {\n+\t\t.name = \"b_offset\",\n+\t\t.help = \"comparator field bit offset\",\n+\t\t.next = NEXT(compare_field_b,\n+\t\t\t     NEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\tb.offset)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_VALUE] = {\n+\t\t.name = \"b_value\",\n+\t\t.help = \"comparator immediate value\",\n+\t\t.next = NEXT(compare_field_b,\n+\t\t\t     NEXT_ENTRY(COMMON_HEX), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_ARB(0, 0),\n+\t\t\t     ARGS_ENTRY_ARB(0, 0),\n+\t\t\t     ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\tb.value)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_B_POINTER] = {\n+\t\t.name = \"b_ptr\",\n+\t\t.help = \"pointer to comparator immediate value\",\n+\t\t.next = NEXT(compare_field_b,\n+\t\t\t     NEXT_ENTRY(COMMON_HEX), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\tb.pvalue),\n+\t\t\t     ARGS_ENTRY_ARB(0, 0),\n+\t\t\t     ARGS_ENTRY_ARB\n+\t\t\t\t(sizeof(struct rte_flow_item_compare),\n+\t\t\t\t FLOW_FIELD_PATTERN_SIZE)),\n+\t},\n+\t[ITEM_COMPARE_FIELD_WIDTH] = {\n+\t\t.name = \"width\",\n+\t\t.help = \"number of bits to compare\",\n+\t\t.next = NEXT(item_compare_field,\n+\t\t\tNEXT_ENTRY(COMMON_UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_compare,\n+\t\t\t\t\twidth)),\n+\t},\n \n \t/* Validate/create actions. */\n \t[ACTIONS] = {\n@@ -8429,6 +8674,122 @@ parse_vc_item_l2tpv2_type(struct context *ctx, const struct token *token,\n \treturn len;\n }\n \n+/** Parse operation for compare match item. */\n+static int\n+parse_vc_compare_op(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_item_compare *compare_item;\n+\tunsigned int i;\n+\n+\t(void)token;\n+\t(void)buf;\n+\t(void)size;\n+\tif (ctx->curr != ITEM_COMPARE_OP_VALUE)\n+\t\treturn -1;\n+\tfor (i = 0; compare_ops[i]; ++i)\n+\t\tif (!strcmp_partial(compare_ops[i], str, len))\n+\t\t\tbreak;\n+\tif (!compare_ops[i])\n+\t\treturn -1;\n+\tif (!ctx->object)\n+\t\treturn len;\n+\tcompare_item = ctx->object;\n+\tcompare_item->operation = (enum rte_flow_item_compare_op)i;\n+\treturn len;\n+}\n+\n+/** Parse id for compare match item. */\n+static int\n+parse_vc_compare_field_id(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_item_compare *compare_item;\n+\tunsigned int i;\n+\n+\t(void)token;\n+\t(void)buf;\n+\t(void)size;\n+\tif (ctx->curr != ITEM_COMPARE_FIELD_A_TYPE_VALUE &&\n+\t\tctx->curr != ITEM_COMPARE_FIELD_B_TYPE_VALUE)\n+\t\treturn -1;\n+\tfor (i = 0; flow_field_ids[i]; ++i)\n+\t\tif (!strcmp_partial(flow_field_ids[i], str, len))\n+\t\t\tbreak;\n+\tif (!flow_field_ids[i])\n+\t\treturn -1;\n+\tif (!ctx->object)\n+\t\treturn len;\n+\tcompare_item = ctx->object;\n+\tif (ctx->curr == ITEM_COMPARE_FIELD_A_TYPE_VALUE)\n+\t\tcompare_item->a.field = (enum rte_flow_field_id)i;\n+\telse\n+\t\tcompare_item->b.field = (enum rte_flow_field_id)i;\n+\treturn len;\n+}\n+\n+/** Parse level for compare match item. */\n+static int\n+parse_vc_compare_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_item_compare *compare_item;\n+\tstruct flex_item *fp = NULL;\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 != ITEM_COMPARE_FIELD_A_LEVEL_VALUE &&\n+\t\tctx->curr != ITEM_COMPARE_FIELD_B_LEVEL_VALUE)\n+\t\treturn -1;\n+\tif (!ctx->object)\n+\t\treturn len;\n+\tcompare_item = 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 == ITEM_COMPARE_FIELD_A_LEVEL_VALUE)\n+\t\t\tcompare_item->a.level = val;\n+\t\telse\n+\t\t\tcompare_item->b.level = val;\n+\t\treturn len;\n+\t}\n+\tif ((ctx->curr == ITEM_COMPARE_FIELD_A_LEVEL_VALUE &&\n+\t\tcompare_item->a.field == RTE_FLOW_FIELD_FLEX_ITEM) ||\n+\t\t(ctx->curr == ITEM_COMPARE_FIELD_B_LEVEL_VALUE &&\n+\t\tcompare_item->b.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 == ITEM_COMPARE_FIELD_A_LEVEL_VALUE) {\n+\t\tif (compare_item->a.field != RTE_FLOW_FIELD_FLEX_ITEM)\n+\t\t\tcompare_item->a.level = val;\n+\t\telse\n+\t\t\tcompare_item->a.flex_handle = fp->flex_handle;\n+\t} else if (ctx->curr == ITEM_COMPARE_FIELD_B_LEVEL_VALUE) {\n+\t\tif (compare_item->b.field != RTE_FLOW_FIELD_FLEX_ITEM)\n+\t\t\tcompare_item->b.level = val;\n+\t\telse\n+\t\t\tcompare_item->b.flex_handle = fp->flex_handle;\n+\t}\n+\treturn len;\n+}\n+\n /** Parse meter color action type. */\n static int\n parse_vc_action_meter_color_type(struct context *ctx, const struct token *token,\n@@ -11915,6 +12276,39 @@ comp_rule_id(struct context *ctx, const struct token *token,\n \treturn i;\n }\n \n+/** Complete operation for compare match item. */\n+static int\n+comp_set_compare_op(struct context *ctx, const struct token *token,\n+\t\t    unsigned int ent, char *buf, unsigned int size)\n+{\n+\tRTE_SET_USED(ctx);\n+\tRTE_SET_USED(token);\n+\tif (!buf)\n+\t\treturn RTE_DIM(compare_ops);\n+\tif (ent < RTE_DIM(compare_ops) - 1)\n+\t\treturn strlcpy(buf, compare_ops[ent], size);\n+\treturn -1;\n+}\n+\n+/** Complete field id for compare match item. */\n+static int\n+comp_set_compare_field_id(struct context *ctx, const struct token *token,\n+\t\t\t  unsigned int ent, char *buf, unsigned int size)\n+{\n+\tconst char *name;\n+\n+\tRTE_SET_USED(token);\n+\tif (!buf)\n+\t\treturn RTE_DIM(flow_field_ids);\n+\tif (ent >= RTE_DIM(flow_field_ids) - 1)\n+\t\treturn -1;\n+\tname = flow_field_ids[ent];\n+\tif (ctx->curr == ITEM_COMPARE_FIELD_B_TYPE ||\n+\t    (strcmp(name, \"pointer\") && strcmp(name, \"value\")))\n+\t\treturn strlcpy(buf, name, size);\n+\treturn -1;\n+}\n+\n /** Complete type field for RSS action. */\n static int\n comp_vc_action_rss_type(struct context *ctx, const struct token *token,\ndiff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini\nindex 5115963136..1ded1d5de1 100644\n--- a/doc/guides/nics/features/default.ini\n+++ b/doc/guides/nics/features/default.ini\n@@ -88,6 +88,7 @@ aggr_affinity        =\n ah                   =\n any                  =\n arp_eth_ipv4         =\n+compare              =\n conntrack            =\n ecpri                =\n esp                  =\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex f936a9ba19..dc038e2c39 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1587,6 +1587,13 @@ the packet.\n \n - ``value``: Specific value to match.\n \n+Item: ``COMPARE``\n+^^^^^^^^^^^^^^^^^\n+\n+Matches the comparison result between packet fields or value.\n+\n+- ``compare``: Comparison information.\n+\n Actions\n ~~~~~~~\n \ndiff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst\nindex efeda6ea97..ffceab59e4 100644\n--- a/doc/guides/rel_notes/release_24_03.rst\n+++ b/doc/guides/rel_notes/release_24_03.rst\n@@ -70,6 +70,11 @@ New Features\n   * Added a fath path function ``rte_eth_tx_queue_count`` to get the number of used\n     descriptors of a Tx queue.\n \n+* **Added compare flow matching criteria.**\n+\n+  Added ``RTE_FLOW_ITEM_TYPE_COMPARE`` to allow matching on compare\n+  result between the packet fields or value.\n+\n * **Updated Atomic Rules' Arkville PMD.**\n \n   * Added support for Atomic Rules' TK242 packet-capture family of devices\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex ab18a80b30..c79d8929f5 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3856,6 +3856,13 @@ This section lists supported pattern items and their attributes, if any.\n \n         - ``packet_type {unsigned}``: packet type.\n \n+- ``compare``: match the comparison result between packet fields or value.\n+\n+        - ``op {string}``: comparison operation type.\n+        - ``a_type {string}``: compared field.\n+        - ``b_type {string}``: comparator field.\n+        - ``width {unsigned}``: comparison width.\n+\n \n Actions list\n ^^^^^^^^^^^^\n@@ -5320,6 +5327,23 @@ A RAW rule can be created as following using ``pattern_hex`` key and mask.\n              pattern_hex mask 0000000000000000000000000000000000000000000000000000ffffffff / end actions\n              queue index 4 / end\n \n+Sample match with comparison rule\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Match with comparsion rule can be created as following using ``compare``.\n+\n+::\n+\n+    testpmd> flow pattern_template 0 create ingress pattern_template_id 1 template compare op mask le\n+             a_type mask tag a_tag_index mask 1 b_type mask tag b_tag_index mask 2 width mask 0xffffffff / end\n+    testpmd> flow actions_template 0 create ingress actions_template_id 1 template count / drop / end\n+             mask count / drop  / end\n+    testpmd> flow template_table 0 create table_id 1 group 2 priority 1  ingress rules_number 1\n+             pattern_template 1 actions_template 1\n+    testpmd> flow queue 0 create 0 template_table 1 pattern_template 0 actions_template 0 postpone no\n+             pattern compare op is le a_type is tag a_tag_index is 1 b_type is tag b_tag_index is 2 width is 32 / end\n+\t     actions count / drop / end\n+\n BPF Functions\n --------------\n \ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex 3f58d792f9..5f63529f9f 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -170,6 +170,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \tMK_FLOW_ITEM(TX_QUEUE, sizeof(struct rte_flow_item_tx_queue)),\n \tMK_FLOW_ITEM(IB_BTH, sizeof(struct rte_flow_item_ib_bth)),\n \tMK_FLOW_ITEM(PTYPE, sizeof(struct rte_flow_item_ptype)),\n+\tMK_FLOW_ITEM(COMPARE, sizeof(struct rte_flow_item_compare)),\n };\n \n /** Generate flow_action[] entry. */\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex a143ecb194..d906288f2c 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -714,6 +714,13 @@ enum rte_flow_item_type {\n \t * @see struct rte_flow_item_random.\n \t */\n \tRTE_FLOW_ITEM_TYPE_RANDOM,\n+\n+\t/**\n+\t * Matches the packet with compare result.\n+\t *\n+\t * See struct rte_flow_item_compare.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_COMPARE,\n };\n \n /**\n@@ -2365,6 +2372,182 @@ static const struct rte_flow_item_ptype rte_flow_item_ptype_mask = {\n };\n #endif\n \n+/**\n+ * Field IDs for packet field.\n+ * e.g. the packet field IDs used in RTE_FLOW_ACTION_TYPE_MODIFY_FIELD\n+ * and RTE_FLOW_ITEM_TYPE_COMPARE.\n+ */\n+enum rte_flow_field_id {\n+\tRTE_FLOW_FIELD_START = 0,\t/**< Start of a packet. */\n+\tRTE_FLOW_FIELD_MAC_DST,\t\t/**< Destination MAC Address. */\n+\tRTE_FLOW_FIELD_MAC_SRC,\t\t/**< Source MAC Address. */\n+\tRTE_FLOW_FIELD_VLAN_TYPE,\t/**< VLAN Tag Identifier. */\n+\tRTE_FLOW_FIELD_VLAN_ID,\t\t/**< VLAN Identifier. */\n+\tRTE_FLOW_FIELD_MAC_TYPE,\t/**< EtherType. */\n+\tRTE_FLOW_FIELD_IPV4_DSCP,\t/**< IPv4 DSCP. */\n+\tRTE_FLOW_FIELD_IPV4_TTL,\t/**< IPv4 Time To Live. */\n+\tRTE_FLOW_FIELD_IPV4_SRC,\t/**< IPv4 Source Address. */\n+\tRTE_FLOW_FIELD_IPV4_DST,\t/**< IPv4 Destination Address. */\n+\tRTE_FLOW_FIELD_IPV6_DSCP,\t/**< IPv6 DSCP. */\n+\tRTE_FLOW_FIELD_IPV6_HOPLIMIT,\t/**< IPv6 Hop Limit. */\n+\tRTE_FLOW_FIELD_IPV6_SRC,\t/**< IPv6 Source Address. */\n+\tRTE_FLOW_FIELD_IPV6_DST,\t/**< IPv6 Destination Address. */\n+\tRTE_FLOW_FIELD_TCP_PORT_SRC,\t/**< TCP Source Port Number. */\n+\tRTE_FLOW_FIELD_TCP_PORT_DST,\t/**< TCP Destination Port Number. */\n+\tRTE_FLOW_FIELD_TCP_SEQ_NUM,\t/**< TCP Sequence Number. */\n+\tRTE_FLOW_FIELD_TCP_ACK_NUM,\t/**< TCP Acknowledgment Number. */\n+\tRTE_FLOW_FIELD_TCP_FLAGS,\t/**< TCP Flags. */\n+\tRTE_FLOW_FIELD_UDP_PORT_SRC,\t/**< UDP Source Port Number. */\n+\tRTE_FLOW_FIELD_UDP_PORT_DST,\t/**< UDP Destination Port Number. */\n+\tRTE_FLOW_FIELD_VXLAN_VNI,\t/**< VXLAN Network Identifier. */\n+\tRTE_FLOW_FIELD_GENEVE_VNI,\t/**< GENEVE Network Identifier. */\n+\tRTE_FLOW_FIELD_GTP_TEID,\t/**< GTP Tunnel Endpoint Identifier. */\n+\tRTE_FLOW_FIELD_TAG,\t\t/**< Tag value. */\n+\tRTE_FLOW_FIELD_MARK,\t\t/**< Mark value. */\n+\tRTE_FLOW_FIELD_META,\t\t/**< Metadata value. */\n+\tRTE_FLOW_FIELD_POINTER,\t\t/**< Memory pointer. */\n+\tRTE_FLOW_FIELD_VALUE,\t\t/**< Immediate value. */\n+\tRTE_FLOW_FIELD_IPV4_ECN,\t/**< IPv4 ECN. */\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_IPV6_PROTO,\t/**< IPv6 next header. */\n+\tRTE_FLOW_FIELD_FLEX_ITEM,\t/**< Flex item. */\n+\tRTE_FLOW_FIELD_HASH_RESULT,\t/**< Hash result. */\n+\tRTE_FLOW_FIELD_GENEVE_OPT_TYPE,\t/**< GENEVE option type. */\n+\tRTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class. */\n+\tRTE_FLOW_FIELD_GENEVE_OPT_DATA,\t/**< GENEVE option data. */\n+\tRTE_FLOW_FIELD_MPLS,\t\t/**< MPLS header. */\n+\tRTE_FLOW_FIELD_TCP_DATA_OFFSET,\t/**< TCP data offset. */\n+\tRTE_FLOW_FIELD_IPV4_IHL,\t/**< IPv4 IHL. */\n+\tRTE_FLOW_FIELD_IPV4_TOTAL_LEN,\t/**< IPv4 total length. */\n+\tRTE_FLOW_FIELD_IPV6_PAYLOAD_LEN,/**< IPv6 payload length. */\n+\tRTE_FLOW_FIELD_RANDOM\t\t/**< Random value. */\n+};\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this structure may change without prior notice\n+ *\n+ * Field description for packet field.\n+ * e.g. the packet fields used in RTE_FLOW_ACTION_TYPE_MODIFY_FIELD\n+ * and RTE_FLOW_ITEM_TYPE_COMPARE.\n+ */\n+struct rte_flow_field_data {\n+\tenum rte_flow_field_id field; /**< Field or memory type ID. */\n+\tunion {\n+\t\tstruct {\n+\t\t\t/** Encapsulation level and tag index or flex item handle. */\n+\t\t\tunion {\n+\t\t\t\tstruct {\n+\t\t\t\t\t/**\n+\t\t\t\t\t * Packet encapsulation level containing\n+\t\t\t\t\t * the field to modify.\n+\t\t\t\t\t *\n+\t\t\t\t\t * - @p 0 requests the default behavior.\n+\t\t\t\t\t *   Depending on the packet type, it\n+\t\t\t\t\t *   can mean outermost, innermost or\n+\t\t\t\t\t *   anything in between.\n+\t\t\t\t\t *\n+\t\t\t\t\t *   It basically stands for the\n+\t\t\t\t\t *   innermost encapsulation level.\n+\t\t\t\t\t *   Modification can be performed\n+\t\t\t\t\t *   according to PMD and device\n+\t\t\t\t\t *   capabilities.\n+\t\t\t\t\t *\n+\t\t\t\t\t * - @p 1 requests modification to be\n+\t\t\t\t\t *   performed on the outermost packet\n+\t\t\t\t\t *   encapsulation level.\n+\t\t\t\t\t *\n+\t\t\t\t\t * - @p 2 and subsequent values request\n+\t\t\t\t\t *   modification to be performed on\n+\t\t\t\t\t *   the specified inner packet\n+\t\t\t\t\t *   encapsulation level, from\n+\t\t\t\t\t *   outermost to innermost (lower to\n+\t\t\t\t\t *   higher values).\n+\t\t\t\t\t *\n+\t\t\t\t\t * Values other than @p 0 are not\n+\t\t\t\t\t * necessarily supported.\n+\t\t\t\t\t *\n+\t\t\t\t\t * @note that for MPLS field,\n+\t\t\t\t\t * encapsulation level also include\n+\t\t\t\t\t * tunnel since MPLS may appear in\n+\t\t\t\t\t * outer, inner or tunnel.\n+\t\t\t\t\t */\n+\t\t\t\t\tuint8_t level;\n+\t\t\t\t\tunion {\n+\t\t\t\t\t\t/**\n+\t\t\t\t\t\t * Tag index array inside\n+\t\t\t\t\t\t * encapsulation level.\n+\t\t\t\t\t\t * Used for VLAN, MPLS or TAG types.\n+\t\t\t\t\t\t */\n+\t\t\t\t\t\tuint8_t tag_index;\n+\t\t\t\t\t\t/**\n+\t\t\t\t\t\t * Geneve option identifier.\n+\t\t\t\t\t\t * Relevant only for\n+\t\t\t\t\t\t * RTE_FLOW_FIELD_GENEVE_OPT_XXXX\n+\t\t\t\t\t\t * modification type.\n+\t\t\t\t\t\t */\n+\t\t\t\t\t\tstruct {\n+\t\t\t\t\t\t\t/**\n+\t\t\t\t\t\t\t * Geneve option type.\n+\t\t\t\t\t\t\t */\n+\t\t\t\t\t\t\tuint8_t type;\n+\t\t\t\t\t\t\t/**\n+\t\t\t\t\t\t\t * Geneve option class.\n+\t\t\t\t\t\t\t */\n+\t\t\t\t\t\t\trte_be16_t class_id;\n+\t\t\t\t\t\t};\n+\t\t\t\t\t};\n+\t\t\t\t};\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+\t\t/**\n+\t\t * Immediate value for RTE_FLOW_FIELD_VALUE, presented in the\n+\t\t * same byte order and length as in relevant rte_flow_item_xxx.\n+\t\t * The immediate source bitfield offset is inherited from\n+\t\t * the destination's one.\n+\t\t */\n+\t\tuint8_t value[16];\n+\t\t/**\n+\t\t * Memory address for RTE_FLOW_FIELD_POINTER, memory layout\n+\t\t * should be the same as for relevant field in the\n+\t\t * rte_flow_item_xxx structure.\n+\t\t */\n+\t\tvoid *pvalue;\n+\t};\n+};\n+\n+/**\n+ * Expected operation types for compare item.\n+ */\n+enum rte_flow_item_compare_op {\n+\tRTE_FLOW_ITEM_COMPARE_EQ,\t/* Compare result equal. */\n+\tRTE_FLOW_ITEM_COMPARE_NE,\t/* Compare result not equal. */\n+\tRTE_FLOW_ITEM_COMPARE_LT,\t/* Compare result less than. */\n+\tRTE_FLOW_ITEM_COMPARE_LE,\t/* Compare result less than or equal. */\n+\tRTE_FLOW_ITEM_COMPARE_GT,\t/* Compare result great than. */\n+\tRTE_FLOW_ITEM_COMPARE_GE,\t/* Compare result great than or equal. */\n+};\n+\n+/**\n+ *\n+ * RTE_FLOW_ITEM_TYPE_COMPARE\n+ *\n+ * Matches the packet with compare result.\n+ *\n+ * The operation means a compare with b result.\n+ */\n+struct rte_flow_item_compare {\n+\tenum rte_flow_item_compare_op operation; /* The compare operation. */\n+\tstruct rte_flow_field_data a;\t\t /* Field be compared.  */\n+\tstruct rte_flow_field_data b;\t\t /* Field as comparator. */\n+\tuint32_t width;\t\t\t\t /* Compare width. */\n+};\n+\n /**\n  * Action types.\n  *\n@@ -3885,155 +4068,6 @@ struct rte_flow_action_ethdev {\n \tuint16_t port_id; /**< ethdev port ID */\n };\n \n-/**\n- * Field IDs for MODIFY_FIELD action.\n- * e.g. the packet field IDs used in RTE_FLOW_ACTION_TYPE_MODIFY_FIELD\n- * and RTE_FLOW_ITEM_TYPE_COMPARE.\n- */\n-enum rte_flow_field_id {\n-\tRTE_FLOW_FIELD_START = 0,\t/**< Start of a packet. */\n-\tRTE_FLOW_FIELD_MAC_DST,\t\t/**< Destination MAC Address. */\n-\tRTE_FLOW_FIELD_MAC_SRC,\t\t/**< Source MAC Address. */\n-\tRTE_FLOW_FIELD_VLAN_TYPE,\t/**< VLAN Tag Identifier. */\n-\tRTE_FLOW_FIELD_VLAN_ID,\t\t/**< VLAN Identifier. */\n-\tRTE_FLOW_FIELD_MAC_TYPE,\t/**< EtherType. */\n-\tRTE_FLOW_FIELD_IPV4_DSCP,\t/**< IPv4 DSCP. */\n-\tRTE_FLOW_FIELD_IPV4_TTL,\t/**< IPv4 Time To Live. */\n-\tRTE_FLOW_FIELD_IPV4_SRC,\t/**< IPv4 Source Address. */\n-\tRTE_FLOW_FIELD_IPV4_DST,\t/**< IPv4 Destination Address. */\n-\tRTE_FLOW_FIELD_IPV6_DSCP,\t/**< IPv6 DSCP. */\n-\tRTE_FLOW_FIELD_IPV6_HOPLIMIT,\t/**< IPv6 Hop Limit. */\n-\tRTE_FLOW_FIELD_IPV6_SRC,\t/**< IPv6 Source Address. */\n-\tRTE_FLOW_FIELD_IPV6_DST,\t/**< IPv6 Destination Address. */\n-\tRTE_FLOW_FIELD_TCP_PORT_SRC,\t/**< TCP Source Port Number. */\n-\tRTE_FLOW_FIELD_TCP_PORT_DST,\t/**< TCP Destination Port Number. */\n-\tRTE_FLOW_FIELD_TCP_SEQ_NUM,\t/**< TCP Sequence Number. */\n-\tRTE_FLOW_FIELD_TCP_ACK_NUM,\t/**< TCP Acknowledgment Number. */\n-\tRTE_FLOW_FIELD_TCP_FLAGS,\t/**< TCP Flags. */\n-\tRTE_FLOW_FIELD_UDP_PORT_SRC,\t/**< UDP Source Port Number. */\n-\tRTE_FLOW_FIELD_UDP_PORT_DST,\t/**< UDP Destination Port Number. */\n-\tRTE_FLOW_FIELD_VXLAN_VNI,\t/**< VXLAN Network Identifier. */\n-\tRTE_FLOW_FIELD_GENEVE_VNI,\t/**< GENEVE Network Identifier. */\n-\tRTE_FLOW_FIELD_GTP_TEID,\t/**< GTP Tunnel Endpoint Identifier. */\n-\tRTE_FLOW_FIELD_TAG,\t\t/**< Tag value. */\n-\tRTE_FLOW_FIELD_MARK,\t\t/**< Mark value. */\n-\tRTE_FLOW_FIELD_META,\t\t/**< Metadata value. */\n-\tRTE_FLOW_FIELD_POINTER,\t\t/**< Memory pointer. */\n-\tRTE_FLOW_FIELD_VALUE,\t\t/**< Immediate value. */\n-\tRTE_FLOW_FIELD_IPV4_ECN,\t/**< IPv4 ECN. */\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_IPV6_PROTO,\t/**< IPv6 next header. */\n-\tRTE_FLOW_FIELD_FLEX_ITEM,\t/**< Flex item. */\n-\tRTE_FLOW_FIELD_HASH_RESULT,\t/**< Hash result. */\n-\tRTE_FLOW_FIELD_GENEVE_OPT_TYPE,\t/**< GENEVE option type. */\n-\tRTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class. */\n-\tRTE_FLOW_FIELD_GENEVE_OPT_DATA,\t/**< GENEVE option data. */\n-\tRTE_FLOW_FIELD_MPLS,\t\t/**< MPLS header. */\n-\tRTE_FLOW_FIELD_TCP_DATA_OFFSET,\t/**< TCP data offset. */\n-\tRTE_FLOW_FIELD_IPV4_IHL,\t/**< IPv4 IHL. */\n-\tRTE_FLOW_FIELD_IPV4_TOTAL_LEN,\t/**< IPv4 total length. */\n-\tRTE_FLOW_FIELD_IPV6_PAYLOAD_LEN,/**< IPv6 payload length. */\n-\tRTE_FLOW_FIELD_RANDOM\t\t/**< Random value. */\n-};\n-\n-/**\n- * @warning\n- * @b EXPERIMENTAL: this structure may change without prior notice\n- *\n- * Field description for packet field.\n- * e.g. the packet fields used in RTE_FLOW_ACTION_TYPE_MODIFY_FIELD\n- * and RTE_FLOW_ITEM_TYPE_COMPARE.\n- */\n-struct rte_flow_field_data {\n-\tenum rte_flow_field_id field; /**< Field or memory type ID. */\n-\tunion {\n-\t\tstruct {\n-\t\t\t/** Encapsulation level and tag index or flex item handle. */\n-\t\t\tunion {\n-\t\t\t\tstruct {\n-\t\t\t\t\t/**\n-\t\t\t\t\t * Packet encapsulation level containing\n-\t\t\t\t\t * the field to modify.\n-\t\t\t\t\t *\n-\t\t\t\t\t * - @p 0 requests the default behavior.\n-\t\t\t\t\t *   Depending on the packet type, it\n-\t\t\t\t\t *   can mean outermost, innermost or\n-\t\t\t\t\t *   anything in between.\n-\t\t\t\t\t *\n-\t\t\t\t\t *   It basically stands for the\n-\t\t\t\t\t *   innermost encapsulation level.\n-\t\t\t\t\t *   Modification can be performed\n-\t\t\t\t\t *   according to PMD and device\n-\t\t\t\t\t *   capabilities.\n-\t\t\t\t\t *\n-\t\t\t\t\t * - @p 1 requests modification to be\n-\t\t\t\t\t *   performed on the outermost packet\n-\t\t\t\t\t *   encapsulation level.\n-\t\t\t\t\t *\n-\t\t\t\t\t * - @p 2 and subsequent values request\n-\t\t\t\t\t *   modification to be performed on\n-\t\t\t\t\t *   the specified inner packet\n-\t\t\t\t\t *   encapsulation level, from\n-\t\t\t\t\t *   outermost to innermost (lower to\n-\t\t\t\t\t *   higher values).\n-\t\t\t\t\t *\n-\t\t\t\t\t * Values other than @p 0 are not\n-\t\t\t\t\t * necessarily supported.\n-\t\t\t\t\t *\n-\t\t\t\t\t * @note that for MPLS field,\n-\t\t\t\t\t * encapsulation level also include\n-\t\t\t\t\t * tunnel since MPLS may appear in\n-\t\t\t\t\t * outer, inner or tunnel.\n-\t\t\t\t\t */\n-\t\t\t\t\tuint8_t level;\n-\t\t\t\t\tunion {\n-\t\t\t\t\t\t/**\n-\t\t\t\t\t\t * Tag index array inside\n-\t\t\t\t\t\t * encapsulation level.\n-\t\t\t\t\t\t * Used for VLAN, MPLS or TAG types.\n-\t\t\t\t\t\t */\n-\t\t\t\t\t\tuint8_t tag_index;\n-\t\t\t\t\t\t/**\n-\t\t\t\t\t\t * Geneve option identifier.\n-\t\t\t\t\t\t * Relevant only for\n-\t\t\t\t\t\t * RTE_FLOW_FIELD_GENEVE_OPT_XXXX\n-\t\t\t\t\t\t * modification type.\n-\t\t\t\t\t\t */\n-\t\t\t\t\t\tstruct {\n-\t\t\t\t\t\t\t/**\n-\t\t\t\t\t\t\t * Geneve option type.\n-\t\t\t\t\t\t\t */\n-\t\t\t\t\t\t\tuint8_t type;\n-\t\t\t\t\t\t\t/**\n-\t\t\t\t\t\t\t * Geneve option class.\n-\t\t\t\t\t\t\t */\n-\t\t\t\t\t\t\trte_be16_t class_id;\n-\t\t\t\t\t\t};\n-\t\t\t\t\t};\n-\t\t\t\t};\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-\t\t/**\n-\t\t * Immediate value for RTE_FLOW_FIELD_VALUE, presented in the\n-\t\t * same byte order and length as in relevant rte_flow_item_xxx.\n-\t\t * The immediate source bitfield offset is inherited from\n-\t\t * the destination's one.\n-\t\t */\n-\t\tuint8_t value[16];\n-\t\t/**\n-\t\t * Memory address for RTE_FLOW_FIELD_POINTER, memory layout\n-\t\t * should be the same as for relevant field in the\n-\t\t * rte_flow_item_xxx structure.\n-\t\t */\n-\t\tvoid *pvalue;\n-\t};\n-};\n-\n /**\n  * Operation types for MODIFY_FIELD action.\n  */\n",
    "prefixes": [
        "v5",
        "2/3"
    ]
}