get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97148,
    "url": "https://patches.dpdk.org/api/patches/97148/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210820082401.3778736-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": "<20210820082401.3778736-1-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210820082401.3778736-1-jerinj@marvell.com",
    "date": "2021-08-20T08:24:01",
    "name": "[RFC] ethdev: mtr: enhance input color table features",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "67b90b07f30824940e0ee226d5bacc385ff5eb41",
    "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/20210820082401.3778736-1-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 18370,
            "url": "https://patches.dpdk.org/api/series/18370/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18370",
            "date": "2021-08-20T08:24:01",
            "name": "[RFC] ethdev: mtr: enhance input color table features",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/18370/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/97148/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/97148/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 EFE40A0C4B;\n\tFri, 20 Aug 2021 10:26:00 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 717DD41139;\n\tFri, 20 Aug 2021 10:26:00 +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 90D254013F\n for <dev@dpdk.org>; Fri, 20 Aug 2021 10:25:58 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id\n 17K5jo7w024616;\n Fri, 20 Aug 2021 01:25:56 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 3ahu702vk7-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 20 Aug 2021 01:25:56 -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 Fri, 20 Aug 2021 01:25:54 -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.18 via Frontend\n Transport; Fri, 20 Aug 2021 01:25:54 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id C7DF13F7065;\n Fri, 20 Aug 2021 01:25:50 -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 : mime-version : content-transfer-encoding :\n content-type; s=pfpt0220; bh=fe8mmTE3DvXsVQOBFLBeMmjBkRqchFPZRSNAFNM3KCY=;\n b=Gylqct1m+0vCMMhgZGJSWAsv70B4x5dm4pm4c/cPynh3wMLNcMl9vNRTW09CInq+dG8p\n AszowavTAx4w2JrU0HpcnlPR4SVNdCj6+tOkF2lRkJ4bkBTyBgwxAb6H5hFWII4dMThc\n 2zmuyr0s9wXonPZ04V9mGuwVfroiQCqr5KQCzlrp1EsYlCxkbq49EY8x2MAcVcgsW4Ry\n T0xT+ZQyE/onDobYvz1p0WdUxQmPlCirzLSA5h7TzOtkGJxXSXSTmn9ADakNIJKySzUC\n z/IXoU+Ih32a6dk+adnjdAZvf7kOQ+DTk11rXHnHYe/UToAh58iVZ737UR08nDcFQVq3 rg==",
        "From": "<jerinj@marvell.com>",
        "To": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>, Thomas Monjalon\n <thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@intel.com>, \"Andrew\n Rybchenko\" <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<dev@dpdk.org>, <arybchenko@solarflare.com>, <lizh@nvidia.com>,\n <ajit.khaparde@broadcom.com>, <jasvinder.singh@intel.com>,\n <matan@nvidia.com>, <ndabilpuram@marvell.com>, <skori@marvell.com>,\n <rkudurumalla@marvell.com>, Jerin Jacob <jerinj@marvell.com>",
        "Date": "Fri, 20 Aug 2021 13:54:01 +0530",
        "Message-ID": "<20210820082401.3778736-1-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "vrr1XvEPOjHSi68EcBkJSNHUvK_DqAKu",
        "X-Proofpoint-ORIG-GUID": "vrr1XvEPOjHSi68EcBkJSNHUvK_DqAKu",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-08-20_02,2021-08-20_03,2020-04-07_01",
        "Subject": "[dpdk-dev] [RFC PATCH] ethdev: mtr: enhance input color table\n features",
        "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",
        "Sender": "\"dev\" <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 support\nfor 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\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\n---\n lib/ethdev/rte_mtr.h | 130 ++++++++++++++++++++++++++++++++++++++-----\n 1 file changed, 116 insertions(+), 14 deletions(-)\n\n--\n2.33.0",
    "diff": "diff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h\nindex dc246dd7af..311e8754de 100644\n--- a/lib/ethdev/rte_mtr.h\n+++ b/lib/ethdev/rte_mtr.h\n@@ -213,6 +213,16 @@ struct rte_mtr_meter_policy_params {\n \tconst struct rte_flow_action *actions[RTE_COLORS];\n };\n\n+/**\n+ * Input color table\n+ */\n+enum rte_mtr_input_color_tbl {\n+\t/** DSCP based input color table */\n+\tRTE_MTR_INPUT_COLOR_TBL_DSCP,\n+\t/** VLAN based input color table */\n+\tRTE_MTR_INPUT_COLOR_TBL_VLAN,\n+};\n+\n /**\n  * Parameters for each traffic metering & policing object\n  *\n@@ -233,20 +243,44 @@ 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 * 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 */\n-\tenum rte_color *dscp_table;\n-\n+\tRTE_STD_C11\n+\tunion {\n+\t\t/** Meter input color based on DSCP.\n+\t\t * Valid when rte_mtr_input_color_tbl::tbl_selector is\n+\t\t * set to RTE_MTR_INPUT_COLOR_TBL_DSCP.\n+\t\t * When non-NULL: it points to a pre-allocated and pre-populated\n+\t\t * table with exactly 64 elements providing the input color for\n+\t\t * each value of the IPv4/IPv6 Differentiated Services Code\n+\t\t * Point (DSCP) input packet field. When NULL:\n+\t\t * it is equivalent to setting this parameter to an all-green\n+\t\t * populated table (i.e. table with\n+\t\t * all the 64 elements set to green color). The color blind mode\n+\t\t * is configured by setting *use_prev_mtr_color* to 0 and\n+\t\t * *dscp_table* to either NULL or to an all-green\n+\t\t * populated table. When *use_prev_mtr_color* is non-zero value\n+\t\t * or when *dscp_table* contains at least one yellow or\n+\t\t * red color element, then the color aware mode is configured.\n+\t\t * @see struct rte_mtr_capabilities::input_color_dscp_supported\n+\t\t */\n+\t\tenum rte_color *dscp_table;\n+\t\t/** Meter input color based on VLAN.\n+\t\t * Valid when rte_mtr_input_color_tbl::tbl_selector is\n+\t\t * set to RTE_MTR_INPUT_COLOR_TBL_VLAN.\n+\t\t * When non-NULL: it points to a pre-allocated and pre-populated\n+\t\t * table with exactly 16 elements providing the input color for\n+\t\t * each value of the DEI(1bit), PCP(3 bits) input packet field.\n+\t\t * When NULL: it is equivalent to setting this parameter to an\n+\t\t * all-green populated table (i.e. table with\n+\t\t * all the 16 elements set to green color). The color blind mode\n+\t\t * is configured by setting *use_prev_mtr_color* to 0 and\n+\t\t * *vlan_table* to either NULL or to an all-green\n+\t\t * populated table. When *use_prev_mtr_color* is non-zero value\n+\t\t * or when *vlan_table* contains at least one yellow or\n+\t\t * red color element, then the color aware mode is configured.\n+\t\t * @see struct rte_mtr_capabilities::input_color_vlan_supported\n+\t\t */\n+\t\tenum rte_color *vlan_table;\n+\t};\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 +295,25 @@ struct rte_mtr_params {\n\n \t/** Meter policy ID. */\n \tuint32_t meter_policy_id;\n+\n+\t/** Select the input color table\n+\t * @see struct rte_mtr_params::dscp_table\n+\t * @see struct rte_mtr_capabilities::input_color_dscp_supported\n+\t * @see struct rte_mtr_params::vlan_table\n+\t * @see struct rte_mtr_capabilities::input_color_vlan_supported\n+\t */\n+\tenum rte_mtr_input_color_tbl tbl_selector;\n+\t/** Fallback input color for the meter,\n+\t *  when *use_prev_mtr_color* set to zero value and\n+\t *  when packet is not based on selected *tbl_selector*.\n+\t *  @see struct rte_mtr_capabilities::input_color_fallback_supported\n+\t */\n+\tenum rte_color fallback_input_color;\n+\t/** Input color table based on inner field of selected\n+\t *  of *tbl_selector*.\n+\t *  @see struct rte_mtr_capabilities::input_color_inner_supported\n+\t */\n+\tint input_color_inner_enable;\n };\n\n /**\n@@ -417,6 +470,31 @@ struct rte_mtr_capabilities {\n \t * @see enum rte_mtr_stats_type\n \t */\n \tuint64_t stats_mask;\n+\n+\t/** Input color based on DSCP.\n+\t * When non-zero, it indicates that driver supports input color table\n+\t * based on DSCP.\n+\t */\n+\tint input_color_dscp_supported;\n+\t/** Input color based on VLAN.\n+\t * When non-zero, it indicates that driver supports input color table\n+\t * based on VLAN.\n+\t */\n+\tint input_color_vlan_supported;\n+\t/** Input color fallback support.\n+\t * When non-zero, it indicates that driver supports input color\n+\t * fallback.\n+\t */\n+\tint input_color_fallback_supported;\n+\t/** Input color based on inner packet field.\n+\t * When non-zero, it indicates that driver supports input color\n+\t * based on inner field.\n+\t */\n+\tint input_color_inner_supported;\n+\t /** When non-zero, it indicates that driver supports separate\n+\t  * input color table for given ethdev port.\n+\t  */\n+\tint seperate_input_color_table_per_port;\n };\n\n /**\n@@ -832,6 +910,30 @@ 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,\n+\tuint32_t mtr_id,\n+\tenum rte_color *vlan_table,\n+\tstruct rte_mtr_error *error);\n /**\n  * MTR object enabled statistics counters update\n  *\n",
    "prefixes": [
        "RFC"
    ]
}