get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 27477,
    "url": "http://patches.dpdk.org/api/patches/27477/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170807134107.10771-1-dharton@cisco.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": "<20170807134107.10771-1-dharton@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170807134107.10771-1-dharton@cisco.com",
    "date": "2017-08-07T13:41:07",
    "name": "[dpdk-dev,v2] ethdev: add return code to rte_eth_stats_reset()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "04937acc7bdc2a1ecd14a1608dda4947cfdbda1d",
    "submitter": {
        "id": 252,
        "url": "http://patches.dpdk.org/api/people/252/?format=api",
        "name": "David Harton",
        "email": "dharton@cisco.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20170807134107.10771-1-dharton@cisco.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/27477/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/27477/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C09A52BC8;\n\tMon,  7 Aug 2017 15:41:15 +0200 (CEST)",
            "from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78])\n\tby dpdk.org (Postfix) with ESMTP id 9E3472BC8\n\tfor <dev@dpdk.org>; Mon,  7 Aug 2017 15:41:13 +0200 (CEST)",
            "from alln-core-7.cisco.com ([173.36.13.140])\n\tby rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA;\n\t07 Aug 2017 13:41:12 +0000",
            "from cpp-rtpbld-31.cisco.com (cpp-rtpbld-31.cisco.com\n\t[172.18.5.114])\n\tby alln-core-7.cisco.com (8.14.5/8.14.5) with ESMTP id v77DfChF000381;\n\tMon, 7 Aug 2017 13:41:12 GMT",
            "by cpp-rtpbld-31.cisco.com (Postfix, from userid 140087)\n\tid 475DD2C1; Mon,  7 Aug 2017 09:41:12 -0400 (EDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=1824; q=dns/txt; s=iport;\n\tt=1502113273; x=1503322873;\n\th=from:to:cc:subject:date:message-id;\n\tbh=lqxuUTnviMMmrrM2vvgNHuSeIlh+8saCYCym3t+XFnc=;\n\tb=fzaPxPls84kwx+MyiHULBJXtETctDjtSnBZAuESj+GMSljfSIpHHiFYx\n\tXoGPV5WOCUpWDoSFoi9N0XSeTh9DHpuCE1pP02UVFgPNNXhX0qSrpDIHj\n\tPg/UyqdIqlFxKitD66PAxS9crgAtbU9MTPBzk/0LW82JpxgulER1B6ZGI 8=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,338,1498521600\"; d=\"scan'208\";a=\"277754995\"",
        "From": "David Harton <dharton@cisco.com>",
        "To": "thomas@monjalon.net",
        "Cc": "dev@dpdk.org, David Harton <dharton@cisco.com>",
        "Date": "Mon,  7 Aug 2017 09:41:07 -0400",
        "Message-Id": "<20170807134107.10771-1-dharton@cisco.com>",
        "X-Mailer": "git-send-email 2.10.3.dirty",
        "Subject": "[dpdk-dev] [PATCH v2] ethdev: add return code to\n\trte_eth_stats_reset()",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Some devices do not support reset of eth stats.  An application\nmay need to know not to clear shadow stats if the device cannot.\n\nrte_eth_stats_reset is updated to provide a return code to\nshare whether the device supports reset or not.\n\nSigned-off-by: David Harton <dharton@cisco.com>\n---\n\nv2:\n* Fixed soft tab issue inserted while moving changes.\n\n lib/librte_ether/rte_ethdev.c | 8 +++++---\n lib/librte_ether/rte_ethdev.h | 4 +++-\n 2 files changed, 8 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 0597641..3071eea 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -1341,17 +1341,19 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)\n \treturn 0;\n }\n \n-void\n+int\n rte_eth_stats_reset(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id);\n \tdev = &rte_eth_devices[port_id];\n \n-\tRTE_FUNC_PTR_OR_RET(*dev->dev_ops->stats_reset);\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_reset);\n \t(*dev->dev_ops->stats_reset)(dev);\n \tdev->data->rx_mbuf_alloc_failed = 0;\n+\n+\treturn 0;\n }\n \n static int\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 0adf327..d8ccd60 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -2246,8 +2246,10 @@ int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);\n  *\n  * @param port_id\n  *   The port identifier of the Ethernet device.\n+ * @return\n+ *   Zero if successful. Non-zero otherwise.\n  */\n-void rte_eth_stats_reset(uint8_t port_id);\n+int rte_eth_stats_reset(uint8_t port_id);\n \n /**\n  * Retrieve names of extended statistics of an Ethernet device.\n",
    "prefixes": [
        "dpdk-dev",
        "v2"
    ]
}