get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 88315,
    "url": "https://patches.dpdk.org/api/patches/88315/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210301103532.184983-2-lizh@nvidia.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210301103532.184983-2-lizh@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210301103532.184983-2-lizh@nvidia.com",
    "date": "2021-03-01T10:35:29",
    "name": "[RFC,v4,1/4] ethdev: add meter PPS profile",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2303796c0ca6d0fea9944fdeb6da4aa3ccab85dd",
    "submitter": {
        "id": 1967,
        "url": "https://patches.dpdk.org/api/people/1967/?format=api",
        "name": "Li Zhang",
        "email": "lizh@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210301103532.184983-2-lizh@nvidia.com/mbox/",
    "series": [
        {
            "id": 15418,
            "url": "https://patches.dpdk.org/api/series/15418/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15418",
            "date": "2021-03-01T10:35:28",
            "name": "adds support PPS(packet per second) on meter",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/15418/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/88315/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/88315/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 433E4A054F;\n\tMon,  1 Mar 2021 11:35:46 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AA47D1CC563;\n\tMon,  1 Mar 2021 11:35:45 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id DC1921CC55E\n for <dev@dpdk.org>; Mon,  1 Mar 2021 11:35:43 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n lizh@nvidia.com)\n with SMTP; 1 Mar 2021 12:35:40 +0200",
            "from nvidia.com (c-235-17-1-009.mtl.labs.mlnx [10.235.17.9])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 121AZcTU011605;\n Mon, 1 Mar 2021 12:35:40 +0200"
        ],
        "From": "Li Zhang <lizh@nvidia.com>",
        "To": "dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com,\n matan@nvidia.com",
        "Cc": "dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com,\n mb@smartsharesystems.com, ajit.khaparde@broadcom.com",
        "Date": "Mon,  1 Mar 2021 12:35:29 +0200",
        "Message-Id": "<20210301103532.184983-2-lizh@nvidia.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20210301103532.184983-1-lizh@nvidia.com>",
        "References": "<20210125010235.1768333-1-lizh@nvidia.com>\n <20210301103532.184983-1-lizh@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC v4 1/4] ethdev: add meter PPS profile",
        "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": "Currently meter algorithms only supports rate is bytes per second(BPS).\nAdd this new meter srTCMp algorithm to support rate is packet per second.\nSo that it can meter traffic by packet per second.\nThe below structure will be extended:\nrte_mtr_algorithm\nrte_mtr_meter_profile\nSigned-off-by: Li Zhang <lizh@nvidia.com>\n---\n .../traffic_metering_and_policing.rst         |  3 +-\n doc/guides/rel_notes/release_20_11.rst        |  5 +++\n lib/librte_ethdev/rte_mtr.h                   | 32 +++++++++++++++++++\n 3 files changed, 39 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/doc/guides/prog_guide/traffic_metering_and_policing.rst b/doc/guides/prog_guide/traffic_metering_and_policing.rst\nindex 90c781eb1d..4d2405d44a 100644\n--- a/doc/guides/prog_guide/traffic_metering_and_policing.rst\n+++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst\n@@ -17,7 +17,8 @@ The main features are:\n * Part of DPDK rte_ethdev API\n * Capability query API\n * Metering algorithms: RFC 2697 Single Rate Three Color Marker (srTCM), RFC 2698\n-  and RFC 4115 Two Rate Three Color Marker (trTCM)\n+  and RFC 4115 Two Rate Three Color Marker (trTCM),\n+  Single Rate Three Color Marker, Packet based (srTCMp).\n * Policer actions (per meter output color): recolor, drop\n * Statistics (per policer output color)\n \ndiff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex 7405a9864f..de04886cc9 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -429,6 +429,11 @@ New Features\n   can leverage IOAT DMA channels with vhost asynchronous APIs.\n   See the :doc:`../sample_app_ug/vhost` for more details.\n \n+* **Added support for meter PPS profile.**\n+\n+  Currently meter algorithms only supports bytes per second(BPS).\n+  Add this new meter algorithm to support packet per second (PPS) mode.\n+  So that it can meter traffic by packet per second.\n \n Removed Items\n -------------\ndiff --git a/lib/librte_ethdev/rte_mtr.h b/lib/librte_ethdev/rte_mtr.h\nindex 916a09c5c3..f27a4b5354 100644\n--- a/lib/librte_ethdev/rte_mtr.h\n+++ b/lib/librte_ethdev/rte_mtr.h\n@@ -119,6 +119,11 @@ enum rte_mtr_algorithm {\n \n \t/** Two Rate Three Color Marker (trTCM) - IETF RFC 4115. */\n \tRTE_MTR_TRTCM_RFC4115,\n+\n+\t/** Single Rate Three Color Marker, Packet based (srTCMp).\n+\t * - - similar to IETF RFC 2697 but rate is packet per second.\n+\t */\n+\tRTE_MTR_SRTCMP,\n };\n \n /**\n@@ -171,6 +176,20 @@ struct rte_mtr_meter_profile {\n \t\t\t/** Excess Burst Size (EBS) (bytes). */\n \t\t\tuint64_t ebs;\n \t\t} trtcm_rfc4115;\n+\n+\t\t/** Items only valid when *alg* is set to srTCMp. */\n+\t\tstruct {\n+\t\t\t/** Committed Information Rate (CIR)\n+\t\t\t * (packets/second).\n+\t\t\t */\n+\t\t\tuint64_t cir;\n+\n+\t\t\t/** Committed Burst Size (CBS) (packets). */\n+\t\t\tuint64_t cbs;\n+\n+\t\t\t/** Excess Burst Size (EBS) (packets). */\n+\t\t\tuint64_t ebs;\n+\t\t} srtcmp;\n \t};\n };\n \n@@ -317,6 +336,13 @@ struct rte_mtr_capabilities {\n \t */\n \tuint32_t meter_trtcm_rfc4115_n_max;\n \n+\t/** Maximum number of MTR objects that can have their meter configured\n+\t * to run the srTCMp algorithm. The value of 0\n+\t * indicates this metering algorithm is not supported.\n+\t * The maximum value is *n_max*.\n+\t */\n+\tuint32_t meter_srtcmp_n_max;\n+\n \t/** Maximum traffic rate that can be metered by a single MTR object. For\n \t * srTCM RFC 2697, this is the maximum CIR rate. For trTCM RFC 2698,\n \t * this is the maximum PIR rate. For trTCM RFC 4115, this is the maximum\n@@ -342,6 +368,12 @@ struct rte_mtr_capabilities {\n \t */\n \tint color_aware_trtcm_rfc4115_supported;\n \n+\t/**\n+\t * When non-zero, it indicates that color aware mode is supported for\n+\t * the srTCMp metering algorithm.\n+\t */\n+\tint color_aware_srtcmp_supported;\n+\n \t/** When non-zero, it indicates that the policer packet recolor actions\n \t * are supported.\n \t * @see enum rte_mtr_policer_action\n",
    "prefixes": [
        "RFC",
        "v4",
        "1/4"
    ]
}