get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41846,
    "url": "http://patches.dpdk.org/api/patches/41846/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180628141602.91695-1-ferruh.yigit@intel.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": "<20180628141602.91695-1-ferruh.yigit@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180628141602.91695-1-ferruh.yigit@intel.com",
    "date": "2018-06-28T14:16:02",
    "name": "ethdev: document xstats API assumption",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "fbadf64d5ff3bc03eeb61b83b2401c292c096235",
    "submitter": {
        "id": 324,
        "url": "http://patches.dpdk.org/api/people/324/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@intel.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/20180628141602.91695-1-ferruh.yigit@intel.com/mbox/",
    "series": [
        {
            "id": 294,
            "url": "http://patches.dpdk.org/api/series/294/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=294",
            "date": "2018-06-28T14:16:02",
            "name": "ethdev: document xstats API assumption",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/294/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41846/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41846/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 4D9AC1B42A;\n\tThu, 28 Jun 2018 15:16:25 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id DE56F199B9\n\tfor <dev@dpdk.org>; Thu, 28 Jun 2018 15:16:23 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Jun 2018 06:16:22 -0700",
            "from silpixa00399752.ir.intel.com (HELO\n\tsilpixa00399752.ger.corp.intel.com) ([10.237.222.212])\n\tby orsmga002.jf.intel.com with ESMTP; 28 Jun 2018 06:16:21 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,283,1526367600\"; d=\"scan'208\";a=\"70716800\"",
        "From": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>",
        "Cc": "dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,\n\tDavid Marchand <david.marchand@6wind.com>,\n\tOlivier Matz <olivier.matz@6wind.com>,\n\tRemy Horton <remy.horton@intel.com>",
        "Date": "Thu, 28 Jun 2018 15:16:02 +0100",
        "Message-Id": "<20180628141602.91695-1-ferruh.yigit@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<1528359323-22885-1-git-send-email-david.marchand@6wind.com>",
        "References": "<1528359323-22885-1-git-send-email-david.marchand@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH] ethdev: document xstats API assumption",
        "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": "Documents the assumption that 'xstats[i].id == i' and\nkey=xstats_names[i].name, value=xstats[i].value\n\nxstats[i].id is still used for xstats _by_id() APIs.\n\nThis patch reverts some part of the commit 6d52d1d4afb4 (\"ethdev:\nclarify extended statistics documentation\")\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\nCc: David Marchand <david.marchand@6wind.com>\nCc: Olivier Matz <olivier.matz@6wind.com>\nCc: Remy Horton <remy.horton@intel.com>\n---\n lib/librte_ethdev/rte_ethdev.h | 22 +++++++++++++++++++---\n 1 file changed, 19 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 5760f45d3..261dabafb 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -2008,6 +2008,15 @@ int rte_eth_stats_reset(uint16_t port_id);\n /**\n  * Retrieve names of extended statistics of an Ethernet device.\n  *\n+ * There is an assumption that 'xstat_names' and 'xstats' arrays are matched\n+ * by array index:\n+ *  xstats_names[i].name => xstats[i].value\n+ *\n+ * And the array index is same with id field of 'struct rte_eth_xstat':\n+ *  xstats[i].id == i\n+ *\n+ * This assumption makes key-value pair matching less flexible but simpler.\n+ *\n  * @param port_id\n  *   The port identifier of the Ethernet device.\n  * @param xstats_names\n@@ -2032,13 +2041,20 @@ int rte_eth_xstats_get_names(uint16_t port_id,\n /**\n  * Retrieve extended statistics of an Ethernet device.\n  *\n+ * There is an assumption that 'xstat_names' and 'xstats' arrays are matched\n+ * by array index:\n+ *  xstats_names[i].name => xstats[i].value\n+ *\n+ * And the array index is same with id field of 'struct rte_eth_xstat':\n+ *  xstats[i].id == i\n+ *\n+ * This assumption makes key-value pair matching less flexible but simpler.\n+ *\n  * @param port_id\n  *   The port identifier of the Ethernet device.\n  * @param xstats\n  *   A pointer to a table of structure of type *rte_eth_xstat*\n- *   to be filled with device statistics ids and values: id is the\n- *   index of the name string in xstats_names (see rte_eth_xstats_get_names()),\n- *   and value is the statistic counter.\n+ *   to be filled with device statistics ids and values.\n  *   This parameter can be set to NULL if n is 0.\n  * @param n\n  *   The size of the xstats array (number of elements).\n",
    "prefixes": []
}