get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 47392,
    "url": "https://patches.dpdk.org/api/patches/47392/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1540404570-102126-5-git-send-email-yipeng1.wang@intel.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": "<1540404570-102126-5-git-send-email-yipeng1.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1540404570-102126-5-git-send-email-yipeng1.wang@intel.com",
    "date": "2018-10-24T18:09:30",
    "name": "[v2,4/4] test/hash: remove hash scaling unit test",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5a8ada379104ae1f9d45c058487964c8446cb4a7",
    "submitter": {
        "id": 754,
        "url": "https://patches.dpdk.org/api/people/754/?format=api",
        "name": "Wang, Yipeng1",
        "email": "yipeng1.wang@intel.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/1540404570-102126-5-git-send-email-yipeng1.wang@intel.com/mbox/",
    "series": [
        {
            "id": 2078,
            "url": "https://patches.dpdk.org/api/series/2078/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=2078",
            "date": "2018-10-24T18:09:26",
            "name": "hash: improve multiple places",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/2078/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/47392/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/47392/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 7BFE5548B;\n\tThu, 25 Oct 2018 03:14:58 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 28ECF44BE\n\tfor <dev@dpdk.org>; Thu, 25 Oct 2018 03:14:49 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Oct 2018 18:14:46 -0700",
            "from skx-yipeng.jf.intel.com ([10.54.81.175])\n\tby orsmga004.jf.intel.com with ESMTP; 24 Oct 2018 18:14:46 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,422,1534834800\"; d=\"scan'208\";a=\"244139405\"",
        "From": "Yipeng Wang <yipeng1.wang@intel.com>",
        "To": "bruce.richardson@intel.com",
        "Cc": "stephen@networkplumber.org, dev@dpdk.org, yipeng1.wang@intel.com,\n\thonnappa.nagarahalli@arm.com, sameh.gobriel@intel.com",
        "Date": "Wed, 24 Oct 2018 11:09:30 -0700",
        "Message-Id": "<1540404570-102126-5-git-send-email-yipeng1.wang@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1540404570-102126-1-git-send-email-yipeng1.wang@intel.com>",
        "References": "<1540404570-102126-1-git-send-email-yipeng1.wang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/4] test/hash: remove hash scaling unit test",
        "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": "The hash scaling unit test is not really needed\nany more since the multi-writer is supported now\ninside the library and it is tested by multi-writer\nunit test.\n\nSigned-off-by: Yipeng Wang <yipeng1.wang@intel.com>\n---\n test/test/Makefile            |   1 -\n test/test/autotest_data.py    |   6 --\n test/test/meson.build         |   2 -\n test/test/test_hash_scaling.c | 191 ------------------------------------------\n 4 files changed, 200 deletions(-)\n delete mode 100644 test/test/test_hash_scaling.c",
    "diff": "diff --git a/test/test/Makefile b/test/test/Makefile\nindex 41028cc..276e7cd 100644\n--- a/test/test/Makefile\n+++ b/test/test/Makefile\n@@ -112,7 +112,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash.c\n SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_thash.c\n SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c\n SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.c\n-SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_scaling.c\n SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_multiwriter.c\n SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite.c\n SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite_lf.c\ndiff --git a/test/test/autotest_data.py b/test/test/autotest_data.py\nindex f68d9b1..31020f1 100644\n--- a/test/test/autotest_data.py\n+++ b/test/test/autotest_data.py\n@@ -345,12 +345,6 @@\n         \"Report\":  None,\n     },\n     {\n-        \"Name\":    \"Hash scaling autotest\",\n-        \"Command\": \"hash_scaling_autotest\",\n-        \"Func\":    default_autotest,\n-        \"Report\":  None,\n-    },\n-    {\n         \"Name\":    \"Hash multiwriter autotest\",\n         \"Command\": \"hash_multiwriter_autotest\",\n         \"Func\":    default_autotest,\ndiff --git a/test/test/meson.build b/test/test/meson.build\nindex e403bd5..c0b1928 100644\n--- a/test/test/meson.build\n+++ b/test/test/meson.build\n@@ -47,7 +47,6 @@ test_sources = files('commands.c',\n \t'test_hash_readwrite.c',\n \t'test_hash_perf.c',\n \t'test_hash_readwrite_lf.c',\n-\t'test_hash_scaling.c',\n \t'test_interrupts.c',\n \t'test_kni.c',\n \t'test_kvargs.c',\n@@ -168,7 +167,6 @@ test_names = [\n \t'eventdev_sw_autotest',\n \t'func_reentrancy_autotest',\n \t'flow_classify_autotest',\n-\t'hash_scaling_autotest',\n \t'hash_autotest',\n \t'hash_functions_autotest',\n \t'hash_multiwriter_autotest',\ndiff --git a/test/test/test_hash_scaling.c b/test/test/test_hash_scaling.c\ndeleted file mode 100644\nindex 07765a7..0000000\n--- a/test/test/test_hash_scaling.c\n+++ /dev/null\n@@ -1,191 +0,0 @@\n-/* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright(c) 2015 Intel Corporation\n- */\n-\n-#include <stdio.h>\n-\n-#include <rte_cycles.h>\n-#include <rte_hash.h>\n-#include <rte_hash_crc.h>\n-#include <rte_spinlock.h>\n-#include <rte_launch.h>\n-\n-#include \"test.h\"\n-\n-/*\n- * Check condition and return an error if true. Assumes that \"handle\" is the\n- * name of the hash structure pointer to be freed.\n- */\n-#define RETURN_IF_ERROR(cond, str, ...) do {\t\t\t\t\\\n-\tif (cond) {\t\t\t\t\t\t\t\\\n-\t\tprintf(\"ERROR line %d: \" str \"\\n\", __LINE__,\t\t\\\n-\t\t\t\t\t\t\t##__VA_ARGS__);\t\\\n-\t\tif (handle)\t\t\t\t\t\t\\\n-\t\t\trte_hash_free(handle);\t\t\t\t\\\n-\t\treturn -1;\t\t\t\t\t\t\\\n-\t}\t\t\t\t\t\t\t\t\\\n-} while (0)\n-\n-enum locking_mode_t {\n-\tNORMAL_LOCK,\n-\tLOCK_ELISION,\n-\tNULL_LOCK\n-};\n-\n-struct {\n-\tuint32_t num_iterations;\n-\tstruct rte_hash *h;\n-\trte_spinlock_t *lock;\n-\tint locking_mode;\n-} tbl_scaling_test_params;\n-\n-static rte_atomic64_t gcycles;\n-\n-static int test_hash_scaling_worker(__attribute__((unused)) void *arg)\n-{\n-\tuint64_t i, key;\n-\tuint32_t thr_id = rte_sys_gettid();\n-\tuint64_t begin, cycles = 0;\n-\n-\tswitch (tbl_scaling_test_params.locking_mode) {\n-\n-\tcase NORMAL_LOCK:\n-\n-\t\tfor (i = 0; i < tbl_scaling_test_params.num_iterations; i++) {\n-\t\t\t/*\tdifferent threads get different keys because\n-\t\t\t\twe use the thread-id in the key computation\n-\t\t\t */\n-\t\t\tkey = rte_hash_crc(&i, sizeof(i), thr_id);\n-\t\t\tbegin = rte_rdtsc_precise();\n-\t\t\trte_spinlock_lock(tbl_scaling_test_params.lock);\n-\t\t\trte_hash_add_key(tbl_scaling_test_params.h, &key);\n-\t\t\trte_spinlock_unlock(tbl_scaling_test_params.lock);\n-\t\t\tcycles += rte_rdtsc_precise() - begin;\n-\t\t}\n-\t\tbreak;\n-\n-\tcase LOCK_ELISION:\n-\n-\t\tfor (i = 0; i < tbl_scaling_test_params.num_iterations; i++) {\n-\t\t\tkey = rte_hash_crc(&i, sizeof(i), thr_id);\n-\t\t\tbegin = rte_rdtsc_precise();\n-\t\t\trte_spinlock_lock_tm(tbl_scaling_test_params.lock);\n-\t\t\trte_hash_add_key(tbl_scaling_test_params.h, &key);\n-\t\t\trte_spinlock_unlock_tm(tbl_scaling_test_params.lock);\n-\t\t\tcycles += rte_rdtsc_precise() - begin;\n-\t\t}\n-\t\tbreak;\n-\n-\tdefault:\n-\n-\t\tfor (i = 0; i < tbl_scaling_test_params.num_iterations; i++) {\n-\t\t\tkey = rte_hash_crc(&i, sizeof(i), thr_id);\n-\t\t\tbegin = rte_rdtsc_precise();\n-\t\t\trte_hash_add_key(tbl_scaling_test_params.h, &key);\n-\t\t\tcycles += rte_rdtsc_precise() - begin;\n-\t\t}\n-\t}\n-\n-\trte_atomic64_add(&gcycles, cycles);\n-\n-\treturn 0;\n-}\n-\n-/*\n- * Do scalability perf tests.\n- */\n-static int\n-test_hash_scaling(int locking_mode)\n-{\n-\tstatic unsigned calledCount =    1;\n-\tuint32_t num_iterations = 1024*1024;\n-\tuint64_t i, key;\n-\tstruct rte_hash_parameters hash_params = {\n-\t\t.entries = num_iterations*2,\n-\t\t.key_len = sizeof(key),\n-\t\t.hash_func = rte_hash_crc,\n-\t\t.hash_func_init_val = 0,\n-\t\t.socket_id = rte_socket_id(),\n-\t\t.extra_flag = RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT\n-\t};\n-\tstruct rte_hash *handle;\n-\tchar name[RTE_HASH_NAMESIZE];\n-\trte_spinlock_t lock;\n-\n-\trte_spinlock_init(&lock);\n-\n-\tsnprintf(name, 32, \"test%u\", calledCount++);\n-\thash_params.name = name;\n-\n-\thandle = rte_hash_create(&hash_params);\n-\tRETURN_IF_ERROR(handle == NULL, \"hash creation failed\");\n-\n-\ttbl_scaling_test_params.num_iterations =\n-\t\tnum_iterations/rte_lcore_count();\n-\ttbl_scaling_test_params.h = handle;\n-\ttbl_scaling_test_params.lock = &lock;\n-\ttbl_scaling_test_params.locking_mode = locking_mode;\n-\n-\trte_atomic64_init(&gcycles);\n-\trte_atomic64_clear(&gcycles);\n-\n-\t/* fill up to initial size */\n-\tfor (i = 0; i < num_iterations; i++) {\n-\t\tkey = rte_hash_crc(&i, sizeof(i), 0xabcdabcd);\n-\t\trte_hash_add_key(tbl_scaling_test_params.h, &key);\n-\t}\n-\n-\trte_eal_mp_remote_launch(test_hash_scaling_worker, NULL, CALL_MASTER);\n-\trte_eal_mp_wait_lcore();\n-\n-\tunsigned long long int cycles_per_operation =\n-\t\trte_atomic64_read(&gcycles)/\n-\t\t(tbl_scaling_test_params.num_iterations*rte_lcore_count());\n-\tconst char *lock_name;\n-\n-\tswitch (locking_mode) {\n-\tcase NORMAL_LOCK:\n-\t\tlock_name = \"normal spinlock\";\n-\t\tbreak;\n-\tcase LOCK_ELISION:\n-\t\tlock_name = \"lock elision\";\n-\t\tbreak;\n-\tdefault:\n-\t\tlock_name = \"null lock\";\n-\t}\n-\tprintf(\"--------------------------------------------------------\\n\");\n-\tprintf(\"Cores: %d; %s mode ->  cycles per operation: %llu\\n\",\n-\t\trte_lcore_count(), lock_name, cycles_per_operation);\n-\tprintf(\"--------------------------------------------------------\\n\");\n-\t/* CSV output */\n-\tprintf(\">>>%d,%s,%llu\\n\", rte_lcore_count(), lock_name,\n-\t\tcycles_per_operation);\n-\n-\trte_hash_free(handle);\n-\treturn 0;\n-}\n-\n-static int\n-test_hash_scaling_main(void)\n-{\n-\tint r = 0;\n-\n-\tif (rte_lcore_count() == 1)\n-\t\tr = test_hash_scaling(NULL_LOCK);\n-\n-\tif (r == 0)\n-\t\tr = test_hash_scaling(NORMAL_LOCK);\n-\n-\tif (!rte_tm_supported()) {\n-\t\tprintf(\"Hardware transactional memory (lock elision) is NOT supported\\n\");\n-\t\treturn r;\n-\t}\n-\tprintf(\"Hardware transactional memory (lock elision) is supported\\n\");\n-\n-\tif (r == 0)\n-\t\tr = test_hash_scaling(LOCK_ELISION);\n-\n-\treturn r;\n-}\n-\n-REGISTER_TEST_COMMAND(hash_scaling_autotest, test_hash_scaling_main);\n",
    "prefixes": [
        "v2",
        "4/4"
    ]
}