get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 110022,
    "url": "https://patches.dpdk.org/api/patches/110022/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220421180241.514767-1-jerinj@marvell.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": "<20220421180241.514767-1-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220421180241.514767-1-jerinj@marvell.com",
    "date": "2022-04-21T18:02:41",
    "name": "[v4] ethdev: mtr: support protocol based input color selection",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "96ffc53248536fe09eac0b3522f0ed1fb1c2516c",
    "submitter": {
        "id": 1188,
        "url": "https://patches.dpdk.org/api/people/1188/?format=api",
        "name": "Jerin Jacob Kollanukkaran",
        "email": "jerinj@marvell.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/20220421180241.514767-1-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 22601,
            "url": "https://patches.dpdk.org/api/series/22601/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22601",
            "date": "2022-04-21T18:02:41",
            "name": "[v4] ethdev: mtr: support protocol based input color selection",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/22601/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/110022/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/110022/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 B537FA0093;\n\tThu, 21 Apr 2022 20:03:38 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6252B40042;\n\tThu, 21 Apr 2022 20:03:38 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 51B7440040\n for <dev@dpdk.org>; Thu, 21 Apr 2022 20:03:37 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id\n 23LCovmJ004558;\n Thu, 21 Apr 2022 11:03:07 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3fk7mk19pe-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 21 Apr 2022 11:03:07 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Thu, 21 Apr 2022 11:03:05 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 21 Apr 2022 11:03:05 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id 36ED33F7069;\n Thu, 21 Apr 2022 11:02:46 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=nQDcER+BnqRaxqYUWUlJLWRJJ7Nks0RYktEy0JAA5Oc=;\n b=WvFecCVPiU35FUGOrBZrfgn+XZNTGSSvlea1I4VOViWXrkSJjQJSR1ohdsiT+EYfIqRm\n 73roC2qEyWLANyB2ktEn2WKnFPO9rXwXD9yrQOhr6b0SiZtMGDhnZB8A9cHMdoBYclvg\n 59FZ9TW6WuWxLlX4ZO6mIRQ/SIyMHDYhTfCdadA+aP+OS4w/KV0vzjEeilsBiPDVfO+c\n n9wWsswotKQNMSR792jEY6KY2QEbHg9iHdHO/li9B9DEZTJkYObH6s1WcqGJ3ugBWtLG\n lHc+rI4Jh61QMzr3HBwgU+zbg5X0aqNF5/0g7d3UTIF9IFrNue54y/xsz5ELd7x5hFZX sA==",
        "From": "<jerinj@marvell.com>",
        "To": "<dev@dpdk.org>, Cristian Dumitrescu <cristian.dumitrescu@intel.com>,\n Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit\n <ferruh.yigit@xilinx.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ray Kinsella <mdr@ashroe.eu>",
        "CC": "<ajit.khaparde@broadcom.com>, <aboyer@pensando.io>,\n <beilei.xing@intel.com>, <bruce.richardson@intel.com>, <chas3@att.com>,\n <chenbo.xia@intel.com>, <ciara.loftus@intel.com>,\n <dsinghrawat@marvell.com>, <ed.czeck@atomicrules.com>,\n <evgenys@amazon.com>, <grive@u256.net>, <g.singh@nxp.com>,\n <zhouguoyang@huawei.com>, <haiyue.wang@intel.com>,\n <hkalra@marvell.com>, <heinrich.kuhn@corigine.com>,\n <hemant.agrawal@nxp.com>, <hyonkim@cisco.com>, <igorch@amazon.com>,\n <irusskikh@marvell.com>, <jgrajcia@cisco.com>,\n <jasvinder.singh@intel.com>, <jianwang@trustnetic.com>,\n <jiawenwu@trustnetic.com>, <jingjing.wu@intel.com>,\n <johndale@cisco.com>, <john.miller@atomicrules.com>,\n <linville@tuxdriver.com>, <keith.wiles@intel.com>,\n <kirankumark@marvell.com>, <oulijun@huawei.com>, <lironh@marvell.com>,\n <longli@microsoft.com>, <mw@semihalf.com>, <spinler@cesnet.cz>,\n <matan@nvidia.com>, <matt.peters@windriver.com>,\n <maxime.coquelin@redhat.com>, <mk@semihalf.com>, <humin29@huawei.com>,\n <pnalla@marvell.com>, <ndabilpuram@marvell.com>,\n <qiming.yang@intel.com>, <qi.z.zhang@intel.com>, <radhac@marvell.com>,\n <rahul.lakkireddy@chelsio.com>, <rmody@marvell.com>,\n <rosen.xu@intel.com>, <sachin.saxena@oss.nxp.com>,\n <skoteshwar@marvell.com>, <shshaikh@marvell.com>,\n <shaibran@amazon.com>, <shepard.siegel@atomicrules.com>,\n <asomalap@amd.com>, <somnath.kotur@broadcom.com>,\n <sthemmin@microsoft.com>, <steven.webster@windriver.com>,\n <skori@marvell.com>, <mtetsuyah@gmail.com>, <vburru@marvell.com>,\n <viacheslavo@nvidia.com>, <xiao.w.wang@intel.com>,\n <cloud.wangxiaoyun@huawei.com>, <yisen.zhuang@huawei.com>,\n <yongwang@vmware.com>, <xuanziyang2@huawei.com>, Jerin Jacob\n <jerinj@marvell.com>",
        "Subject": "[dpdk-dev] [PATCH v4] ethdev: mtr: support protocol based input color\n selection",
        "Date": "Thu, 21 Apr 2022 23:32:41 +0530",
        "Message-ID": "<20220421180241.514767-1-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.36.0",
        "In-Reply-To": "<20220301085824.1041009-1-skori@marvell.com>",
        "References": "<20220301085824.1041009-1-skori@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "j8JVGoO7eJ3pEwwQ4fpMDh0nUAipv1EJ",
        "X-Proofpoint-GUID": "j8JVGoO7eJ3pEwwQ4fpMDh0nUAipv1EJ",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514\n definitions=2022-04-21_03,2022-04-21_01,2022-02-23_01",
        "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": "From: Jerin Jacob <jerinj@marvell.com>\n\nCurrently, meter object supports only DSCP based on input color table,\nThe patch enhance that to support VLAN based input color table,\ncolor table based on inner field for the tunnel use case, and\nsupport for fallback color per meter if packet based on a different field.\n\nAll of the above features are exposed through capability and added\nadditional capability to specify the implementation supports\nmore than one input color table per ethdev port.\n\nSuggested-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\n---\nv4..v3:\n\n- Aligned with community meeting call which is documented in\nhttps://patches.dpdk.org/project/dpdk/patch/20220301085824.1041009-1-skori@marvell.com/\nas last message. With following exception, \n- Used RTE_MTR_COLOR_IN_*_DSCP instead of RTE_MTR_COLOR_IN_*_IP as\nthere is already dscp_table and rte_mtr_meter_dscp_table_update() API.\nChanging above symbols break existing application for no good.\n- Updated 22.07 release notes\n- Remove testpmd changes from series to finalize the API spec first and\n  then we can send testpmd changes.\n\nv3..v2:\n\n- Fix input color flags as a bitmask\n- Add definitions for newly added API\n\nv2..v1:\n- Fix seperate typo\n\nv1..RFC:\n\nAddress the review comments by Cristian at\nhttps://patches.dpdk.org/project/dpdk/patch/20210820082401.3778736-1-jerinj@marvell.com/\n\n- Moved to v22.07 release\n- Updated rte_mtr_input_color_method to support all VLAN, DSCP, Inner\n  cases\n- Added input_color_method\n- Removed union between vlan_table and dscp_table\n- Kept VLAN instead of PCP as HW coloring based on DEI(1bit), PCP(3\n  bits)\n\n .../traffic_metering_and_policing.rst         |  33 ++++\n doc/guides/rel_notes/release_22_07.rst        |  10 +\n lib/ethdev/rte_mtr.c                          |  23 +++\n lib/ethdev/rte_mtr.h                          | 186 +++++++++++++++++-\n lib/ethdev/rte_mtr_driver.h                   |  19 ++\n lib/ethdev/version.map                        |   4 +\n 6 files changed, 265 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/doc/guides/prog_guide/traffic_metering_and_policing.rst b/doc/guides/prog_guide/traffic_metering_and_policing.rst\nindex ceb5a96488..75deabbaf1 100644\n--- a/doc/guides/prog_guide/traffic_metering_and_policing.rst\n+++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst\n@@ -21,6 +21,7 @@ The main features are:\n * Policer actions (per meter output color): recolor, drop\n * Statistics (per policer output color)\n * Chaining multiple meter objects\n+* Protocol based input color selection\n \n Configuration steps\n -------------------\n@@ -105,3 +106,35 @@ traffic meter and policing library.\n    * Adding one (or multiple) actions of the type ``RTE_FLOW_ACTION_TYPE_METER``\n      to the list of meter actions (``struct rte_mtr_meter_policy_params::actions``)\n      specified per color as show in :numref:`figure_rte_mtr_chaining`.\n+\n+Protocol based input color selection\n+------------------------------------\n+\n+The API supports selecting the input color based on the packet content.\n+Following is the API usage model for the same.\n+\n+#. Probe the protocol based input color selection device capabilities using\n+   following parameter using ``rte_mtr_capabilities_get()`` API.\n+\n+   * ``struct rte_mtr_capabilities::input_color_proto_mask;``\n+   * ``struct rte_mtr_capabilities::separate_input_color_table_per_port``\n+\n+#. When creating the meter object using ``rte_mtr_create()``, configure\n+   relevant input color selection parameters such as\n+\n+   * Input color protocols with ``struct rte_mtr_params::input_color_proto_mask``\n+\n+   * If ``struct rte_mtr_params::input_color_proto_mask`` has multiple bits set then\n+     ``rte_mtr_color_in_protocol_priority_set()`` shall be used to set the priority,\n+     in the order, in which protocol to be used to find the input color.\n+\n+   * Fill the tables ``struct rte_mtr_params::dscp_table``,\n+     ``struct rte_mtr_params::vlan_table`` based on input color selected.\n+\n+   * Update the ``struct rte_mtr_params::default_input_color`` to determine\n+     the default input color in case the input packet does not match\n+     the input color method.\n+\n+   * If needed, update the input color table at runtime using\n+     ``rte_mtr_meter_vlan_table_update()`` and ``rte_mtr_meter_dscp_table_update()``\n+     APIs.\ndiff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst\nindex 42a5f2d990..746622f9b3 100644\n--- a/doc/guides/rel_notes/release_22_07.rst\n+++ b/doc/guides/rel_notes/release_22_07.rst\n@@ -55,6 +55,13 @@ New Features\n      Also, make sure to start the actual text at the margin.\n      =======================================================\n \n+* **Added protocol based input color for meter.**\n+\n+  Added new APIs ``rte_mtr_color_in_protocol_priority_set()``,\n+  ``rte_mtr_meter_vlan_table_update()`` and updated ``struct rte_mtr_params``\n+  and ``struct rte_mtr_capabilities`` to support protocol based\n+  input color for meter.\n+\n \n Removed Items\n -------------\n@@ -102,6 +109,9 @@ ABI Changes\n \n * No ABI change that would break compatibility with 21.11.\n \n+* Experimental structures ``struct rte_mtr_params``\n+  and ``struct rte_mtr_capabilities`` updated to support\n+  protocol based input color for meter.\n \n Known Issues\n ------------\ndiff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c\nindex e49fcf271c..a112fe65f5 100644\n--- a/lib/ethdev/rte_mtr.c\n+++ b/lib/ethdev/rte_mtr.c\n@@ -207,6 +207,29 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,\n \t\tmtr_id, dscp_table, error);\n }\n \n+/** MTR object meter VLAN table update */\n+int\n+rte_mtr_meter_vlan_table_update(uint16_t port_id, uint32_t mtr_id,\n+\t\t\t\tenum rte_color *vlan_table,\n+\t\t\t\tstruct rte_mtr_error *error)\n+{\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n+\treturn RTE_MTR_FUNC(port_id, meter_vlan_table_update)(dev,\n+\t\tmtr_id, vlan_table, error);\n+}\n+\n+/** Set the priority for input color protocol on MTR object */\n+int\n+rte_mtr_color_in_protocol_priority_set(uint16_t port_id, uint32_t mtr_id,\n+\t\t\t\t       enum rte_mtr_color_in_protocol proto,\n+\t\t\t\t       uint32_t priority,\n+\t\t\t\t       struct rte_mtr_error *error)\n+{\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n+\treturn RTE_MTR_FUNC(port_id, in_proto_prio_set)(dev,\n+\t\tmtr_id, proto, priority, error);\n+}\n+\n /** MTR object enabled stats update */\n int\n rte_mtr_stats_update(uint16_t port_id,\ndiff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h\nindex 40df0888c8..76ffbcf724 100644\n--- a/lib/ethdev/rte_mtr.h\n+++ b/lib/ethdev/rte_mtr.h\n@@ -213,6 +213,52 @@ struct rte_mtr_meter_policy_params {\n \tconst struct rte_flow_action *actions[RTE_COLORS];\n };\n \n+/**\n+ * Input color protocol method\n+ */\n+enum rte_mtr_color_in_protocol {\n+\t/**\n+\t * If the input packet has at least one VLAN label, its input color is\n+\t * detected by the outermost VLAN DEI(1bit), PCP(3 bits)\n+\t * indexing into the struct rte_mtr_params::vlan_table.\n+\t * Otherwise, the *default_input_color* is applied.\n+\t *\n+\t * @see struct rte_mtr_params::default_input_color\n+\t * @see struct rte_mtr_params::vlan_table\n+\t */\n+\tRTE_MTR_COLOR_IN_PROTO_OUTER_VLAN = RTE_BIT64(0),\n+\t/**\n+\t * If the input packet has at least one VLAN label, its input color is\n+\t * detected by the innermost VLAN DEI(1bit), PCP(3 bits)\n+\t * indexing into the struct rte_mtr_params::vlan_table.\n+\t * Otherwise, the *default_input_color* is applied.\n+\t *\n+\t * @see struct rte_mtr_params::default_input_color\n+\t * @see struct rte_mtr_params::vlan_table\n+\t */\n+\tRTE_MTR_COLOR_IN_PROTO_INNER_VLAN = RTE_BIT64(1),\n+\t/**\n+\t * If the input packet is IPv4 or IPv6, its input color is detected by\n+\t * the outermost DSCP field indexing into the\n+\t * struct rte_mtr_params::dscp_table.\n+\t * Otherwise, the *default_input_color* is applied.\n+\t *\n+\t * @see struct rte_mtr_params::default_input_color\n+\t * @see struct rte_mtr_params::dscp_table\n+\t */\n+\tRTE_MTR_COLOR_IN_PROTO_OUTER_DSCP = RTE_BIT64(2),\n+\t/**\n+\t * If the input packet is IPv4 or IPv6, its input color is detected by\n+\t * the innermost DSCP field indexing into the\n+\t * struct rte_mtr_params::dscp_table.\n+\t * Otherwise, the *default_input_color* is applied.\n+\t *\n+\t * @see struct rte_mtr_params::default_input_color\n+\t * @see struct rte_mtr_params::dscp_table\n+\t */\n+\tRTE_MTR_COLOR_IN_PROTO_INNER_DSCP = RTE_BIT64(3),\n+};\n+\n /**\n  * Parameters for each traffic metering & policing object\n  *\n@@ -233,20 +279,58 @@ struct rte_mtr_params {\n \t */\n \tint use_prev_mtr_color;\n \n-\t/** Meter input color. When non-NULL: it points to a pre-allocated and\n+\t/** Meter input color based on IP DSCP protocol field.\n+\t *\n+\t * Valid when *input_color_proto_mask* set to any of the following\n+\t * RTE_MTR_COLOR_IN_PROTO_OUTER_DSCP,\n+\t * RTE_MTR_COLOR_IN_PROTO_INNER_DSCP\n+\t *\n+\t * When non-NULL: it points to a pre-allocated and\n \t * pre-populated table with exactly 64 elements providing the input\n \t * color for each value of the IPv4/IPv6 Differentiated Services Code\n-\t * Point (DSCP) input packet field. When NULL: it is equivalent to\n-\t * setting this parameter to an all-green populated table (i.e. table\n-\t * with all the 64 elements set to green color). The color blind mode\n-\t * is configured by setting *use_prev_mtr_color* to 0 and *dscp_table*\n-\t * to either NULL or to an all-green populated table. When\n-\t * *use_prev_mtr_color* is non-zero value or when *dscp_table* contains\n-\t * at least one yellow or red color element, then the color aware mode\n-\t * is configured.\n+\t * Point (DSCP) input packet field.\n+\t *\n+\t * When NULL: it is equivalent to setting this parameter to an all-green\n+\t * populated table (i.e. table with all the 64 elements set to green\n+\t * color). The color blind mode is configured by setting\n+\t * *use_prev_mtr_color* to 0 and *dscp_table* to either NULL or to an\n+\t * all-green populated table.\n+\t *\n+\t * When *use_prev_mtr_color* is non-zero value or when *dscp_table*\n+\t * contains at least one yellow or red color element, then the color\n+\t * aware mode is configured.\n+\t *\n+\t * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_OUTER_DSCP\n+\t * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_INNER_DSCP\n+\t * @see struct rte_mtr_params::input_color_proto_mask\n \t */\n \tenum rte_color *dscp_table;\n-\n+\t/** Meter input color based on VLAN DEI(1bit), PCP(3 bits) protocol\n+\t * fields.\n+\t *\n+\t * Valid when *input_color_proto_mask* set to any of the following\n+\t * RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN,\n+\t * RTE_MTR_COLOR_IN_PROTO_INNER_VLAN\n+\t *\n+\t * When non-NULL: it points to a pre-allocated and pre-populated\n+\t * table with exactly 16 elements providing the input color for\n+\t * each value of the DEI(1bit), PCP(3 bits) input packet field.\n+\t *\n+\t * When NULL: it is equivalent to setting this parameter to an\n+\t * all-green populated table (i.e. table with\n+\t * all the 16 elements set to green color). The color blind mode\n+\t * is configured by setting *use_prev_mtr_color* to 0 and\n+\t * *vlan_table* to either NULL or to an all-green populated table.\n+\t *\n+\t * When *use_prev_mtr_color* is non-zero value\n+\t * or when *vlan_table* contains at least one yellow or\n+\t * red color element, then the color aware mode is configured.\n+\t *\n+\t * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN\n+\t * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_INNER_VLAN\n+\t * @see struct rte_mtr_params::input_color_proto_mask\n+\t */\n+\tenum rte_color *vlan_table;\n \t/** Non-zero to enable the meter, zero to disable the meter at the time\n \t * of MTR object creation. Ignored when the meter profile indicated by\n \t * *meter_profile_id* is set to NONE.\n@@ -261,6 +345,25 @@ struct rte_mtr_params {\n \n \t/** Meter policy ID. @see rte_mtr_meter_policy_add() */\n \tuint32_t meter_policy_id;\n+\n+\t/** Set of input color protocols to be enabled.\n+\t *\n+\t * Set value to zero to configure as color blind mode.\n+\t *\n+\t * When multiple bits set then rte_mtr_color_in_protocol_priority_set()\n+\t * shall be used to set the priority, in the order, in which protocol\n+\t * to be used to find the inpput color.\n+\t *\n+\t * @see enum rte_mtr_color_in_protocol\n+\t * @see rte_mtr_color_in_protocol_priority_set()\n+\t */\n+\tuint64_t input_color_proto_mask;\n+\n+\t/** Input color to be set for the input packet when none of the\n+\t * enabled input color methods is applicable to the input packet.\n+\t * Ignored when this when *input_color_proto_mask* set to zero.\n+\t */\n+\tenum rte_color default_input_color;\n };\n \n /**\n@@ -417,6 +520,16 @@ struct rte_mtr_capabilities {\n \t * @see enum rte_mtr_stats_type\n \t */\n \tuint64_t stats_mask;\n+\n+\t/** Set of supported input color protocol.\n+\t * @see enum rte_mtr_color_in_protocol\n+\t */\n+\tuint64_t input_color_proto_mask;\n+\n+\t/** When non-zero, it indicates that driver supports separate\n+\t * input color table for given ethdev port.\n+\t */\n+\tint separate_input_color_table_per_port;\n };\n \n /**\n@@ -832,6 +945,59 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,\n \tenum rte_color *dscp_table,\n \tstruct rte_mtr_error *error);\n \n+/**\n+ * MTR object VLAN table update\n+ *\n+ * @param[in] port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param[in] mtr_id\n+ *   MTR object ID. Needs to be valid.\n+ * @param[in] vlan_table\n+ *   When non-NULL: it points to a pre-allocated and pre-populated table with\n+ *   exactly 16 elements providing the input color for each value of the\n+ *   each value of the DEI(1bit), PCP(3 bits) input packet field.\n+ *   When NULL: it is equivalent to setting this parameter to an \"all-green\"\n+ *   populated table (i.e. table with all the 16 elements set to green color).\n+ * @param[out] error\n+ *   Error details. Filled in only on error, when not NULL.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ */\n+__rte_experimental\n+int\n+rte_mtr_meter_vlan_table_update(uint16_t port_id, uint32_t mtr_id,\n+\t\t\t\tenum rte_color *vlan_table,\n+\t\t\t\tstruct rte_mtr_error *error);\n+/**\n+ * Set the priority for input color protocol\n+ *\n+ * When multiple bits set in struct rte_mtr_params::input_color_proto_mask\n+ * then this API shall be used to set the priority, in the order, in\n+ * which protocol to be used to find the input color.\n+ *\n+ * @param[in] port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param[in] mtr_id\n+ *   MTR object ID. Needs to be valid.\n+ * @param[in] proto\n+ *   Input color protocol to apply priority.\n+ *   MTR object's *input_color_proto_mask* should be configured\n+ *   with proto value.\n+ * @param[in] priority\n+ *   Input color protocol priority. Value zero indicates\n+ *   the highest priority.\n+ * @param[out] error\n+ *   Error details. Filled in only on error, when not NULL.\n+ * @return\n+ *   0 on success, non-zero error code otherwise.\n+ *\n+ * @see rte_mtr_params::input_color_proto_mask\n+ */\n+__rte_experimental\n+int\n+rte_mtr_color_in_protocol_priority_set(uint16_t port_id, uint32_t mtr_id,\n+\tenum rte_mtr_color_in_protocol proto, uint32_t priority,\n+\tstruct rte_mtr_error *error);\n /**\n  * MTR object enabled statistics counters update\n  *\ndiff --git a/lib/ethdev/rte_mtr_driver.h b/lib/ethdev/rte_mtr_driver.h\nindex ee8c6ef7ad..827952adc6 100644\n--- a/lib/ethdev/rte_mtr_driver.h\n+++ b/lib/ethdev/rte_mtr_driver.h\n@@ -97,6 +97,19 @@ typedef int (*rte_mtr_meter_dscp_table_update_t)(struct rte_eth_dev *dev,\n \tenum rte_color *dscp_table,\n \tstruct rte_mtr_error *error);\n \n+/** @internal mtr object meter vlan table update. */\n+typedef int (*rte_mtr_meter_vlan_table_update_t)(struct rte_eth_dev *dev,\n+\tuint32_t mtr_id,\n+\tenum rte_color *vlan_table,\n+\tstruct rte_mtr_error *error);\n+\n+/** @internal Set the priority for input color protocol on MTR object. */\n+typedef int (*rte_mtr_meter_color_in_proto_prio_set_t)(struct rte_eth_dev *dev,\n+\tuint32_t mtr_id,\n+\tenum rte_mtr_color_in_protocol proto,\n+\tuint32_t priority,\n+\tstruct rte_mtr_error *error);\n+\n /** @internal MTR object enabled stats update. */\n typedef int (*rte_mtr_stats_update_t)(struct rte_eth_dev *dev,\n \tuint32_t mtr_id,\n@@ -139,6 +152,12 @@ struct rte_mtr_ops {\n \t/** MTR object meter DSCP table update */\n \trte_mtr_meter_dscp_table_update_t meter_dscp_table_update;\n \n+\t/** MTR object meter VLAN table update */\n+\trte_mtr_meter_vlan_table_update_t meter_vlan_table_update;\n+\n+\t/** Set the priority for input color protocol on MTR object. */\n+\trte_mtr_meter_color_in_proto_prio_set_t in_proto_prio_set;\n+\n \t/** MTR object enabled stats update */\n \trte_mtr_stats_update_t stats_update;\n \ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 20391ab29e..cccbf6dee5 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -279,6 +279,10 @@ EXPERIMENTAL {\n \trte_flow_async_action_handle_create;\n \trte_flow_async_action_handle_destroy;\n \trte_flow_async_action_handle_update;\n+\n+\t# added in 22.07\n+\trte_mtr_meter_vlan_table_update;\n+\trte_mtr_color_in_protocol_priority_set;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "v4"
    ]
}