get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65499,
    "url": "http://patches.dpdk.org/api/patches/65499/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200203194912.4669-4-honnappa.nagarahalli@arm.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": "<20200203194912.4669-4-honnappa.nagarahalli@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200203194912.4669-4-honnappa.nagarahalli@arm.com",
    "date": "2020-02-03T19:49:10",
    "name": "[v2,3/5] test/hash: add lock free reader writer functional tests",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3d9646f755233a7196dda1ed1862a7fb8b614e60",
    "submitter": {
        "id": 1045,
        "url": "http://patches.dpdk.org/api/people/1045/?format=api",
        "name": "Honnappa Nagarahalli",
        "email": "honnappa.nagarahalli@arm.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200203194912.4669-4-honnappa.nagarahalli@arm.com/mbox/",
    "series": [
        {
            "id": 8401,
            "url": "http://patches.dpdk.org/api/series/8401/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8401",
            "date": "2020-02-03T19:49:07",
            "name": "test/meson: fix hash readwrite timeout failure",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/8401/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65499/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65499/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2372FA04FA;\n\tMon,  3 Feb 2020 20:49:53 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6CC3F1C014;\n\tMon,  3 Feb 2020 20:49:32 +0100 (CET)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by dpdk.org (Postfix) with ESMTP id 028F81BFCA\n for <dev@dpdk.org>; Mon,  3 Feb 2020 20:49:29 +0100 (CET)",
            "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 80B401045;\n Mon,  3 Feb 2020 11:49:28 -0800 (PST)",
            "from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com\n [10.118.14.48])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D5893F52E;\n Mon,  3 Feb 2020 11:49:28 -0800 (PST)"
        ],
        "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "To": "agupta3@marvell.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com,\n honnappa.nagarahalli@arm.com",
        "Cc": "thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, nd@arm.com",
        "Date": "Mon,  3 Feb 2020 13:49:10 -0600",
        "Message-Id": "<20200203194912.4669-4-honnappa.nagarahalli@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200203194912.4669-1-honnappa.nagarahalli@arm.com>",
        "References": "<1567748973-24192-1-git-send-email-agupta3@marvell.com>\n <20200203194912.4669-1-honnappa.nagarahalli@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v2 3/5] test/hash: add lock free reader writer\n\tfunctional tests",
        "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 <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": "Add lock-free reader writer concurrency functional tests.\nThese tests will provide the same coverage that non lock-free\nAPIs have.\n\nSigned-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\n---\n app/test/test_hash_readwrite.c | 58 +++++++++++++++++++++-------------\n 1 file changed, 36 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c\nindex 635ed5a9f..a9429091c 100644\n--- a/app/test/test_hash_readwrite.c\n+++ b/app/test/test_hash_readwrite.c\n@@ -121,7 +121,7 @@ test_hash_readwrite_worker(__attribute__((unused)) void *arg)\n }\n \n static int\n-init_params(int use_ext, int use_htm, int use_jhash)\n+init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)\n {\n \tunsigned int i;\n \n@@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int use_jhash)\n \telse\n \t\thash_params.hash_func = rte_hash_crc;\n \n+\thash_params.extra_flag = RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;\n \tif (use_htm)\n-\t\thash_params.extra_flag =\n-\t\t\tRTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT |\n-\t\t\tRTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |\n-\t\t\tRTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;\n+\t\thash_params.extra_flag |=\n+\t\t\tRTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT;\n+\tif (rw_lf)\n+\t\thash_params.extra_flag |=\n+\t\t\tRTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF;\n \telse\n-\t\thash_params.extra_flag =\n-\t\t\tRTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY |\n-\t\t\tRTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD;\n+\t\thash_params.extra_flag |=\n+\t\t\tRTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY;\n \n \tif (use_ext)\n \t\thash_params.extra_flag |=\n@@ -195,7 +196,7 @@ init_params(int use_ext, int use_htm, int use_jhash)\n }\n \n static int\n-test_hash_readwrite_functional(int use_ext, int use_htm)\n+test_hash_readwrite_functional(int use_htm, int use_rw_lf, int use_ext)\n {\n \tunsigned int i;\n \tconst void *next_key;\n@@ -214,7 +215,7 @@ test_hash_readwrite_functional(int use_ext, int use_htm)\n \trte_atomic64_init(&ginsertions);\n \trte_atomic64_clear(&ginsertions);\n \n-\tif (init_params(use_ext, use_htm, use_jhash) != 0)\n+\tif (init_params(use_ext, use_htm, use_rw_lf, use_jhash) != 0)\n \t\tgoto err;\n \n \tif (use_ext)\n@@ -229,6 +230,8 @@ test_hash_readwrite_functional(int use_ext, int use_htm)\n \t\ttbl_rw_test_param.num_insert\n \t\t* slave_cnt;\n \n+\tprintf(\"\\nHTM = %d, RW-LF = %d, EXT-Table = %d\\n\",\n+\t\tuse_htm, use_rw_lf, use_ext);\n \tprintf(\"++++++++Start function tests:+++++++++\\n\");\n \n \t/* Fire all threads. */\n@@ -379,7 +382,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,\n \trte_atomic64_init(&gwrite_cycles);\n \trte_atomic64_clear(&gwrite_cycles);\n \n-\tif (init_params(0, use_htm, use_jhash) != 0)\n+\tif (init_params(0, use_htm, 0, use_jhash) != 0)\n \t\tgoto err;\n \n \t/*\n@@ -700,7 +703,6 @@ test_hash_rw_func_main(void)\n \t * than writer threads. This is to timing either reader threads or\n \t * writer threads for performance numbers.\n \t */\n-\tint use_htm, use_ext;\n \tunsigned int i = 0, core_id = 0;\n \n \tif (rte_lcore_count() < 3) {\n@@ -721,29 +723,41 @@ test_hash_rw_func_main(void)\n \n \t\tprintf(\"Test read-write with Hardware transactional memory\\n\");\n \n-\t\tuse_htm = 1;\n-\t\tuse_ext = 0;\n+\t\t/* htm = 1, rw_lf = 0, ext = 0 */\n+\t\tif (test_hash_readwrite_functional(1, 0, 0) < 0)\n+\t\t\treturn -1;\n \n-\t\tif (test_hash_readwrite_functional(use_ext, use_htm) < 0)\n+\t\t/* htm = 1, rw_lf = 1, ext = 0 */\n+\t\tif (test_hash_readwrite_functional(1, 1, 0) < 0)\n \t\t\treturn -1;\n \n-\t\tuse_ext = 1;\n-\t\tif (test_hash_readwrite_functional(use_ext, use_htm) < 0)\n+\t\t/* htm = 1, rw_lf = 0, ext = 1 */\n+\t\tif (test_hash_readwrite_functional(1, 0, 1) < 0)\n \t\t\treturn -1;\n \n+\t\t/* htm = 1, rw_lf = 1, ext = 1 */\n+\t\tif (test_hash_readwrite_functional(1, 1, 1) < 0)\n+\t\t\treturn -1;\n \t} else {\n \t\tprintf(\"Hardware transactional memory (lock elision) \"\n \t\t\t\"is NOT supported\\n\");\n \t}\n \n \tprintf(\"Test read-write without Hardware transactional memory\\n\");\n-\tuse_htm = 0;\n-\tuse_ext = 0;\n-\tif (test_hash_readwrite_functional(use_ext, use_htm) < 0)\n+\t/* htm = 0, rw_lf = 0, ext = 0 */\n+\tif (test_hash_readwrite_functional(0, 0, 0) < 0)\n+\t\treturn -1;\n+\n+\t/* htm = 0, rw_lf = 1, ext = 0 */\n+\tif (test_hash_readwrite_functional(0, 1, 0) < 0)\n+\t\treturn -1;\n+\n+\t/* htm = 0, rw_lf = 0, ext = 1 */\n+\tif (test_hash_readwrite_functional(0, 0, 1) < 0)\n \t\treturn -1;\n \n-\tuse_ext = 1;\n-\tif (test_hash_readwrite_functional(use_ext, use_htm) < 0)\n+\t/* htm = 0, rw_lf = 1, ext = 1 */\n+\tif (test_hash_readwrite_functional(0, 1, 1) < 0)\n \t\treturn -1;\n \n \treturn 0;\n",
    "prefixes": [
        "v2",
        "3/5"
    ]
}