get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 52904,
    "url": "https://patches.dpdk.org/api/patches/52904/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190418085206.86048-1-andrius.sirvys@intel.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": "<20190418085206.86048-1-andrius.sirvys@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190418085206.86048-1-andrius.sirvys@intel.com",
    "date": "2019-04-18T08:52:06",
    "name": "[v2] lib/bitratestats: fix unchecked return value",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "39962378e3b046fce24152516339aad09f93c784",
    "submitter": {
        "id": 1213,
        "url": "https://patches.dpdk.org/api/people/1213/?format=api",
        "name": "Andrius Sirvys",
        "email": "andrius.sirvys@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190418085206.86048-1-andrius.sirvys@intel.com/mbox/",
    "series": [
        {
            "id": 4370,
            "url": "https://patches.dpdk.org/api/series/4370/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4370",
            "date": "2019-04-18T08:52:06",
            "name": "[v2] lib/bitratestats: fix unchecked return value",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/4370/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/52904/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/52904/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BBC2D1B920;\n\tThu, 18 Apr 2019 10:52:36 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 4FB1C1B8FA;\n\tThu, 18 Apr 2019 10:52:33 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Apr 2019 01:52:32 -0700",
            "from silpixa00380299.ir.intel.com (HELO\n\tsilpixa00380299.ger.corp.intel.com) ([10.237.222.253])\n\tby orsmga007.jf.intel.com with ESMTP; 18 Apr 2019 01:52:31 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,365,1549958400\"; d=\"scan'208\";a=\"132378753\"",
        "From": "Andrius Sirvys <andrius.sirvys@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "stable@dpdk.org, Andrius Sirvys <andrius.sirvys@intel.com>,\n\tremy.horton@intel.com",
        "Date": "Thu, 18 Apr 2019 09:52:06 +0100",
        "Message-Id": "<20190418085206.86048-1-andrius.sirvys@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH v2] lib/bitratestats: fix unchecked return value",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Checking the return value of rte_metrics_update_values, if failed\nreturning that value.\nCoverity had picked up that that the return value wasn't being checked.\n\nCoverity issue: 336863\nFixes: 2ad7ba9a6567 (\"bitrate: add bitrate statistics library\")\nCc: remy.horton@intel.com\n\nSigned-off-by: Andrius Sirvys <andrius.sirvys@intel.com>\nAcked-by: Rami Rosen <ramirose@gmail.com>\n---\nv2: Fixed checkpatch warnings and build failures\n---\n lib/librte_bitratestats/rte_bitrate.c | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c\nindex c4b28f624..639e47547 100644\n--- a/lib/librte_bitratestats/rte_bitrate.c\n+++ b/lib/librte_bitratestats/rte_bitrate.c\n@@ -67,6 +67,7 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,\n \tint64_t delta;\n \tconst int64_t alpha_percent = 20;\n \tuint64_t values[6];\n+\tint ret;\n \n \tif (bitrate_data == NULL)\n \t\treturn -EINVAL;\n@@ -124,7 +125,10 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,\n \tvalues[3] = port_data->mean_obits;\n \tvalues[4] = port_data->peak_ibits;\n \tvalues[5] = port_data->peak_obits;\n-\trte_metrics_update_values(port_id, bitrate_data->id_stats_set,\n+\tret = rte_metrics_update_values(port_id, bitrate_data->id_stats_set,\n \t\tvalues, ARRAY_SIZE(values));\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n \treturn 0;\n }\n",
    "prefixes": [
        "v2"
    ]
}