get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 91800,
    "url": "http://patchwork.dpdk.org/api/patches/91800/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210420000800.1504-2-dharmik.thakkar@arm.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20210420000800.1504-2-dharmik.thakkar@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210420000800.1504-2-dharmik.thakkar@arm.com",
    "date": "2021-04-20T00:07:59",
    "name": "[v3,1/2] lib/mempool: make stats macro generic",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b4e8a2f4b0b7438093fe6aade59805e96dc45ec9",
    "submitter": {
        "id": 1108,
        "url": "http://patchwork.dpdk.org/api/people/1108/?format=api",
        "name": "Dharmik Thakkar",
        "email": "dharmik.thakkar@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210420000800.1504-2-dharmik.thakkar@arm.com/mbox/",
    "series": [
        {
            "id": 16503,
            "url": "http://patchwork.dpdk.org/api/series/16503/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=16503",
            "date": "2021-04-20T00:07:58",
            "name": "lib/mempool: add debug stats",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/16503/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/91800/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/91800/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 5E790A0524;\n\tTue, 20 Apr 2021 02:08:26 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D723B414EE;\n\tTue, 20 Apr 2021 02:08:21 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 6411141448\n for <dev@dpdk.org>; Tue, 20 Apr 2021 02:08:19 +0200 (CEST)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD7531478;\n Mon, 19 Apr 2021 17:08:18 -0700 (PDT)",
            "from 2p2660v4-1.austin.arm.com (2p2660v4-1.austin.arm.com\n [10.118.13.237])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B64203F85F;\n Mon, 19 Apr 2021 17:08:18 -0700 (PDT)"
        ],
        "From": "Dharmik Thakkar <dharmik.thakkar@arm.com>",
        "To": "Olivier Matz <olivier.matz@6wind.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Cc": "dev@dpdk.org, nd@arm.com, joyce.kong@arm.com,\n Dharmik Thakkar <dharmik.thakkar@arm.com>",
        "Date": "Mon, 19 Apr 2021 19:07:59 -0500",
        "Message-Id": "<20210420000800.1504-2-dharmik.thakkar@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210420000800.1504-1-dharmik.thakkar@arm.com>",
        "References": "<20210318112022.10510-1-joyce.kong@arm.com>\n <20210420000800.1504-1-dharmik.thakkar@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v3 1/2] lib/mempool: make stats macro generic",
        "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": "Make __MEMPOOL_STAT_ADD macro more generic and delete\n__MEMPOOL_CONTIG_BLOCKS_STAT_ADD macro\n\nSuggested-by: Olivier Matz <olivier.matz@6wind.com>\nSigned-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nReviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\n---\n lib/librte_mempool/rte_mempool.h | 34 +++++++++++++++-----------------\n 1 file changed, 16 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h\nindex c551cf733acf..848a19226149 100644\n--- a/lib/librte_mempool/rte_mempool.h\n+++ b/lib/librte_mempool/rte_mempool.h\n@@ -273,20 +273,11 @@ struct rte_mempool {\n #define __MEMPOOL_STAT_ADD(mp, name, n) do {                    \\\n \t\tunsigned __lcore_id = rte_lcore_id();           \\\n \t\tif (__lcore_id < RTE_MAX_LCORE) {               \\\n-\t\t\tmp->stats[__lcore_id].name##_objs += n;\t\\\n-\t\t\tmp->stats[__lcore_id].name##_bulk += 1;\t\\\n+\t\t\tmp->stats[__lcore_id].name += n;\t\\\n \t\t}                                               \\\n \t} while(0)\n-#define __MEMPOOL_CONTIG_BLOCKS_STAT_ADD(mp, name, n) do {                    \\\n-\t\tunsigned int __lcore_id = rte_lcore_id();       \\\n-\t\tif (__lcore_id < RTE_MAX_LCORE) {               \\\n-\t\t\tmp->stats[__lcore_id].name##_blks += n;\t\\\n-\t\t\tmp->stats[__lcore_id].name##_bulk += 1;\t\\\n-\t\t}                                               \\\n-\t} while (0)\n #else\n #define __MEMPOOL_STAT_ADD(mp, name, n) do {} while(0)\n-#define __MEMPOOL_CONTIG_BLOCKS_STAT_ADD(mp, name, n) do {} while (0)\n #endif\n \n /**\n@@ -1288,7 +1279,8 @@ __mempool_generic_put(struct rte_mempool *mp, void * const *obj_table,\n \tvoid **cache_objs;\n \n \t/* increment stat now, adding in mempool always success */\n-\t__MEMPOOL_STAT_ADD(mp, put, n);\n+\t__MEMPOOL_STAT_ADD(mp, put_bulk, 1);\n+\t__MEMPOOL_STAT_ADD(mp, put_objs, n);\n \n \t/* No cache provided or if put would overflow mem allocated for cache */\n \tif (unlikely(cache == NULL || n > RTE_MEMPOOL_CACHE_MAX_SIZE))\n@@ -1446,7 +1438,8 @@ __mempool_generic_get(struct rte_mempool *mp, void **obj_table,\n \n \tcache->len -= n;\n \n-\t__MEMPOOL_STAT_ADD(mp, get_success, n);\n+\t__MEMPOOL_STAT_ADD(mp, get_success_bulk, 1);\n+\t__MEMPOOL_STAT_ADD(mp, get_success_objs, n);\n \n \treturn 0;\n \n@@ -1455,10 +1448,13 @@ __mempool_generic_get(struct rte_mempool *mp, void **obj_table,\n \t/* get remaining objects from ring */\n \tret = rte_mempool_ops_dequeue_bulk(mp, obj_table, n);\n \n-\tif (ret < 0)\n-\t\t__MEMPOOL_STAT_ADD(mp, get_fail, n);\n-\telse\n-\t\t__MEMPOOL_STAT_ADD(mp, get_success, n);\n+\tif (ret < 0) {\n+\t\t__MEMPOOL_STAT_ADD(mp, get_fail_bulk, 1);\n+\t\t__MEMPOOL_STAT_ADD(mp, get_fail_objs, n);\n+\t} else {\n+\t\t__MEMPOOL_STAT_ADD(mp, get_success_bulk, 1);\n+\t\t__MEMPOOL_STAT_ADD(mp, get_success_objs, n);\n+\t}\n \n \treturn ret;\n }\n@@ -1581,11 +1577,13 @@ rte_mempool_get_contig_blocks(struct rte_mempool *mp,\n \n \tret = rte_mempool_ops_dequeue_contig_blocks(mp, first_obj_table, n);\n \tif (ret == 0) {\n-\t\t__MEMPOOL_CONTIG_BLOCKS_STAT_ADD(mp, get_success, n);\n+\t\t__MEMPOOL_STAT_ADD(mp, get_success_bulk, 1);\n+\t\t__MEMPOOL_STAT_ADD(mp, get_success_blks, n);\n \t\t__mempool_contig_blocks_check_cookies(mp, first_obj_table, n,\n \t\t\t\t\t\t      1);\n \t} else {\n-\t\t__MEMPOOL_CONTIG_BLOCKS_STAT_ADD(mp, get_fail, n);\n+\t\t__MEMPOOL_STAT_ADD(mp, get_fail_bulk, 1);\n+\t\t__MEMPOOL_STAT_ADD(mp, get_fail_blks, n);\n \t}\n \n \trte_mempool_trace_get_contig_blocks(mp, first_obj_table, n);\n",
    "prefixes": [
        "v3",
        "1/2"
    ]
}