get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64058,
    "url": "http://patches.dpdk.org/api/patches/64058/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191220044524.32910-11-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": "<20191220044524.32910-11-honnappa.nagarahalli@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191220044524.32910-11-honnappa.nagarahalli@arm.com",
    "date": "2019-12-20T04:45:17",
    "name": "[v7,10/17] test/ring: modify single element enq/deq perf test cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "266ed6df0e30a3129adc1b66bb003310bf46fd3f",
    "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/20191220044524.32910-11-honnappa.nagarahalli@arm.com/mbox/",
    "series": [
        {
            "id": 7903,
            "url": "http://patches.dpdk.org/api/series/7903/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7903",
            "date": "2019-12-20T04:45:07",
            "name": "lib/ring: APIs to support custom element size",
            "version": 7,
            "mbox": "http://patches.dpdk.org/series/7903/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64058/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/64058/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 A976DA04F3;\n\tFri, 20 Dec 2019 05:47:27 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4556F1BFAD;\n\tFri, 20 Dec 2019 05:46:20 +0100 (CET)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by dpdk.org (Postfix) with ESMTP id E98C51BF7A\n for <dev@dpdk.org>; Fri, 20 Dec 2019 05:45:58 +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 820C613A1;\n Thu, 19 Dec 2019 20:45:57 -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 6D9173F86C;\n Thu, 19 Dec 2019 20:45:57 -0800 (PST)"
        ],
        "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "To": "olivier.matz@6wind.com, sthemmin@microsoft.com, jerinj@marvell.com,\n bruce.richardson@intel.com, david.marchand@redhat.com,\n pbhagavatula@marvell.com, konstantin.ananyev@intel.com,\n honnappa.nagarahalli@arm.com",
        "Cc": "dev@dpdk.org, dharmik.thakkar@arm.com, ruifeng.wang@arm.com,\n gavin.hu@arm.com, nd@arm.com",
        "Date": "Thu, 19 Dec 2019 22:45:17 -0600",
        "Message-Id": "<20191220044524.32910-11-honnappa.nagarahalli@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191220044524.32910-1-honnappa.nagarahalli@arm.com>",
        "References": "<20190906190510.11146-1-honnappa.nagarahalli@arm.com>\n <20191220044524.32910-1-honnappa.nagarahalli@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v7 10/17] test/ring: modify single element\n\tenq/deq perf test cases",
        "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 test cases to test rte_ring_xxx_elem APIs for single\nelement enqueue/dequeue test cases.\n\nSigned-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nReviewed-by: Gavin Hu <gavin.hu@arm.com>\n---\n app/test/test_ring_perf.c | 100 ++++++++++++++++++++++++++++++--------\n 1 file changed, 80 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c\nindex 6c2aca483..5829718c1 100644\n--- a/app/test/test_ring_perf.c\n+++ b/app/test/test_ring_perf.c\n@@ -13,6 +13,7 @@\n #include <string.h>\n \n #include \"test.h\"\n+#include \"test_ring.h\"\n \n /*\n  * Ring\n@@ -41,6 +42,35 @@ struct lcore_pair {\n \n static volatile unsigned lcore_count = 0;\n \n+static void\n+test_ring_print_test_string(unsigned int api_type, int esize,\n+\tunsigned int bsz, double value)\n+{\n+\tif (esize == -1)\n+\t\tprintf(\"legacy APIs\");\n+\telse\n+\t\tprintf(\"elem APIs: element size %dB\", esize);\n+\n+\tif (api_type == TEST_RING_IGNORE_API_TYPE)\n+\t\treturn;\n+\n+\tif ((api_type & TEST_RING_N) == TEST_RING_N)\n+\t\tprintf(\": default enqueue/dequeue: \");\n+\telse if ((api_type & TEST_RING_S) == TEST_RING_S)\n+\t\tprintf(\": SP/SC: \");\n+\telse if ((api_type & TEST_RING_M) == TEST_RING_M)\n+\t\tprintf(\": MP/MC: \");\n+\n+\tif ((api_type & TEST_RING_SL) == TEST_RING_SL)\n+\t\tprintf(\"single: \");\n+\telse if ((api_type & TEST_RING_BL) == TEST_RING_BL)\n+\t\tprintf(\"bulk (size: %u): \", bsz);\n+\telse if ((api_type & TEST_RING_BR) == TEST_RING_BR)\n+\t\tprintf(\"burst (size: %u): \", bsz);\n+\n+\tprintf(\"%.2F\\n\", value);\n+}\n+\n /**** Functions to analyse our core mask to get cores for different tests ***/\n \n static int\n@@ -335,32 +365,35 @@ run_on_all_cores(struct rte_ring *r)\n  * Test function that determines how long an enqueue + dequeue of a single item\n  * takes on a single lcore. Result is for comparison with the bulk enq+deq.\n  */\n-static void\n-test_single_enqueue_dequeue(struct rte_ring *r)\n+static int\n+test_single_enqueue_dequeue(struct rte_ring *r, const int esize,\n+\tconst unsigned int api_type)\n {\n-\tconst unsigned iter_shift = 24;\n-\tconst unsigned iterations = 1<<iter_shift;\n-\tunsigned i = 0;\n+\tint ret;\n+\tconst unsigned int iter_shift = 24;\n+\tconst unsigned int iterations = 1 << iter_shift;\n+\tunsigned int i = 0;\n \tvoid *burst = NULL;\n \n-\tconst uint64_t sc_start = rte_rdtsc();\n-\tfor (i = 0; i < iterations; i++) {\n-\t\trte_ring_sp_enqueue(r, burst);\n-\t\trte_ring_sc_dequeue(r, &burst);\n-\t}\n-\tconst uint64_t sc_end = rte_rdtsc();\n+\t(void)ret;\n+\t/* alloc dummy object pointers */\n+\tburst = test_ring_calloc(1, esize);\n+\tif (burst == NULL)\n+\t\treturn -1;\n \n-\tconst uint64_t mc_start = rte_rdtsc();\n+\tconst uint64_t start = rte_rdtsc();\n \tfor (i = 0; i < iterations; i++) {\n-\t\trte_ring_mp_enqueue(r, burst);\n-\t\trte_ring_mc_dequeue(r, &burst);\n+\t\tTEST_RING_ENQUEUE(r, burst, esize, 1, ret, api_type);\n+\t\tTEST_RING_DEQUEUE(r, burst, esize, 1, ret, api_type);\n \t}\n-\tconst uint64_t mc_end = rte_rdtsc();\n+\tconst uint64_t end = rte_rdtsc();\n+\n+\ttest_ring_print_test_string(api_type, esize, 1,\n+\t\t\t\t\t((double)(end - start)) / iterations);\n+\n+\trte_free(burst);\n \n-\tprintf(\"SP/SC single enq/dequeue: %.2F\\n\",\n-\t\t\t((double)(sc_end-sc_start)) / iterations);\n-\tprintf(\"MP/MC single enq/dequeue: %.2F\\n\",\n-\t\t\t((double)(mc_end-mc_start)) / iterations);\n+\treturn 0;\n }\n \n /*\n@@ -453,12 +486,39 @@ test_ring_perf(void)\n \tstruct lcore_pair cores;\n \tstruct rte_ring *r = NULL;\n \n+\t/*\n+\t * Performance test for legacy/_elem APIs\n+\t * SP-SC/MP-MC, single\n+\t */\n+\tTEST_RING_CREATE(RING_NAME, -1, RING_SIZE, rte_socket_id(), 0, r);\n+\tif (r == NULL)\n+\t\treturn -1;\n+\n+\tprintf(\"\\n### Testing single element enq/deq ###\\n\");\n+\tif (test_single_enqueue_dequeue(r, -1, TEST_RING_S | TEST_RING_SL) < 0)\n+\t\treturn -1;\n+\tif (test_single_enqueue_dequeue(r, -1, TEST_RING_M | TEST_RING_SL) < 0)\n+\t\treturn -1;\n+\n+\trte_ring_free(r);\n+\n+\tTEST_RING_CREATE(RING_NAME, 16, RING_SIZE, rte_socket_id(), 0, r);\n+\tif (r == NULL)\n+\t\treturn -1;\n+\n+\tprintf(\"\\n### Testing single element enq/deq ###\\n\");\n+\tif (test_single_enqueue_dequeue(r, 16, TEST_RING_S | TEST_RING_SL) < 0)\n+\t\treturn -1;\n+\tif (test_single_enqueue_dequeue(r, 16, TEST_RING_M | TEST_RING_SL) < 0)\n+\t\treturn -1;\n+\n+\trte_ring_free(r);\n+\n \tr = rte_ring_create(RING_NAME, RING_SIZE, rte_socket_id(), 0);\n \tif (r == NULL)\n \t\treturn -1;\n \n \tprintf(\"### Testing single element and burst enq/deq ###\\n\");\n-\ttest_single_enqueue_dequeue(r);\n \ttest_burst_enqueue_dequeue(r);\n \n \tprintf(\"\\n### Testing empty dequeue ###\\n\");\n",
    "prefixes": [
        "v7",
        "10/17"
    ]
}