get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53395,
    "url": "http://patches.dpdk.org/api/patches/53395/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190514092046.30808-3-mattias.ronnblom@ericsson.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": "<20190514092046.30808-3-mattias.ronnblom@ericsson.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190514092046.30808-3-mattias.ronnblom@ericsson.com",
    "date": "2019-05-14T09:20:42",
    "name": "[2/6] eal: add pseudo-random number generation performance test",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "df1296d4c5e52b9c346064ca0fa10f596491dbfe",
    "submitter": {
        "id": 1077,
        "url": "http://patches.dpdk.org/api/people/1077/?format=api",
        "name": "Mattias Rönnblom",
        "email": "mattias.ronnblom@ericsson.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/20190514092046.30808-3-mattias.ronnblom@ericsson.com/mbox/",
    "series": [
        {
            "id": 4650,
            "url": "http://patches.dpdk.org/api/series/4650/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4650",
            "date": "2019-05-14T09:20:40",
            "name": "Pseudo-random number generation improvements",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4650/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53395/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/53395/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 1E8CC5F13;\n\tTue, 14 May 2019 11:21:41 +0200 (CEST)",
            "from sesbmg22.ericsson.net (sesbmg22.ericsson.net [193.180.251.48])\n\tby dpdk.org (Postfix) with ESMTP id D02DB5F0D\n\tfor <dev@dpdk.org>; Tue, 14 May 2019 11:21:39 +0200 (CEST)",
            "from ESESSMB503.ericsson.se (Unknown_Domain [153.88.183.121])\n\tby sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id\n\tF3.33.06164.3A88ADC5; Tue, 14 May 2019 11:21:39 +0200 (CEST)",
            "from ESESBMB504.ericsson.se (153.88.183.171) by\n\tESESSMB503.ericsson.se (153.88.183.164) with Microsoft SMTP Server\n\t(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n\t15.1.1713.5; Tue, 14 May 2019 11:21:39 +0200",
            "from selio1a020.lmera.ericsson.se (153.88.183.153) by\n\tsmtp.internal.ericsson.com (153.88.183.187) with Microsoft SMTP\n\tServer id\n\t15.1.1713.5 via Frontend Transport; Tue, 14 May 2019 11:21:39 +0200",
            "from breslau.lmera.ericsson.se (breslau.lmera.ericsson.se\n\t[150.132.109.241])\n\tby selio1a020.lmera.ericsson.se (8.15.1+Sun/8.15.1) with ESMTP id\n\tx4E9LQN6027252; Tue, 14 May 2019 11:21:39 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801;\n\tc=relaxed/relaxed; \n\tq=dns/txt; i=@ericsson.com; t=1557825699; x=1560417699;\n\th=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=sCbbIv/xOw/DWYTaCt6jmAP/dF/zn8swp9Q9wpMlpc0=;\n\tb=VxUu7LoF8nNLNg+pwXSrVQ/SjxCMXHPzhu3+FZuKYnG2BgmUrDQ2lpnTcP0i45J4\n\tj8QkhIWmujOisf+XEYvfZ9gqEyCrvGCNwsIMMgyiaH+bD16FwFH8vMX7vw12QrvE\n\toOGt8wiMsbMBM/r0P/ad5f8tjPyjPl5umdUl6ULDLOs=;",
        "X-AuditID": "c1b4fb30-6ddff70000001814-8a-5cda88a3fdbb",
        "From": "=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<nhorman@tuxdriver.com>, <stephen@networkplumber.org>,\n\t<david.marchand@redhat.com>, <bruce.richardson@intel.com>, \n\t=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "Date": "Tue, 14 May 2019 11:20:42 +0200",
        "Message-ID": "<20190514092046.30808-3-mattias.ronnblom@ericsson.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190514092046.30808-1-mattias.ronnblom@ericsson.com>",
        "References": "<20190508181014.7dde7580@xps13>\n\t<20190514092046.30808-1-mattias.ronnblom@ericsson.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Transfer-Encoding": "8bit",
        "X-Brightmail-Tracker": "H4sIAAAAAAAAA+NgFnrDLMWRmVeSWpSXmKPExsUyM2J7pe7ijlsxBpc2yVvcWGVvsX1FF5vF\n\tu0/bmSxuNZ9ks1h8R86B1ePXgqWsHov3vGTy6Dk5j8nj/b6rbB5Xvq9mDGCN4rJJSc3JLEst\n\t0rdL4Mp4e/MvW8FLwYoL/w6yNDAe5uti5OSQEDCRmPL0DksXIxeHkMBRRokf17uYIZxvjBI7\n\tfv1ihHAuMkpc3n+UHcK5zCix8NtRJpB+NgFPicnvullAbBEBIYmlHy+DFTEL7GWUeLVuHlhC\n\tWMBPYkfbXXYQm0VAVaLx/UtWEJtXwEli7cSbrBCHyEus3nCAGcTmFHCWmDTlFli9kECKxJ+e\n\tRywQ9YISJ2c+AbOZBTQlWrf/Zoew5SWat85mhqjXkri/5AvzBEahWUhaZiFpmYWkZQEj8ypG\n\t0eLU4qTcdCMjvdSizOTi4vw8vbzUkk2MwDg4uOW3wQ7Gl88dDzEKcDAq8fCez7gVI8SaWFZc\n\tmXuIUYKDWUmEN0rxRowQb0piZVVqUX58UWlOavEhRmkOFiVx3ujVe2KEBNITS1KzU1MLUotg\n\tskwcnFINjKGvboT8s1l/02rHgYU/ExdUhK73MXFjOPJhT5PFZq2GmU4/f3zcY3//bGTipEUV\n\ttSq5pnf2nTnysemB388tW5/Z3r96Rse5MezEs7STmR6n3vus21Ju+znNSvPrnOPsv5VqmM2W\n\tbbKa/KZ9W5A5V2zij0MfSgUftd2S9mT1vFr4k1E78T2v+X4lluKMREMt5qLiRADPkX2bfwIA\n\tAA==",
        "Subject": "[dpdk-dev] [PATCH 2/6] eal: add pseudo-random number generation\n\tperformance 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": "Add performance test for rte_rand().\n\nSigned-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>\n---\n app/test/Makefile         |  1 +\n app/test/test_rand_perf.c | 75 +++++++++++++++++++++++++++++++++++++++\n 2 files changed, 76 insertions(+)\n create mode 100644 app/test/test_rand_perf.c",
    "diff": "diff --git a/app/test/Makefile b/app/test/Makefile\nindex 68d6b4fbc..be0f39227 100644\n--- a/app/test/Makefile\n+++ b/app/test/Makefile\n@@ -73,6 +73,7 @@ SRCS-y += test_reciprocal_division.c\n SRCS-y += test_reciprocal_division_perf.c\n SRCS-y += test_fbarray.c\n SRCS-y += test_external_mem.c\n+SRCS-y += test_rand_perf.c\n \n SRCS-y += test_ring.c\n SRCS-y += test_ring_perf.c\ndiff --git a/app/test/test_rand_perf.c b/app/test/test_rand_perf.c\nnew file mode 100644\nindex 000000000..771713757\n--- /dev/null\n+++ b/app/test/test_rand_perf.c\n@@ -0,0 +1,75 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Ericsson AB\n+ */\n+\n+#include <inttypes.h>\n+#include <stdio.h>\n+\n+#include <rte_common.h>\n+#include <rte_cycles.h>\n+#include <rte_random.h>\n+\n+#include \"test.h\"\n+\n+static volatile uint64_t vsum;\n+\n+#define ITERATIONS (100000000)\n+\n+enum rand_type {\n+\trand_type_64\n+};\n+\n+static const char *\n+rand_type_desc(enum rand_type rand_type)\n+{\n+\tswitch (rand_type) {\n+\tcase rand_type_64:\n+\t\treturn \"Full 64-bit [rte_rand()]\";\n+\tdefault:\n+\t\treturn NULL;\n+\t}\n+}\n+\n+static __rte_always_inline void\n+test_rand_perf_type(enum rand_type rand_type)\n+{\n+\tuint64_t start;\n+\tuint32_t i;\n+\tuint64_t end;\n+\tuint64_t sum = 0;\n+\tuint64_t op_latency;\n+\n+\tstart = rte_rdtsc();\n+\n+\tfor (i = 0; i < ITERATIONS; i++) {\n+\t\tswitch (rand_type) {\n+\t\tcase rand_type_64:\n+\t\t\tsum += rte_rand();\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tend = rte_rdtsc();\n+\n+\t/* to avoid an optimizing compiler removing the whole loop */\n+\tvsum = sum;\n+\n+\top_latency = (end - start) / ITERATIONS;\n+\n+\tprintf(\"%s: %\"PRId64\" TSC cycles/op\\n\", rand_type_desc(rand_type),\n+\t       op_latency);\n+}\n+\n+static int\n+test_rand_perf(void)\n+{\n+\trte_srand(42);\n+\n+\tprintf(\"Pseudo-random number generation latencies:\\n\");\n+\n+\ttest_rand_perf_type(rand_type_64);\n+\n+\treturn 0;\n+}\n+\n+REGISTER_TEST_COMMAND(rand_perf_autotest, test_rand_perf);\n",
    "prefixes": [
        "2/6"
    ]
}