get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 62327,
    "url": "https://patches.dpdk.org/api/patches/62327/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/4e1409ab8f7331472d9107b87cc2a455692d0e43.1572621163.git.vladimir.medvedkin@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": "<4e1409ab8f7331472d9107b87cc2a455692d0e43.1572621163.git.vladimir.medvedkin@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/4e1409ab8f7331472d9107b87cc2a455692d0e43.1572621163.git.vladimir.medvedkin@intel.com",
    "date": "2019-11-01T15:21:45",
    "name": "[v6,12/12] test/fib: add FIB library ipv6 performance autotests",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "152bcd0bf757608634d8803e9cef5acc5810898f",
    "submitter": {
        "id": 1216,
        "url": "https://patches.dpdk.org/api/people/1216/?format=api",
        "name": "Vladimir Medvedkin",
        "email": "vladimir.medvedkin@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/4e1409ab8f7331472d9107b87cc2a455692d0e43.1572621163.git.vladimir.medvedkin@intel.com/mbox/",
    "series": [
        {
            "id": 7198,
            "url": "https://patches.dpdk.org/api/series/7198/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=7198",
            "date": "2019-11-01T15:21:33",
            "name": "lib: add RIB and FIB liraries",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/7198/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/62327/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/62327/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 9E669A00BE;\n\tFri,  1 Nov 2019 16:24:31 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A2A071E8B9;\n\tFri,  1 Nov 2019 16:22:17 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 2B6DC1E548\n for <dev@dpdk.org>; Fri,  1 Nov 2019 16:22:14 +0100 (CET)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 01 Nov 2019 08:22:13 -0700",
            "from silpixa00400072.ir.intel.com ([10.237.222.213])\n by orsmga004.jf.intel.com with ESMTP; 01 Nov 2019 08:22:12 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.68,256,1569308400\"; d=\"scan'208\";a=\"351979171\"",
        "From": "Vladimir Medvedkin <vladimir.medvedkin@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "bruce.richardson@intel.com, konstantin.ananyev@intel.com,\n thomas@monjalon.net, aconole@redhat.com",
        "Date": "Fri,  1 Nov 2019 15:21:45 +0000",
        "Message-Id": "\n <4e1409ab8f7331472d9107b87cc2a455692d0e43.1572621163.git.vladimir.medvedkin@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": [
            "<cover.1572621162.git.vladimir.medvedkin@intel.com>",
            "<cover.1572621162.git.vladimir.medvedkin@intel.com>"
        ],
        "References": [
            "<cover.1572621162.git.vladimir.medvedkin@intel.com>",
            "<cover.1568221361.git.vladimir.medvedkin@intel.com>\n <cover.1572621162.git.vladimir.medvedkin@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v6 12/12] test/fib: add FIB library ipv6\n\tperformance autotests",
        "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": "Performance ipv6 tests for the FIB library.\n\nSigned-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>\n---\n app/test/Makefile         |   1 +\n app/test/autotest_data.py |   6 ++\n app/test/meson.build      |   2 +\n app/test/test_fib6_perf.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++\n 4 files changed, 166 insertions(+)\n create mode 100644 app/test/test_fib6_perf.c",
    "diff": "diff --git a/app/test/Makefile b/app/test/Makefile\nindex 3a3f920..f792858 100644\n--- a/app/test/Makefile\n+++ b/app/test/Makefile\n@@ -129,6 +129,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib6.c\n SRCS-$(CONFIG_RTE_LIBRTE_FIB) += test_fib.c\n SRCS-$(CONFIG_RTE_LIBRTE_FIB) += test_fib6.c\n SRCS-$(CONFIG_RTE_LIBRTE_FIB) += test_fib_perf.c\n+SRCS-$(CONFIG_RTE_LIBRTE_FIB) += test_fib6_perf.c\n \n SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c\n SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm_perf.c\ndiff --git a/app/test/autotest_data.py b/app/test/autotest_data.py\nindex 0783979..97e4423 100644\n--- a/app/test/autotest_data.py\n+++ b/app/test/autotest_data.py\n@@ -725,6 +725,12 @@\n         \"Report\":  None,\n     },\n     {\n+        \"Name\":    \"FIB6 perf autotest\",\n+        \"Command\": \"fib6_perf_autotest\",\n+        \"Func\":    default_autotest,\n+        \"Report\":  None,\n+    },\n+    {\n          \"Name\":    \"Efd perf autotest\",\n          \"Command\": \"efd_perf_autotest\",\n          \"Func\":    default_autotest,\ndiff --git a/app/test/meson.build b/app/test/meson.build\nindex 929883a..42664d8 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -50,6 +50,7 @@ test_sources = files('commands.c',\n \t'test_fib.c',\n \t'test_fib_perf.c',\n \t'test_fib6.c',\n+\t'test_fib6_perf.c',\n \t'test_func_reentrancy.c',\n \t'test_flow_classify.c',\n \t'test_hash.c',\n@@ -268,6 +269,7 @@ perf_test_names = [\n         'efd_perf_autotest',\n         'lpm6_perf_autotest',\n         'fib6_slow_autotest',\n+        'fib6_perf_autotest',\n         'rcu_qsbr_perf_autotest',\n         'red_perf',\n         'distributor_perf_autotest',\ndiff --git a/app/test/test_fib6_perf.c b/app/test/test_fib6_perf.c\nnew file mode 100644\nindex 0000000..56c799b\n--- /dev/null\n+++ b/app/test/test_fib6_perf.c\n@@ -0,0 +1,157 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2010-2014 Intel Corporation\n+ */\n+\n+#include <stdio.h>\n+#include <stdint.h>\n+#include <stdlib.h>\n+#include <string.h>\n+\n+#include <rte_cycles.h>\n+#include <rte_random.h>\n+#include <rte_memory.h>\n+#include <rte_fib6.h>\n+\n+#include \"test.h\"\n+#include \"test_lpm6_data.h\"\n+\n+#define TEST_FIB_ASSERT(cond) do {\t\t\t\t\\\n+\tif (!(cond)) {\t\t\t\t\t\t\\\n+\t\tprintf(\"Error at line %d:\\n\", __LINE__);\t\\\n+\t\treturn -1;\t\t\t\t\t\\\n+\t}\t\t\t\t\t\t\t\\\n+} while (0)\n+\n+#define ITERATIONS (1 << 10)\n+#define BATCH_SIZE 100000\n+#define NUMBER_TBL8S                                           (1 << 16)\n+\n+static void\n+print_route_distribution(const struct rules_tbl_entry *table, uint32_t n)\n+{\n+\tunsigned int i, j;\n+\n+\tprintf(\"Route distribution per prefix width:\\n\");\n+\tprintf(\"DEPTH    QUANTITY (PERCENT)\\n\");\n+\tprintf(\"---------------------------\\n\");\n+\n+\t/* Count depths. */\n+\tfor (i = 1; i <= 128; i++) {\n+\t\tunsigned int depth_counter = 0;\n+\t\tdouble percent_hits;\n+\n+\t\tfor (j = 0; j < n; j++)\n+\t\t\tif (table[j].depth == (uint8_t) i)\n+\t\t\t\tdepth_counter++;\n+\n+\t\tpercent_hits = ((double)depth_counter)/((double)n) * 100;\n+\t\tprintf(\"%.2u%15u (%.2f)\\n\", i, depth_counter, percent_hits);\n+\t}\n+\tprintf(\"\\n\");\n+}\n+\n+static inline uint8_t\n+bits_in_nh(uint8_t nh_sz)\n+{\n+\treturn 8 * (1 << nh_sz);\n+}\n+\n+static inline uint64_t\n+get_max_nh(uint8_t nh_sz)\n+{\n+\treturn ((1ULL << (bits_in_nh(nh_sz) - 1)) - 1);\n+}\n+\n+static int\n+test_fib6_perf(void)\n+{\n+\tstruct rte_fib6 *fib = NULL;\n+\tstruct rte_fib6_conf conf;\n+\tuint64_t begin, total_time;\n+\tunsigned int i, j;\n+\tuint64_t next_hop_add;\n+\tint status = 0;\n+\tint64_t count = 0;\n+\tuint8_t ip_batch[NUM_IPS_ENTRIES][16];\n+\tuint64_t next_hops[NUM_IPS_ENTRIES];\n+\n+\tconf.type = RTE_FIB6_TRIE;\n+\tconf.default_nh = 0;\n+\tconf.max_routes = 1000000;\n+\tconf.trie.nh_sz = RTE_FIB6_TRIE_4B;\n+\tconf.trie.num_tbl8 = RTE_MIN(get_max_nh(conf.trie.nh_sz), 1000000U);\n+\n+\trte_srand(rte_rdtsc());\n+\n+\tprintf(\"No. routes = %u\\n\", (unsigned int) NUM_ROUTE_ENTRIES);\n+\n+\tprint_route_distribution(large_route_table,\n+\t\t(uint32_t)NUM_ROUTE_ENTRIES);\n+\n+\t/* Only generate IPv6 address of each item in large IPS table,\n+\t * here next_hop is not needed.\n+\t */\n+\tgenerate_large_ips_table(0);\n+\n+\tfib = rte_fib6_create(__func__, SOCKET_ID_ANY, &conf);\n+\tTEST_FIB_ASSERT(fib != NULL);\n+\n+\t/* Measure add. */\n+\tbegin = rte_rdtsc();\n+\n+\tfor (i = 0; i < NUM_ROUTE_ENTRIES; i++) {\n+\t\tnext_hop_add = (i & ((1 << 14) - 1)) + 1;\n+\t\tif (rte_fib6_add(fib, large_route_table[i].ip,\n+\t\t\t\tlarge_route_table[i].depth, next_hop_add) == 0)\n+\t\t\tstatus++;\n+\t}\n+\t/* End Timer. */\n+\ttotal_time = rte_rdtsc() - begin;\n+\n+\tprintf(\"Unique added entries = %d\\n\", status);\n+\tprintf(\"Average FIB Add: %g cycles\\n\",\n+\t\t\t(double)total_time / NUM_ROUTE_ENTRIES);\n+\n+\t/* Measure bulk Lookup */\n+\ttotal_time = 0;\n+\tcount = 0;\n+\n+\tfor (i = 0; i < NUM_IPS_ENTRIES; i++)\n+\t\tmemcpy(ip_batch[i], large_ips_table[i].ip, 16);\n+\n+\tfor (i = 0; i < ITERATIONS; i++) {\n+\n+\t\t/* Lookup per batch */\n+\t\tbegin = rte_rdtsc();\n+\t\trte_fib6_lookup_bulk(fib, ip_batch, next_hops, NUM_IPS_ENTRIES);\n+\t\ttotal_time += rte_rdtsc() - begin;\n+\n+\t\tfor (j = 0; j < NUM_IPS_ENTRIES; j++)\n+\t\t\tif (next_hops[j] == 0)\n+\t\t\t\tcount++;\n+\t}\n+\tprintf(\"BULK FIB Lookup: %.1f cycles (fails = %.1f%%)\\n\",\n+\t\t\t(double)total_time / ((double)ITERATIONS * BATCH_SIZE),\n+\t\t\t(count * 100.0) / (double)(ITERATIONS * BATCH_SIZE));\n+\n+\t/* Delete */\n+\tstatus = 0;\n+\tbegin = rte_rdtsc();\n+\n+\tfor (i = 0; i < NUM_ROUTE_ENTRIES; i++) {\n+\t\t/* rte_fib_delete(fib, ip, depth) */\n+\t\tstatus += rte_fib6_delete(fib, large_route_table[i].ip,\n+\t\t\t\tlarge_route_table[i].depth);\n+\t}\n+\n+\ttotal_time = rte_rdtsc() - begin;\n+\n+\tprintf(\"Average FIB Delete: %g cycles\\n\",\n+\t\t\t(double)total_time / NUM_ROUTE_ENTRIES);\n+\n+\trte_fib6_free(fib);\n+\n+\treturn 0;\n+}\n+\n+REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf);\n",
    "prefixes": [
        "v6",
        "12/12"
    ]
}