get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 115357,
    "url": "https://patches.dpdk.org/api/patches/115357/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220823102255.2905191-1-skori@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": "<20220823102255.2905191-1-skori@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220823102255.2905191-1-skori@marvell.com",
    "date": "2022-08-23T10:22:55",
    "name": "[v2,1/1] ethdev: add protocol param to color table update",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "78812584a283cfdf82e6f72db2803124496ebfb3",
    "submitter": {
        "id": 1318,
        "url": "https://patches.dpdk.org/api/people/1318/?format=api",
        "name": "Sunil Kumar Kori",
        "email": "skori@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/20220823102255.2905191-1-skori@marvell.com/mbox/",
    "series": [
        {
            "id": 24392,
            "url": "https://patches.dpdk.org/api/series/24392/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24392",
            "date": "2022-08-23T10:22:55",
            "name": "[v2,1/1] ethdev: add protocol param to color table update",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/24392/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/115357/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/115357/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 33AA3A0093;\n\tTue, 23 Aug 2022 12:23:07 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2599E40DDA;\n\tTue, 23 Aug 2022 12:23:07 +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 3B8DC400D6\n for <dev@dpdk.org>; Tue, 23 Aug 2022 12:23:05 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 27NAIJYV025034;\n Tue, 23 Aug 2022 03:23:04 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3j4ubj8e9n-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 23 Aug 2022 03:23:04 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Tue, 23 Aug 2022 03:23:02 -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; Tue, 23 Aug 2022 03:23:02 -0700",
            "from localhost.localdomain (unknown [10.28.34.25])\n by maili.marvell.com (Postfix) with ESMTP id 51DC55B6929;\n Tue, 23 Aug 2022 03:22:59 -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=48l1+aAjdzm0rZTIewlEP2TpUt23+cbijco4GexUSc4=;\n b=Nl1L56VzdHXUNWbIus+zovcVmmFsmg71s9MCeezHKjw5+EHbgHebCeFu4q6ouT8Shi9t\n YK7MEqy1/YRM2MxWRAcAJY9XcDYu6B1Wf5J/7Ucf22WayGP9ua/d5WifcGqKz9M7Btl3\n aAaEljyPuDp6KaMaa24WVlE3D38PA714UweCfjMe08d71+d+e/Sm1G19JvPrQwBTvdFz\n HOTr0+YCqlcwO9ANn6Sek0qFYnGPyG9LZf0OiTz490ktLN4NFWroS/U/mDzfxnXLiA44\n gs6phh5HTM34kVG/X+BQ4nTuPLXVMpnNEvaqSGxksEdHwgB8bRIoTZ+c6cBiA8q0zL6J 5A==",
        "From": "<skori@marvell.com>",
        "To": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>, Aman Singh\n <aman.deep.singh@intel.com>, Yuying Zhang <yuying.zhang@intel.com>, \"Nithin\n Dabilpuram\" <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>, Jasvinder Singh <jasvinder.singh@intel.com>,\n \"Thomas Monjalon\" <thomas@monjalon.net>, Ferruh Yigit\n <ferruh.yigit@xilinx.com>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<dev@dpdk.org>",
        "Subject": "[PATCH v2 1/1] ethdev: add protocol param to color table update",
        "Date": "Tue, 23 Aug 2022 15:52:55 +0530",
        "Message-ID": "<20220823102255.2905191-1-skori@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220707065743.76932-1-skori@marvell.com>",
        "References": "<20220707065743.76932-1-skori@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "bbzr8VLT13NRsvQ1vNaXyMUvs4kO-CDA",
        "X-Proofpoint-ORIG-GUID": "bbzr8VLT13NRsvQ1vNaXyMUvs4kO-CDA",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1\n definitions=2022-08-23_04,2022-08-22_02,2022-06-22_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: Sunil Kumar Kori <skori@marvell.com>\n\nUsing rte_mtr_color_in_protocol_set(), user can configure\ncombination of protocol headers, like outer_vlan and outer_ip,\ncan be enabled on given meter object.\n\nBut rte_mtr_meter_vlan_table_update() and\nrte_mtr_meter_dscp_table_update() do not have information that\nwhich table needs to be updated corresponding to protocol header\ni.e. inner or outer.\n\nAdding protocol paramreter will allow user to provide required\nprotocol information so that corresponding inner or outer table\ncan be updated corresponding to protocol header.\n\nIf user wishes to configure both inner and outer table then\nAPI must be called twice with correct protocol information.\n\nSigned-off-by: Sunil Kumar Kori <skori@marvell.com>\n---\nv1..v2:\n - Rebase on ToT of dpdk-next-net-mrvl/for-next-net branch.\n - Remove \"Depends On:\" tag as dependent patch is merged.\n\n app/test-pmd/cmdline_mtr.c                  | 42 ++++++++++++++++-----\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  8 ++--\n drivers/net/cnxk/cnxk_ethdev_mtr.c          | 20 +++++++++-\n drivers/net/softnic/rte_eth_softnic_meter.c |  4 +-\n lib/ethdev/rte_mtr.c                        |  8 ++--\n lib/ethdev/rte_mtr.h                        |  7 +++-\n lib/ethdev/rte_mtr_driver.h                 |  4 +-\n 7 files changed, 70 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c\nindex 833273da0d..f517a328b7 100644\n--- a/app/test-pmd/cmdline_mtr.c\n+++ b/app/test-pmd/cmdline_mtr.c\n@@ -297,8 +297,8 @@ parse_meter_color_str(char *c_str, uint32_t *use_prev_meter_color,\n }\n \n static int\n-parse_multi_token_string(char *t_str, uint16_t *port_id,\n-\tuint32_t *mtr_id, enum rte_color **dscp_table)\n+parse_multi_token_string(char *t_str, uint16_t *port_id, uint32_t *mtr_id,\n+\tenum rte_mtr_color_in_protocol *proto, enum rte_color **dscp_table)\n {\n \tchar *token;\n \tuint64_t val;\n@@ -326,6 +326,16 @@ parse_multi_token_string(char *t_str, uint16_t *port_id,\n \n \t*mtr_id = val;\n \n+\t/* Third token: protocol  */\n+\ttoken = strtok_r(t_str, PARSE_DELIMITER, &t_str);\n+\tif (token == NULL)\n+\t\treturn 0;\n+\n+\tif (strcmp(token, \"outer_ip\") == 0)\n+\t\t*proto = RTE_MTR_COLOR_IN_PROTO_OUTER_IP;\n+\telse if (strcmp(token, \"inner_ip\") == 0)\n+\t\t*proto = RTE_MTR_COLOR_IN_PROTO_INNER_IP;\n+\n \tret = parse_dscp_table_entries(t_str, dscp_table);\n \tif (ret != 0)\n \t\treturn -1;\n@@ -335,7 +345,7 @@ parse_multi_token_string(char *t_str, uint16_t *port_id,\n \n static int\n parse_multi_token_vlan_str(char *t_str, uint16_t *port_id, uint32_t *mtr_id,\n-\tenum rte_color **vlan_table)\n+\tenum rte_mtr_color_in_protocol *proto, enum rte_color **vlan_table)\n {\n \tuint64_t val;\n \tchar *token;\n@@ -363,6 +373,16 @@ parse_multi_token_vlan_str(char *t_str, uint16_t *port_id, uint32_t *mtr_id,\n \n \t*mtr_id = val;\n \n+\t/* Third token: protocol  */\n+\ttoken = strtok_r(t_str, PARSE_DELIMITER, &t_str);\n+\tif (token == NULL)\n+\t\treturn 0;\n+\n+\tif (strcmp(token, \"outer_vlan\") == 0)\n+\t\t*proto = RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN;\n+\telse if (strcmp(token, \"inner_vlan\") == 0)\n+\t\t*proto = RTE_MTR_COLOR_IN_PROTO_INNER_VLAN;\n+\n \tret = parse_vlan_table_entries(t_str, vlan_table);\n \tif (ret != 0)\n \t\treturn -1;\n@@ -1388,6 +1408,7 @@ static void cmd_set_port_meter_dscp_table_parsed(void *parsed_result,\n \t__rte_unused void *data)\n {\n \tstruct cmd_set_port_meter_dscp_table_result *res = parsed_result;\n+\tenum rte_mtr_color_in_protocol proto = 0;\n \tstruct rte_mtr_error error;\n \tenum rte_color *dscp_table = NULL;\n \tchar *t_str = res->token_string;\n@@ -1396,7 +1417,8 @@ static void cmd_set_port_meter_dscp_table_parsed(void *parsed_result,\n \tint ret;\n \n \t/* Parse string */\n-\tret = parse_multi_token_string(t_str, &port_id, &mtr_id, &dscp_table);\n+\tret = parse_multi_token_string(t_str, &port_id, &mtr_id, &proto,\n+\t\t\t\t       &dscp_table);\n \tif (ret) {\n \t\tfprintf(stderr, \" Multi token string parse error\\n\");\n \t\treturn;\n@@ -1406,7 +1428,7 @@ static void cmd_set_port_meter_dscp_table_parsed(void *parsed_result,\n \t\tgoto free_table;\n \n \t/* Update Meter DSCP Table*/\n-\tret = rte_mtr_meter_dscp_table_update(port_id, mtr_id,\n+\tret = rte_mtr_meter_dscp_table_update(port_id, mtr_id, proto,\n \t\tdscp_table, &error);\n \tif (ret != 0)\n \t\tprint_err_msg(&error);\n@@ -1418,7 +1440,7 @@ static void cmd_set_port_meter_dscp_table_parsed(void *parsed_result,\n cmdline_parse_inst_t cmd_set_port_meter_dscp_table = {\n \t.f = cmd_set_port_meter_dscp_table_parsed,\n \t.data = NULL,\n-\t.help_str = \"set port meter dscp table <port_id> <mtr_id> \"\n+\t.help_str = \"set port meter dscp table <port_id> <mtr_id> <proto> \"\n \t\t\"[<dscp_tbl_entry0> <dscp_tbl_entry1> ... <dscp_tbl_entry63>]\",\n \t.tokens = {\n \t\t(void *)&cmd_set_port_meter_dscp_table_set,\n@@ -1461,6 +1483,7 @@ static void cmd_set_port_meter_vlan_table_parsed(void *parsed_result,\n \t__rte_unused void *data)\n {\n \tstruct cmd_set_port_meter_vlan_table_result *res = parsed_result;\n+\tenum rte_mtr_color_in_protocol proto = 0;\n \tstruct rte_mtr_error error;\n \tenum rte_color *vlan_table = NULL;\n \tchar *t_str = res->token_string;\n@@ -1469,7 +1492,8 @@ static void cmd_set_port_meter_vlan_table_parsed(void *parsed_result,\n \tint ret;\n \n \t/* Parse string */\n-\tret = parse_multi_token_vlan_str(t_str, &port_id, &mtr_id, &vlan_table);\n+\tret = parse_multi_token_vlan_str(t_str, &port_id, &mtr_id, &proto,\n+\t\t\t\t\t &vlan_table);\n \tif (ret) {\n \t\tfprintf(stderr, \" Multi token string parse error\\n\");\n \t\treturn;\n@@ -1479,7 +1503,7 @@ static void cmd_set_port_meter_vlan_table_parsed(void *parsed_result,\n \t\tgoto free_table;\n \n \t/* Update Meter VLAN Table*/\n-\tret = rte_mtr_meter_vlan_table_update(port_id, mtr_id,\n+\tret = rte_mtr_meter_vlan_table_update(port_id, mtr_id, proto,\n \t\tvlan_table, &error);\n \tif (ret != 0)\n \t\tprint_err_msg(&error);\n@@ -1491,7 +1515,7 @@ static void cmd_set_port_meter_vlan_table_parsed(void *parsed_result,\n cmdline_parse_inst_t cmd_set_port_meter_vlan_table = {\n \t.f = cmd_set_port_meter_vlan_table_parsed,\n \t.data = NULL,\n-\t.help_str = \"set port meter vlan table <port_id> <mtr_id> \"\n+\t.help_str = \"set port meter vlan table <port_id> <mtr_id> <proto> \"\n \t\t\"[<vlan_tbl_entry0> <vlan_tbl_entry1> ... <vlan_tbl_entry15>]\",\n \t.tokens = {\n \t\t(void *)&cmd_set_port_meter_vlan_table_set,\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 330e34427d..ce40e3b6f2 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -2597,15 +2597,15 @@ set port meter dscp table\n \n Set meter dscp table for the ethernet device::\n \n-   testpmd> set port meter dscp table (port_id) (mtr_id) [(dscp_tbl_entry0) \\\n-   (dscp_tbl_entry1)...(dscp_tbl_entry63)]\n+   testpmd> set port meter dscp table (port_id) (mtr_id) (proto) \\\n+   [(dscp_tbl_entry0) (dscp_tbl_entry1)...(dscp_tbl_entry63)]\n \n set port meter vlan table\n ~~~~~~~~~~~~~~~~~~~~~~~~~\n Set meter VLAN table for the Ethernet device::\n \n-   testpmd> set port meter vlan table (port_id) (mtr_id) [(vlan_tbl_entry0) \\\n-   (vlan_tbl_entry1)...(vlan_tbl_entry15)]\n+   testpmd> set port meter vlan table (port_id) (mtr_id) (proto) \\\n+   [(vlan_tbl_entry0) (vlan_tbl_entry1)...(vlan_tbl_entry15)]\n \n set port meter protocol\n ~~~~~~~~~~~~~~~~~~~~~~~\ndiff --git a/drivers/net/cnxk/cnxk_ethdev_mtr.c b/drivers/net/cnxk/cnxk_ethdev_mtr.c\nindex be2cb7d628..0fa18f01c7 100644\n--- a/drivers/net/cnxk/cnxk_ethdev_mtr.c\n+++ b/drivers/net/cnxk/cnxk_ethdev_mtr.c\n@@ -720,6 +720,7 @@ cnxk_nix_mtr_disable(struct rte_eth_dev *eth_dev, uint32_t mtr_id,\n \n static int\n cnxk_nix_mtr_dscp_table_update(struct rte_eth_dev *eth_dev, uint32_t mtr_id,\n+\t\t\t       enum rte_mtr_color_in_protocol proto,\n \t\t\t       enum rte_color *dscp_table,\n \t\t\t       struct rte_mtr_error *error)\n {\n@@ -750,7 +751,7 @@ cnxk_nix_mtr_dscp_table_update(struct rte_eth_dev *eth_dev, uint32_t mtr_id,\n \n \ttable.count = ROC_NIX_BPF_PRECOLOR_TBL_SIZE_DSCP;\n \n-\tswitch (dev->proto) {\n+\tswitch (proto) {\n \tcase RTE_MTR_COLOR_IN_PROTO_OUTER_IP:\n \t\ttable.mode = ROC_NIX_BPF_PC_MODE_DSCP_OUTER;\n \t\tbreak;\n@@ -764,6 +765,13 @@ cnxk_nix_mtr_dscp_table_update(struct rte_eth_dev *eth_dev, uint32_t mtr_id,\n \t\tgoto exit;\n \t}\n \n+\tif (dev->proto != proto) {\n+\t\trc = -rte_mtr_error_set(error, EINVAL,\n+\t\t\tRTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,\n+\t\t\t\"input color protocol is not configured\");\n+\t\tgoto exit;\n+\t}\n+\n \tfor (i = 0; i < ROC_NIX_BPF_PRECOLOR_TBL_SIZE_DSCP; i++)\n \t\ttable.color[i] = nix_dscp_tbl[i];\n \n@@ -784,6 +792,7 @@ cnxk_nix_mtr_dscp_table_update(struct rte_eth_dev *eth_dev, uint32_t mtr_id,\n \n static int\n cnxk_nix_mtr_vlan_table_update(struct rte_eth_dev *eth_dev, uint32_t mtr_id,\n+\t\t\t       enum rte_mtr_color_in_protocol proto,\n \t\t\t       enum rte_color *vlan_table,\n \t\t\t       struct rte_mtr_error *error)\n {\n@@ -814,7 +823,7 @@ cnxk_nix_mtr_vlan_table_update(struct rte_eth_dev *eth_dev, uint32_t mtr_id,\n \n \ttable.count = ROC_NIX_BPF_PRECOLOR_TBL_SIZE_VLAN;\n \n-\tswitch (dev->proto) {\n+\tswitch (proto) {\n \tcase RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN:\n \t\ttable.mode = ROC_NIX_BPF_PC_MODE_VLAN_OUTER;\n \t\tbreak;\n@@ -828,6 +837,13 @@ cnxk_nix_mtr_vlan_table_update(struct rte_eth_dev *eth_dev, uint32_t mtr_id,\n \t\tgoto exit;\n \t}\n \n+\tif (dev->proto != proto) {\n+\t\trc = -rte_mtr_error_set(error, EINVAL,\n+\t\t\tRTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,\n+\t\t\t\"input color protocol is not configured\");\n+\t\tgoto exit;\n+\t}\n+\n \tfor (i = 0; i < ROC_NIX_BPF_PRECOLOR_TBL_SIZE_VLAN; i++)\n \t\ttable.color[i] = nix_vlan_tbl[i];\n \ndiff --git a/drivers/net/softnic/rte_eth_softnic_meter.c b/drivers/net/softnic/rte_eth_softnic_meter.c\nindex 6b02f43e31..3e635a3cfe 100644\n--- a/drivers/net/softnic/rte_eth_softnic_meter.c\n+++ b/drivers/net/softnic/rte_eth_softnic_meter.c\n@@ -636,7 +636,7 @@ pmd_mtr_meter_profile_update(struct rte_eth_dev *dev,\n /* MTR object meter DSCP table update */\n static int\n pmd_mtr_meter_dscp_table_update(struct rte_eth_dev *dev,\n-\tuint32_t mtr_id,\n+\tuint32_t mtr_id, enum rte_mtr_color_in_protocol proto,\n \tenum rte_color *dscp_table,\n \tstruct rte_mtr_error *error)\n {\n@@ -648,6 +648,8 @@ pmd_mtr_meter_dscp_table_update(struct rte_eth_dev *dev,\n \tuint32_t table_id, i;\n \tint status;\n \n+\tRTE_SET_USED(proto);\n+\n \t/* MTR object id must be valid */\n \tm = softnic_mtr_find(p, mtr_id);\n \tif (m == NULL)\ndiff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c\nindex c460e4f4e0..e4dff20f76 100644\n--- a/lib/ethdev/rte_mtr.c\n+++ b/lib/ethdev/rte_mtr.c\n@@ -197,25 +197,25 @@ rte_mtr_meter_policy_update(uint16_t port_id,\n /** MTR object meter DSCP table update */\n int\n rte_mtr_meter_dscp_table_update(uint16_t port_id,\n-\tuint32_t mtr_id,\n+\tuint32_t mtr_id, enum rte_mtr_color_in_protocol proto,\n \tenum rte_color *dscp_table,\n \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_dscp_table_update)(dev,\n-\t\tmtr_id, dscp_table, error);\n+\t\tmtr_id, proto, 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,\n-\tuint32_t mtr_id,\n+\tuint32_t mtr_id, enum rte_mtr_color_in_protocol proto,\n \tenum rte_color *vlan_table,\n \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+\t\tmtr_id, proto, vlan_table, error);\n }\n \n /** Set the input color protocol on MTR object */\ndiff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h\nindex 008bc84f0d..5e4f7ba73b 100644\n--- a/lib/ethdev/rte_mtr.h\n+++ b/lib/ethdev/rte_mtr.h\n@@ -913,6 +913,8 @@ rte_mtr_meter_policy_update(uint16_t 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.\n  * @param[in] dscp_table\n  *   When non-NULL: it points to a pre-allocated and pre-populated table with\n  *   exactly 64 elements providing the input color for each value of the\n@@ -927,7 +929,7 @@ rte_mtr_meter_policy_update(uint16_t port_id,\n __rte_experimental\n int\n rte_mtr_meter_dscp_table_update(uint16_t port_id,\n-\tuint32_t mtr_id,\n+\tuint32_t mtr_id, enum rte_mtr_color_in_protocol proto,\n \tenum rte_color *dscp_table,\n \tstruct rte_mtr_error *error);\n \n@@ -938,6 +940,8 @@ rte_mtr_meter_dscp_table_update(uint16_t 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.\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@@ -952,6 +956,7 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,\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_mtr_color_in_protocol proto,\n \t\t\t\tenum rte_color *vlan_table,\n \t\t\t\tstruct rte_mtr_error *error);\n \ndiff --git a/lib/ethdev/rte_mtr_driver.h b/lib/ethdev/rte_mtr_driver.h\nindex f7dca9a54c..a8b652a607 100644\n--- a/lib/ethdev/rte_mtr_driver.h\n+++ b/lib/ethdev/rte_mtr_driver.h\n@@ -93,13 +93,13 @@ typedef int (*rte_mtr_meter_policy_update_t)(struct rte_eth_dev *dev,\n \n /** @internal MTR object meter DSCP table update. */\n typedef int (*rte_mtr_meter_dscp_table_update_t)(struct rte_eth_dev *dev,\n-\tuint32_t mtr_id,\n+\tuint32_t mtr_id, enum rte_mtr_color_in_protocol proto,\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+\tuint32_t mtr_id, enum rte_mtr_color_in_protocol proto,\n \tenum rte_color *vlan_table,\n \tstruct rte_mtr_error *error);\n \n",
    "prefixes": [
        "v2",
        "1/1"
    ]
}