get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 49841,
    "url": "https://patches.dpdk.org/api/patches/49841/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1547557979-153169-4-git-send-email-joyce.kong@arm.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": "<1547557979-153169-4-git-send-email-joyce.kong@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1547557979-153169-4-git-send-email-joyce.kong@arm.com",
    "date": "2019-01-15T13:12:59",
    "name": "[v2,3/3] test/rwlock: amortize the cost of getting time",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "03fe010a801b85007b852c6cafdce608bb81a586",
    "submitter": {
        "id": 970,
        "url": "https://patches.dpdk.org/api/people/970/?format=api",
        "name": "Joyce Kong",
        "email": "joyce.kong@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1547557979-153169-4-git-send-email-joyce.kong@arm.com/mbox/",
    "series": [
        {
            "id": 3190,
            "url": "https://patches.dpdk.org/api/series/3190/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3190",
            "date": "2019-01-15T13:12:56",
            "name": "reimplement rwlock and add relevant perf test case",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/3190/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/49841/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/49841/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 2279F6CC1;\n\tTue, 15 Jan 2019 14:13:17 +0100 (CET)",
            "from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id 7E5C05F25;\n\tTue, 15 Jan 2019 14:13:14 +0100 (CET)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EB285EBD;\n\tTue, 15 Jan 2019 05:13:13 -0800 (PST)",
            "from net-arm-thunderx2.shanghai.arm.com\n\t(net-arm-thunderx2.shanghai.arm.com [10.169.40.106])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t75A6E3F70D; Tue, 15 Jan 2019 05:13:12 -0800 (PST)"
        ],
        "From": "Joyce Kong <joyce.kong@arm.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, jerinj@marvell.com, hemant.agrawal@nxp.com,\n\tbruce.richardson@intel.com, chaozhu@linux.vnet.ibm.com,\n\thonnappa.nagarahalli@arm.com, nd@arm.com, stable@dpdk.org",
        "Date": "Tue, 15 Jan 2019 21:12:59 +0800",
        "Message-Id": "<1547557979-153169-4-git-send-email-joyce.kong@arm.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1547557979-153169-1-git-send-email-joyce.kong@arm.com>",
        "References": "<1547557979-153169-1-git-send-email-joyce.kong@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v2 3/3] test/rwlock: amortize the cost of getting\n\ttime",
        "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": "Fixes: af75078fece3 (\"first public release\")\nCc: stable@dpdk.org\n\nSigned-off-by: Joyce Kong <joyce.kong@arm.com>\n---\n test/test/test_rwlock.c | 18 ++++++++++--------\n 1 file changed, 10 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/test/test/test_rwlock.c b/test/test/test_rwlock.c\nindex 250ea5a..d42ac35 100644\n--- a/test/test/test_rwlock.c\n+++ b/test/test/test_rwlock.c\n@@ -86,9 +86,9 @@ test_rwlock_per_core(__attribute__((unused)) void *arg)\n \n static rte_rwlock_t lk = RTE_RWLOCK_INITIALIZER;\n static volatile uint64_t rwlock_data;\n-static uint64_t lock_count[RTE_MAX_LCORE] = {0};\n+static uint64_t time_count[RTE_MAX_LCORE] = {0};\n \n-#define TIME_MS 100\n+#define MAX_LOOP 10000\n \n static int\n load_loop_fn(__attribute__((unused)) void *arg)\n@@ -104,7 +104,7 @@ load_loop_fn(__attribute__((unused)) void *arg)\n \t\t\t;\n \n \tbegin = rte_rdtsc_precise();\n-\twhile (time_diff < hz * TIME_MS / 1000) {\n+\twhile (lcount < MAX_LOOP) {\n \t\trte_rwlock_write_lock(&lk);\n \t\t++rwlock_data;\n \t\trte_rwlock_write_unlock(&lk);\n@@ -117,10 +117,10 @@ load_loop_fn(__attribute__((unused)) void *arg)\n \t\tlcount++;\n \t\t/* delay to make lock duty cycle slightly realistic */\n \t\trte_pause();\n-\t\ttime_diff = rte_rdtsc_precise() - begin;\n \t}\n \n-\tlock_count[lcore] = lcount;\n+\ttime_diff = rte_rdtsc_precise() - begin;\n+\ttime_count[lcore] = time_diff * 1000000 / hz;\n \treturn 0;\n }\n \n@@ -144,11 +144,13 @@ test_rwlock_perf(void)\n \trte_eal_mp_wait_lcore();\n \n \tRTE_LCORE_FOREACH(i) {\n-\t\tprintf(\"Core [%u] count = %\"PRIu64\"\\n\", i, lock_count[i]);\n-\t\ttotal += lock_count[i];\n+\t\tprintf(\"Core [%u] cost time = %\"PRIu64\" us\\n\",\n+\t\t\t\ti, time_count[i]);\n+\t\ttotal += time_count[i];\n \t}\n \n-\tprintf(\"Total count = %\"PRIu64\"\\n\", total);\n+\tprintf(\"Total cost time = %\"PRIu64\" us\\n\", total);\n+\tmemset(time_count, 0, sizeof(time_count));\n \n \treturn 0;\n }\n",
    "prefixes": [
        "v2",
        "3/3"
    ]
}