get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 90193,
    "url": "http://patches.dpdk.org/api/patches/90193/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210331085405.1445546-2-lizh@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": "<20210331085405.1445546-2-lizh@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210331085405.1445546-2-lizh@nvidia.com",
    "date": "2021-03-31T08:54:03",
    "name": "[1/2] ethdev: add packet mode in meter profile structure",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "52be6ff4a1055557cc6e513e9388c640882916e6",
    "submitter": {
        "id": 1967,
        "url": "http://patches.dpdk.org/api/people/1967/?format=api",
        "name": "Li Zhang",
        "email": "lizh@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/20210331085405.1445546-2-lizh@nvidia.com/mbox/",
    "series": [
        {
            "id": 16002,
            "url": "http://patches.dpdk.org/api/series/16002/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16002",
            "date": "2021-03-31T08:54:03",
            "name": "Support PPS(packet per second) on meter",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/16002/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/90193/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/90193/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 BDC26A034F;\n\tWed, 31 Mar 2021 10:54:17 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A378D4069E;\n\tWed, 31 Mar 2021 10:54:17 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id CF49840141\n for <dev@dpdk.org>; Wed, 31 Mar 2021 10:54:15 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n lizh@nvidia.com)\n with SMTP; 31 Mar 2021 11:54:13 +0300",
            "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 12V8sDok009021;\n Wed, 31 Mar 2021 11:54:13 +0300"
        ],
        "From": "Li Zhang <lizh@nvidia.com>",
        "To": "dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com,\n matan@nvidia.com, shahafs@nvidia.com, cristian.dumitrescu@intel.com,\n Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Cc": "dev@dpdk.org, rasland@nvidia.com, roniba@nvidia.com",
        "Date": "Wed, 31 Mar 2021 11:54:03 +0300",
        "Message-Id": "<20210331085405.1445546-2-lizh@nvidia.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20210331085405.1445546-1-lizh@nvidia.com>",
        "References": "<20210331085405.1445546-1-lizh@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/2] ethdev: add packet mode in meter profile\n structure",
        "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 packet_mode flag in meter profile parameters data structure.\nSo that it can meter traffic by packet per second.\n\nWhen packet_mode is 0, the profile rates and bucket sizes are\nspecified in bytes per second and bytes\nwhen packet_mode is not 0, the profile rates and bucket sizes are\nspecified in packets and packets per second.\n\nThe below structure will be extended:\nrte_mtr_meter_profile\nrte_mtr_capabilities\n\nSigned-off-by: Li Zhang <lizh@nvidia.com>\n---\n doc/guides/rel_notes/release_21_05.rst |  7 ++\n lib/librte_ethdev/rte_mtr.h            | 89 ++++++++++++++++++++++----\n 2 files changed, 85 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst\nindex 3c76148b11..c9c15794ad 100644\n--- a/doc/guides/rel_notes/release_21_05.rst\n+++ b/doc/guides/rel_notes/release_21_05.rst\n@@ -119,6 +119,13 @@ New Features\n   * Added command to display Rx queue used descriptor count.\n     ``show port (port_id) rxq (queue_id) desc used count``\n \n+* **Added support for meter PPS profile.**\n+\n+  Currently meter algorithms only supports bytes per second(BPS).\n+  Add packet_mode in the meter profile parameters data structures\n+  to support packet per second (PPS) mode.\n+  So that it can meter traffic by packet per second.\n+  Packet_mode must be 0 when it is bytes mode.\n \n Removed Items\n -------------\ndiff --git a/lib/librte_ethdev/rte_mtr.h b/lib/librte_ethdev/rte_mtr.h\nindex e1dc59eb06..52611a90f5 100644\n--- a/lib/librte_ethdev/rte_mtr.h\n+++ b/lib/librte_ethdev/rte_mtr.h\n@@ -133,46 +133,71 @@ struct rte_mtr_meter_profile {\n \tunion {\n \t\t/** Items only valid when *alg* is set to srTCM - RFC 2697. */\n \t\tstruct {\n-\t\t\t/** Committed Information Rate (CIR) (bytes/second). */\n+\t\t\t/**\n+\t\t\t * Committed Information Rate (CIR)\n+\t\t\t * (bytes per second or packets per second).\n+\t\t\t */\n \t\t\tuint64_t cir;\n \n-\t\t\t/** Committed Burst Size (CBS) (bytes). */\n+\t\t\t/** Committed Burst Size (CBS) (bytes or packets). */\n \t\t\tuint64_t cbs;\n \n-\t\t\t/** Excess Burst Size (EBS) (bytes). */\n+\t\t\t/** Excess Burst Size (EBS) (bytes or packets). */\n \t\t\tuint64_t ebs;\n \t\t} srtcm_rfc2697;\n \n \t\t/** Items only valid when *alg* is set to trTCM - RFC 2698. */\n \t\tstruct {\n-\t\t\t/** Committed Information Rate (CIR) (bytes/second). */\n+\t\t\t/**\n+\t\t\t * Committed Information Rate (CIR)\n+\t\t\t * (bytes per second or packets per second).\n+\t\t\t */\n \t\t\tuint64_t cir;\n \n-\t\t\t/** Peak Information Rate (PIR) (bytes/second). */\n+\t\t\t/**\n+\t\t\t * Peak Information Rate (PIR)\n+\t\t\t * (bytes per second or packets per second).\n+\t\t\t */\n \t\t\tuint64_t pir;\n \n-\t\t\t/** Committed Burst Size (CBS) (byes). */\n+\t\t\t/** Committed Burst Size (CBS) (bytes or packets). */\n \t\t\tuint64_t cbs;\n \n-\t\t\t/** Peak Burst Size (PBS) (bytes). */\n+\t\t\t/** Peak Burst Size (PBS) (bytes or packets). */\n \t\t\tuint64_t pbs;\n \t\t} trtcm_rfc2698;\n \n \t\t/** Items only valid when *alg* is set to trTCM - RFC 4115. */\n \t\tstruct {\n-\t\t\t/** Committed Information Rate (CIR) (bytes/second). */\n+\t\t\t/**\n+\t\t\t * Committed Information Rate (CIR)\n+\t\t\t * (bytes per second or packets per second).\n+\t\t\t */\n \t\t\tuint64_t cir;\n \n-\t\t\t/** Excess Information Rate (EIR) (bytes/second). */\n+\t\t\t/**\n+\t\t\t * Excess Information Rate (EIR)\n+\t\t\t * (bytes per second or packets per second).\n+\t\t\t */\n \t\t\tuint64_t eir;\n \n-\t\t\t/** Committed Burst Size (CBS) (byes). */\n+\t\t\t/** Committed Burst Size (CBS) (bytes or packets). */\n \t\t\tuint64_t cbs;\n \n-\t\t\t/** Excess Burst Size (EBS) (bytes). */\n+\t\t\t/** Excess Burst Size (EBS) (bytes or packets). */\n \t\t\tuint64_t ebs;\n \t\t} trtcm_rfc4115;\n \t};\n+\n+\t/**\n+\t * When zero, the byte mode is enabled for the current profile, so the\n+\t * *rate* and *size* fields are specified in bytes per second\n+\t * and bytes, respectively.\n+\t * When non-zero, the packet mode is enabled for the current profile,\n+\t * so the *rate* and *size* fields are specified in packets per second\n+\t * and packets, respectively.\n+\t */\n+\tint packet_mode;\n };\n \n /**\n@@ -333,6 +358,48 @@ struct rte_mtr_capabilities {\n \t */\n \tint color_aware_trtcm_rfc4115_supported;\n \n+\t/**\n+\t * srTCM rfc2697 byte mode supported.\n+\t * When non-zero, it indicates that byte mode is supported for\n+\t * the srTCM RFC 2697 metering algorithm.\n+\t */\n+\tint srtcm_rfc2697_byte_mode_supported;\n+\n+\t/**\n+\t * srTCM rfc2697 packet mode supported.\n+\t * When non-zero, it indicates that packet mode is supported for\n+\t * the srTCM RFC 2697 metering algorithm.\n+\t */\n+\tint srtcm_rfc2697_packet_mode_supported;\n+\n+\t/**\n+\t * trTCM rfc2698 byte mode supported.\n+\t * When non-zero, it indicates that byte mode is supported for\n+\t * the trTCM RFC 2698 metering algorithm.\n+\t */\n+\tint trtcm_rfc2698_byte_mode_supported;\n+\n+\t/**\n+\t * trTCM rfc2698 packet mode supported.\n+\t * When non-zero, it indicates that packet mode is supported for\n+\t * the trTCM RFC 2698 metering algorithm.\n+\t */\n+\tint trtcm_rfc2698_packet_mode_supported;\n+\n+\t/**\n+\t * trTCM rfc4115 byte mode supported.\n+\t * When non-zero, it indicates that byte mode is supported for\n+\t * the trTCM RFC 4115 metering algorithm.\n+\t */\n+\tint trtcm_rfc4115_byte_mode_supported;\n+\n+\t/**\n+\t * trTCM rfc4115 packet mode supported.\n+\t * When non-zero, it indicates that packet mode is supported for\n+\t * the trTCM RFC 4115 metering algorithm.\n+\t */\n+\tint trtcm_rfc4115_packet_mode_supported;\n+\n \t/** Set of supported statistics counter types.\n \t * @see enum rte_mtr_stats_type\n \t */\n",
    "prefixes": [
        "1/2"
    ]
}