get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 81861,
    "url": "https://patches.dpdk.org/api/patches/81861/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201023044343.13462-6-honnappa.nagarahalli@arm.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": "<20201023044343.13462-6-honnappa.nagarahalli@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201023044343.13462-6-honnappa.nagarahalli@arm.com",
    "date": "2020-10-23T04:43:43",
    "name": "[v3,5/5] test/ring: add stress tests for zero copy APIs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9b25a3141383e20c4630020d4bbae3ddcb4a0b6b",
    "submitter": {
        "id": 1045,
        "url": "https://patches.dpdk.org/api/people/1045/?format=api",
        "name": "Honnappa Nagarahalli",
        "email": "honnappa.nagarahalli@arm.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201023044343.13462-6-honnappa.nagarahalli@arm.com/mbox/",
    "series": [
        {
            "id": 13245,
            "url": "https://patches.dpdk.org/api/series/13245/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13245",
            "date": "2020-10-23T04:43:38",
            "name": "lib/ring: add zero copy APIs",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/13245/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/81861/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/81861/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 27D90A04DE;\n\tFri, 23 Oct 2020 06:45:40 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EC18472E4;\n\tFri, 23 Oct 2020 06:44:31 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by dpdk.org (Postfix) with ESMTP id 8BB7572DD\n for <dev@dpdk.org>; Fri, 23 Oct 2020 06:44:26 +0200 (CEST)",
            "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 0E7EC101E;\n Thu, 22 Oct 2020 21:44:25 -0700 (PDT)",
            "from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com\n [10.118.12.27])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0491B3F66B;\n Thu, 22 Oct 2020 21:44:25 -0700 (PDT)"
        ],
        "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "To": "dev@dpdk.org, honnappa.nagarahalli@arm.com, konstantin.ananyev@intel.com",
        "Cc": "olivier.matz@6wind.com, david.marchand@redhat.com,\n dharmik.thakkar@arm.com,\n ruifeng.wang@arm.com, nd@arm.com",
        "Date": "Thu, 22 Oct 2020 23:43:43 -0500",
        "Message-Id": "<20201023044343.13462-6-honnappa.nagarahalli@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201023044343.13462-1-honnappa.nagarahalli@arm.com>",
        "References": "<20200224203931.21256-1-honnappa.nagarahalli@arm.com>\n <20201023044343.13462-1-honnappa.nagarahalli@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v3 5/5] test/ring: add stress tests for zero copy\n\tAPIs",
        "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 stress tests for zero copy API.\n\nSigned-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nReviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>\n---\n app/test/meson.build                   |  2 +\n app/test/test_ring_mt_peek_stress_zc.c | 56 ++++++++++++++++++++++\n app/test/test_ring_st_peek_stress_zc.c | 65 ++++++++++++++++++++++++++\n app/test/test_ring_stress.c            |  6 +++\n app/test/test_ring_stress.h            |  2 +\n 5 files changed, 131 insertions(+)\n create mode 100644 app/test/test_ring_mt_peek_stress_zc.c\n create mode 100644 app/test/test_ring_st_peek_stress_zc.c",
    "diff": "diff --git a/app/test/meson.build b/app/test/meson.build\nindex 8bfb02890..88c831a92 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -108,9 +108,11 @@ test_sources = files('commands.c',\n \t'test_ring_mpmc_stress.c',\n \t'test_ring_hts_stress.c',\n \t'test_ring_mt_peek_stress.c',\n+\t'test_ring_mt_peek_stress_zc.c',\n \t'test_ring_perf.c',\n \t'test_ring_rts_stress.c',\n \t'test_ring_st_peek_stress.c',\n+\t'test_ring_st_peek_stress_zc.c',\n \t'test_ring_stress.c',\n \t'test_rwlock.c',\n \t'test_sched.c',\ndiff --git a/app/test/test_ring_mt_peek_stress_zc.c b/app/test/test_ring_mt_peek_stress_zc.c\nnew file mode 100644\nindex 000000000..7e0bd511a\n--- /dev/null\n+++ b/app/test/test_ring_mt_peek_stress_zc.c\n@@ -0,0 +1,56 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Arm Limited\n+ */\n+\n+#include \"test_ring.h\"\n+#include \"test_ring_stress_impl.h\"\n+#include <rte_ring_elem.h>\n+\n+static inline uint32_t\n+_st_ring_dequeue_bulk(struct rte_ring *r, void **obj, uint32_t n,\n+\tuint32_t *avail)\n+{\n+\tuint32_t m;\n+\tstruct rte_ring_zc_data zcd;\n+\n+\tm = rte_ring_dequeue_zc_bulk_start(r, n, &zcd, avail);\n+\tn = (m == n) ? n : 0;\n+\tif (n != 0) {\n+\t\t/* Copy the data from the ring */\n+\t\ttest_ring_copy_from(&zcd, obj, -1, n);\n+\t\trte_ring_dequeue_zc_finish(r, n);\n+\t}\n+\n+\treturn n;\n+}\n+\n+static inline uint32_t\n+_st_ring_enqueue_bulk(struct rte_ring *r, void * const *obj, uint32_t n,\n+\tuint32_t *free)\n+{\n+\tuint32_t m;\n+\tstruct rte_ring_zc_data zcd;\n+\n+\tm = rte_ring_enqueue_zc_bulk_start(r, n, &zcd, free);\n+\tn = (m == n) ? n : 0;\n+\tif (n != 0) {\n+\t\t/* Copy the data from the ring */\n+\t\ttest_ring_copy_to(&zcd, obj, -1, n);\n+\t\trte_ring_enqueue_zc_finish(r, n);\n+\t}\n+\n+\treturn n;\n+}\n+\n+static int\n+_st_ring_init(struct rte_ring *r, const char *name, uint32_t num)\n+{\n+\treturn rte_ring_init(r, name, num,\n+\t\tRING_F_MP_HTS_ENQ | RING_F_MC_HTS_DEQ);\n+}\n+\n+const struct test test_ring_mt_peek_stress_zc = {\n+\t.name = \"MT_PEEK_ZC\",\n+\t.nb_case = RTE_DIM(tests),\n+\t.cases = tests,\n+};\ndiff --git a/app/test/test_ring_st_peek_stress_zc.c b/app/test/test_ring_st_peek_stress_zc.c\nnew file mode 100644\nindex 000000000..2933e30bf\n--- /dev/null\n+++ b/app/test/test_ring_st_peek_stress_zc.c\n@@ -0,0 +1,65 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Arm Limited\n+ */\n+\n+#include \"test_ring.h\"\n+#include \"test_ring_stress_impl.h\"\n+#include <rte_ring_elem.h>\n+\n+static inline uint32_t\n+_st_ring_dequeue_bulk(struct rte_ring *r, void **obj, uint32_t n,\n+\tuint32_t *avail)\n+{\n+\tuint32_t m;\n+\tstruct rte_ring_zc_data zcd;\n+\n+\tstatic rte_spinlock_t lck = RTE_SPINLOCK_INITIALIZER;\n+\n+\trte_spinlock_lock(&lck);\n+\n+\tm = rte_ring_dequeue_zc_bulk_start(r, n, &zcd, avail);\n+\tn = (m == n) ? n : 0;\n+\tif (n != 0) {\n+\t\t/* Copy the data from the ring */\n+\t\ttest_ring_copy_from(&zcd, obj, -1, n);\n+\t\trte_ring_dequeue_zc_finish(r, n);\n+\t}\n+\n+\trte_spinlock_unlock(&lck);\n+\treturn n;\n+}\n+\n+static inline uint32_t\n+_st_ring_enqueue_bulk(struct rte_ring *r, void * const *obj, uint32_t n,\n+\tuint32_t *free)\n+{\n+\tuint32_t m;\n+\tstruct rte_ring_zc_data zcd;\n+\n+\tstatic rte_spinlock_t lck = RTE_SPINLOCK_INITIALIZER;\n+\n+\trte_spinlock_lock(&lck);\n+\n+\tm = rte_ring_enqueue_zc_bulk_start(r, n, &zcd, free);\n+\tn = (m == n) ? n : 0;\n+\tif (n != 0) {\n+\t\t/* Copy the data from the ring */\n+\t\ttest_ring_copy_to(&zcd, obj, -1, n);\n+\t\trte_ring_enqueue_zc_finish(r, n);\n+\t}\n+\n+\trte_spinlock_unlock(&lck);\n+\treturn n;\n+}\n+\n+static int\n+_st_ring_init(struct rte_ring *r, const char *name, uint32_t num)\n+{\n+\treturn rte_ring_init(r, name, num, RING_F_SP_ENQ | RING_F_SC_DEQ);\n+}\n+\n+const struct test test_ring_st_peek_stress_zc = {\n+\t.name = \"ST_PEEK_ZC\",\n+\t.nb_case = RTE_DIM(tests),\n+\t.cases = tests,\n+};\ndiff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c\nindex c4f82ea56..1af45e0fc 100644\n--- a/app/test/test_ring_stress.c\n+++ b/app/test/test_ring_stress.c\n@@ -49,9 +49,15 @@ test_ring_stress(void)\n \tn += test_ring_mt_peek_stress.nb_case;\n \tk += run_test(&test_ring_mt_peek_stress);\n \n+\tn += test_ring_mt_peek_stress_zc.nb_case;\n+\tk += run_test(&test_ring_mt_peek_stress_zc);\n+\n \tn += test_ring_st_peek_stress.nb_case;\n \tk += run_test(&test_ring_st_peek_stress);\n \n+\tn += test_ring_st_peek_stress_zc.nb_case;\n+\tk += run_test(&test_ring_st_peek_stress_zc);\n+\n \tprintf(\"Number of tests:\\t%u\\nSuccess:\\t%u\\nFailed:\\t%u\\n\",\n \t\tn, k, n - k);\n \treturn (k != n);\ndiff --git a/app/test/test_ring_stress.h b/app/test/test_ring_stress.h\nindex c85d6fa92..416d68c9a 100644\n--- a/app/test/test_ring_stress.h\n+++ b/app/test/test_ring_stress.h\n@@ -36,4 +36,6 @@ extern const struct test test_ring_mpmc_stress;\n extern const struct test test_ring_rts_stress;\n extern const struct test test_ring_hts_stress;\n extern const struct test test_ring_mt_peek_stress;\n+extern const struct test test_ring_mt_peek_stress_zc;\n extern const struct test test_ring_st_peek_stress;\n+extern const struct test test_ring_st_peek_stress_zc;\n",
    "prefixes": [
        "v3",
        "5/5"
    ]
}