get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 103000,
    "url": "http://patches.dpdk.org/api/patches/103000/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1635280335-164030-5-git-send-email-vladimir.medvedkin@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": "<1635280335-164030-5-git-send-email-vladimir.medvedkin@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1635280335-164030-5-git-send-email-vladimir.medvedkin@intel.com",
    "date": "2021-10-26T20:32:15",
    "name": "[v6,4/4] test/thash: add performance tests for the Toeplitz hash",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e6b4851abd43776c916144df02b657c22d49300c",
    "submitter": {
        "id": 1216,
        "url": "http://patches.dpdk.org/api/people/1216/?format=api",
        "name": "Vladimir Medvedkin",
        "email": "vladimir.medvedkin@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1635280335-164030-5-git-send-email-vladimir.medvedkin@intel.com/mbox/",
    "series": [
        {
            "id": 20026,
            "url": "http://patches.dpdk.org/api/series/20026/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20026",
            "date": "2021-10-26T20:32:11",
            "name": "optimized Toeplitz hash implementation",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/20026/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/103000/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/103000/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 9A11CA0547;\n\tTue, 26 Oct 2021 22:32:59 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 62F8F41122;\n\tTue, 26 Oct 2021 22:32:48 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 6A001410D5\n for <dev@dpdk.org>; Tue, 26 Oct 2021 22:32:43 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Oct 2021 13:32:26 -0700",
            "from silpixa00400072.ir.intel.com ([10.237.222.213])\n by orsmga003.jf.intel.com with ESMTP; 26 Oct 2021 13:32:25 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10149\"; a=\"229866117\"",
            "E=Sophos;i=\"5.87,184,1631602800\"; d=\"scan'208\";a=\"229866117\"",
            "E=Sophos;i=\"5.87,184,1631602800\"; d=\"scan'208\";a=\"447258945\""
        ],
        "X-ExtLoop1": "1",
        "From": "Vladimir Medvedkin <vladimir.medvedkin@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "yipeng1.wang@intel.com, sameh.gobriel@intel.com,\n bruce.richardson@intel.com, konstantin.ananyev@intel.com,\n stephen@networkplumber.org, thomas@monjalon.net",
        "Date": "Tue, 26 Oct 2021 21:32:15 +0100",
        "Message-Id": "<1635280335-164030-5-git-send-email-vladimir.medvedkin@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": [
            "<1635280335-164030-1-git-send-email-vladimir.medvedkin@intel.com>",
            "<1630944239-363648-1-git-send-email-vladimir.medvedkin@intel.com>"
        ],
        "References": [
            "<1635280335-164030-1-git-send-email-vladimir.medvedkin@intel.com>",
            "<1630944239-363648-1-git-send-email-vladimir.medvedkin@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v6 4/4] test/thash: add performance tests for the\n Toeplitz hash",
        "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": "This patch adds performance tests for the following Toeplitz hash\nfunction implementations:\n  Scalar:\n    - rte_softrss()\n    - rte_softrss_be()\n  Vector using gfni:\n    - rte_thash_gfni()\n    - rte_thash_gfni_bulk()\n\nSigned-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>\n---\n app/test/meson.build       |   2 +\n app/test/test_thash_perf.c | 119 +++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 121 insertions(+)\n create mode 100644 app/test/test_thash_perf.c",
    "diff": "diff --git a/app/test/meson.build b/app/test/meson.build\nindex 20f36a1..913e8f6 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -144,6 +144,7 @@ test_sources = files(\n         'test_table_tables.c',\n         'test_tailq.c',\n         'test_thash.c',\n+        'test_thash_perf.c',\n         'test_timer.c',\n         'test_timer_perf.c',\n         'test_timer_racecond.c',\n@@ -322,6 +323,7 @@ perf_test_names = [\n         'hash_readwrite_lf_perf_autotest',\n         'trace_perf_autotest',\n         'ipsec_perf_autotest',\n+        'thash_perf_autotest',\n ]\n \n driver_test_names = [\ndiff --git a/app/test/test_thash_perf.c b/app/test/test_thash_perf.c\nnew file mode 100644\nindex 0000000..5454b69\n--- /dev/null\n+++ b/app/test/test_thash_perf.c\n@@ -0,0 +1,119 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2021 Intel Corporation\n+ */\n+\n+#include <stdio.h>\n+#include <stdint.h>\n+#include <stdlib.h>\n+#include <math.h>\n+\n+#include <rte_cycles.h>\n+#include <rte_malloc.h>\n+#include <rte_random.h>\n+#include <rte_thash.h>\n+\n+#include \"test.h\"\n+\n+#define ITERATIONS\t(1 << 15)\n+#define\tBATCH_SZ\t(1 << 10)\n+\n+#define IPV4_2_TUPLE_LEN\t(8)\n+#define IPV4_4_TUPLE_LEN\t(12)\n+#define IPV6_2_TUPLE_LEN\t(32)\n+#define IPV6_4_TUPLE_LEN\t(36)\n+\n+\n+static const uint8_t default_rss_key[] = {\n+\t0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,\n+\t0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0,\n+\t0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4,\n+\t0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,\n+\t0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa,\n+};\n+\n+static void\n+run_thash_test(unsigned int tuple_len)\n+{\n+\tuint32_t *tuples[BATCH_SZ];\n+\tunsigned int i, j;\n+\tuint64_t start_tsc, end_tsc;\n+\tuint32_t len = RTE_ALIGN_CEIL(tuple_len, sizeof(uint32_t));\n+\tvolatile uint32_t hash = 0;\n+\tuint32_t bulk_hash[BATCH_SZ] = { 0 };\n+\n+\tfor (i = 0; i < BATCH_SZ; i++) {\n+\t\ttuples[i] = rte_zmalloc(NULL, len, 0);\n+\t\tfor (j = 0; j < len / sizeof(uint32_t); j++)\n+\t\t\ttuples[i][j] = rte_rand();\n+\t}\n+\n+\tstart_tsc = rte_rdtsc_precise();\n+\tfor (i = 0; i < ITERATIONS; i++) {\n+\t\tfor (j = 0; j < BATCH_SZ; j++) {\n+\t\t\thash ^= rte_softrss(tuples[j], len / sizeof(uint32_t),\n+\t\t\t\tdefault_rss_key);\n+\t\t}\n+\t}\n+\tend_tsc = rte_rdtsc_precise();\n+\n+\tprintf(\"Average rte_softrss() takes \\t\\t%.1f cycles for key len %d\\n\",\n+\t\t(double)(end_tsc - start_tsc) / (double)(ITERATIONS *\n+\t\tBATCH_SZ), len);\n+\n+\tstart_tsc = rte_rdtsc_precise();\n+\tfor (i = 0; i < ITERATIONS; i++) {\n+\t\tfor (j = 0; j < BATCH_SZ; j++) {\n+\t\t\thash ^= rte_softrss_be(tuples[j], len /\n+\t\t\t\tsizeof(uint32_t), default_rss_key);\n+\t\t}\n+\t}\n+\tend_tsc = rte_rdtsc_precise();\n+\n+\tprintf(\"Average rte_softrss_be() takes \\t\\t%.1f cycles for key len %d\\n\",\n+\t\t(double)(end_tsc - start_tsc) / (double)(ITERATIONS *\n+\t\tBATCH_SZ), len);\n+\n+\tif (!rte_thash_gfni_supported())\n+\t\treturn;\n+\n+\tuint64_t rss_key_matrixes[RTE_DIM(default_rss_key)];\n+\n+\trte_thash_complete_matrix(rss_key_matrixes, default_rss_key,\n+\t\tRTE_DIM(default_rss_key));\n+\n+\tstart_tsc = rte_rdtsc_precise();\n+\tfor (i = 0; i < ITERATIONS; i++) {\n+\t\tfor (j = 0; j < BATCH_SZ; j++)\n+\t\t\thash ^= rte_thash_gfni(rss_key_matrixes,\n+\t\t\t\t(uint8_t *)tuples[j], len);\n+\t}\n+\tend_tsc = rte_rdtsc_precise();\n+\n+\tprintf(\"Average rte_thash_gfni takes \\t\\t%.1f cycles for key len %d\\n\",\n+\t\t(double)(end_tsc - start_tsc) / (double)(ITERATIONS *\n+\t\tBATCH_SZ), len);\n+\n+\tstart_tsc = rte_rdtsc_precise();\n+\tfor (i = 0; i < ITERATIONS; i++)\n+\t\trte_thash_gfni_bulk(rss_key_matrixes, len, (uint8_t **)tuples,\n+\t\t\tbulk_hash, BATCH_SZ);\n+\n+\tend_tsc = rte_rdtsc_precise();\n+\n+\tprintf(\"Average rte_thash_gfni_bulk takes \\t%.1f cycles for key len %d\\n\",\n+\t\t(double)(end_tsc - start_tsc) / (double)(ITERATIONS *\n+\t\tBATCH_SZ), len);\n+}\n+\n+static int\n+test_thash_perf(void)\n+{\n+\trun_thash_test(IPV4_2_TUPLE_LEN);\n+\trun_thash_test(IPV4_4_TUPLE_LEN);\n+\trun_thash_test(IPV6_2_TUPLE_LEN);\n+\trun_thash_test(IPV6_4_TUPLE_LEN);\n+\n+\treturn 0;\n+}\n+\n+REGISTER_TEST_COMMAND(thash_perf_autotest, test_thash_perf);\n",
    "prefixes": [
        "v6",
        "4/4"
    ]
}