get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 29024,
    "url": "http://patches.dpdk.org/api/patches/29024/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170920141130.19992-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": "<20170920141130.19992-1-dharton@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170920141130.19992-1-dharton@cisco.com",
    "date": "2017-09-20T14:11:30",
    "name": "[dpdk-dev,v6] ethdev: add return code to rte_eth_stats_reset()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ce3ac4c6be353188166b05e98cdfbcc6b54317e6",
    "submitter": {
        "id": 252,
        "url": "http://patches.dpdk.org/api/people/252/?format=api",
        "name": "David Harton",
        "email": "dharton@cisco.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/20170920141130.19992-1-dharton@cisco.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/29024/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/29024/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 BAC9F2935;\n\tWed, 20 Sep 2017 16:12:23 +0200 (CEST)",
            "from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80])\n\tby dpdk.org (Postfix) with ESMTP id 9E8C025B3\n\tfor <dev@dpdk.org>; Wed, 20 Sep 2017 16:12:22 +0200 (CEST)",
            "from alln-core-11.cisco.com ([173.36.13.133])\n\tby rcdn-iport-9.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA;\n\t20 Sep 2017 14:12:21 +0000",
            "from cpp-rtpbld-31.cisco.com (cpp-rtpbld-31.cisco.com\n\t[172.18.5.114])\n\tby alln-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id\n\tv8KECLAL005919; Wed, 20 Sep 2017 14:12:21 GMT",
            "by cpp-rtpbld-31.cisco.com (Postfix, from userid 140087)\n\tid 542C05A9; Wed, 20 Sep 2017 10:12:21 -0400 (EDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=3070; q=dns/txt; s=iport;\n\tt=1505916742; x=1507126342;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=XC9+FT094G1JY/lxOVWC+GXkJ2Ckn/DTJXaQLlmzLEU=;\n\tb=StqwPpeVr4I1KqHbz/QsCFqbRNtLd1wywpDp6oBITk3IWb4d4xbyp8i9\n\tM6AKDxQMQyAtPse5ocwBmVeBL/9HqW567HrqClqkWGJwdHMp6hk4uno8i\n\t1xT1Fe80JBGgd1VhEKIRdZFr2haJxQKWH8E30tdhhPWQw4Lpdln7u3yWC g=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.42,421,1500940800\"; d=\"scan'208\";a=\"295628008\"",
        "From": "David C Harton <dharton@cisco.com>",
        "To": "thomas@monjalon.net, ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, David Harton <dharton@cisco.com>",
        "Date": "Wed, 20 Sep 2017 10:11:30 -0400",
        "Message-Id": "<20170920141130.19992-1-dharton@cisco.com>",
        "X-Mailer": "git-send-email 2.10.3.dirty",
        "In-Reply-To": "<20170901022631.19529-1-dharton@cisco.com>",
        "References": "<20170901022631.19529-1-dharton@cisco.com>",
        "Subject": "[dpdk-dev] [PATCH v6] 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": "From: David Harton <dharton@cisco.com>\n\nSome devices do not support reset of eth stats.  An application may\nneed to know not to clear shadow stats if the device cannot.\n\nrte_eth_stats_reset is updated to provide a return code to share\nwhether the device supports reset or not.\n\nSigned-off-by: David Harton <dharton@cisco.com>\n---\n\nv6:\n* removed duplicated entry on rel_notes\n\nv5:\n* squashed doc patch\n* moved rel_note change from ABI to API section\n\nv4:\n* commented return values\n\nv3:\n* overcame noob errors and figured out patch challenged\n\nv2:\n* fixed soft tab issue inserted while moving changes\n\n doc/guides/rel_notes/release_17_11.rst | 6 ++++++\n lib/librte_ether/rte_ethdev.c          | 8 +++++---\n lib/librte_ether/rte_ethdev.h          | 6 +++++-\n 3 files changed, 16 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst\nindex 22df4fd..9b77c31 100644\n--- a/doc/guides/rel_notes/release_17_11.rst\n+++ b/doc/guides/rel_notes/release_17_11.rst\n@@ -110,6 +110,12 @@ API Changes\n    Also, make sure to start the actual text at the margin.\n    =========================================================\n \n+* **Modified the return type of rte_eth_stats_reset.**\n+\n+  Changed return type of ``rte_eth_stats_reset`` from ``void`` to ``int``\n+  so the caller may know whether a device supports the operation or not\n+  and if the operation was carried out.\n+\n * **Modified the vlan_offload_set_t function prototype in the ethdev library.**\n \n   Changed the function prototype of ``vlan_offload_set_t``.  The return value\ndiff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 05e52b8..f0f1775 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, -ENODEV);\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, -ENOTSUP);\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 7254fd0..9110725 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -2246,8 +2246,12 @@ 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+ *   - (0) if device notified to reset stats.\n+ *   - (-ENOTSUP) if hardware doesn't support.\n+ *   - (-ENODEV) if *port_id* invalid.\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",
        "v6"
    ]
}