get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64051,
    "url": "http://patches.dpdk.org/api/patches/64051/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191220044524.32910-6-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-6-honnappa.nagarahalli@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191220044524.32910-6-honnappa.nagarahalli@arm.com",
    "date": "2019-12-20T04:45:12",
    "name": "[v7,05/17] test/ring: add default, single element test cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fca15639a609eb8833f6a84ca33138fc33e5aa4f",
    "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-6-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/64051/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/64051/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 9751CA04F3;\n\tFri, 20 Dec 2019 05:46:27 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 49BA61BF87;\n\tFri, 20 Dec 2019 05:46:07 +0100 (CET)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by dpdk.org (Postfix) with ESMTP id 456E11BF76\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 2C30C11D4;\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 187AA3F86C;\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:12 -0600",
        "Message-Id": "<20191220044524.32910-6-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 05/17] test/ring: add default,\n\tsingle element 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 default, single element test cases for rte_ring_xxx_elem\nAPIs. The burst APIs are kept as is since they are being tested\nwith a ring created with SP/SC flags. They are further enhanced\nwith bulk APIs.\n\nSigned-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nReviewed-by: Gavin Hu <gavin.hu@arm.com>\n---\n app/test/test_ring.c | 129 +++++++++++++++++++++++++++----------------\n 1 file changed, 81 insertions(+), 48 deletions(-)",
    "diff": "diff --git a/app/test/test_ring.c b/app/test/test_ring.c\nindex d4f40ad20..1025097c8 100644\n--- a/app/test/test_ring.c\n+++ b/app/test/test_ring.c\n@@ -620,78 +620,111 @@ test_lookup_null(void)\n }\n \n /*\n- * it tests some more basic ring operations\n+ * Test default, single element, bulk and burst APIs\n  */\n static int\n test_ring_basic_ex(void)\n {\n \tint ret = -1;\n-\tunsigned i;\n+\tunsigned int i, j;\n \tstruct rte_ring *rp = NULL;\n-\tvoid **obj = NULL;\n+\tvoid *obj = NULL;\n \n-\tobj = rte_calloc(\"test_ring_basic_ex_malloc\", RING_SIZE, sizeof(void *), 0);\n-\tif (obj == NULL) {\n-\t\tprintf(\"test_ring_basic_ex fail to rte_malloc\\n\");\n-\t\tgoto fail_test;\n-\t}\n+\tfor (i = 0; i < RTE_DIM(esize); i++) {\n+\t\tobj = test_ring_calloc(RING_SIZE, esize[i]);\n+\t\tif (obj == NULL) {\n+\t\t\tprintf(\"test_ring_basic_ex fail to rte_malloc\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n \n-\trp = rte_ring_create(\"test_ring_basic_ex\", RING_SIZE, SOCKET_ID_ANY,\n-\t\t\tRING_F_SP_ENQ | RING_F_SC_DEQ);\n-\tif (rp == NULL) {\n-\t\tprintf(\"test_ring_basic_ex fail to create ring\\n\");\n-\t\tgoto fail_test;\n-\t}\n+\t\tTEST_RING_CREATE(\"test_ring_basic_ex\", esize[i], RING_SIZE,\n+\t\t\t\t\tSOCKET_ID_ANY,\n+\t\t\t\t\tRING_F_SP_ENQ | RING_F_SC_DEQ, rp);\n+\t\tif (rp == NULL) {\n+\t\t\tprintf(\"test_ring_basic_ex fail to create ring\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n \n-\tif (rte_ring_lookup(\"test_ring_basic_ex\") != rp) {\n-\t\tgoto fail_test;\n-\t}\n+\t\tif (rte_ring_lookup(\"test_ring_basic_ex\") != rp) {\n+\t\t\tprintf(\"test_ring_basic_ex ring is not found\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n \n-\tif (rte_ring_empty(rp) != 1) {\n-\t\tprintf(\"test_ring_basic_ex ring is not empty but it should be\\n\");\n-\t\tgoto fail_test;\n-\t}\n+\t\tif (rte_ring_empty(rp) != 1) {\n+\t\t\tprintf(\"test_ring_basic_ex ring is not empty but it should be\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n \n-\tprintf(\"%u ring entries are now free\\n\", rte_ring_free_count(rp));\n+\t\tprintf(\"%u ring entries are now free\\n\",\n+\t\t\trte_ring_free_count(rp));\n \n-\tfor (i = 0; i < RING_SIZE; i ++) {\n-\t\trte_ring_enqueue(rp, obj[i]);\n-\t}\n+\t\tfor (j = 0; j < RING_SIZE; j++) {\n+\t\t\tTEST_RING_ENQUEUE(rp, obj, esize[i], 1, ret,\n+\t\t\t\t\t\tTEST_RING_N | TEST_RING_SL);\n+\t\t}\n \n-\tif (rte_ring_full(rp) != 1) {\n-\t\tprintf(\"test_ring_basic_ex ring is not full but it should be\\n\");\n-\t\tgoto fail_test;\n-\t}\n+\t\tif (rte_ring_full(rp) != 1) {\n+\t\t\tprintf(\"test_ring_basic_ex ring is not full but it should be\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n \n-\tfor (i = 0; i < RING_SIZE; i ++) {\n-\t\trte_ring_dequeue(rp, &obj[i]);\n-\t}\n+\t\tfor (j = 0; j < RING_SIZE; j++) {\n+\t\t\tTEST_RING_DEQUEUE(rp, obj, esize[i], 1, ret,\n+\t\t\t\t\t\tTEST_RING_N | TEST_RING_SL);\n+\t\t}\n \n-\tif (rte_ring_empty(rp) != 1) {\n-\t\tprintf(\"test_ring_basic_ex ring is not empty but it should be\\n\");\n-\t\tgoto fail_test;\n-\t}\n+\t\tif (rte_ring_empty(rp) != 1) {\n+\t\t\tprintf(\"test_ring_basic_ex ring is not empty but it should be\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n \n-\t/* Covering the ring burst operation */\n-\tret = rte_ring_enqueue_burst(rp, obj, 2, NULL);\n-\tif (ret != 2) {\n-\t\tprintf(\"test_ring_basic_ex: rte_ring_enqueue_burst fails \\n\");\n-\t\tgoto fail_test;\n-\t}\n+\t\t/* Following tests use the configured flags to decide\n+\t\t * SP/SC or MP/MC.\n+\t\t */\n+\t\t/* Covering the ring burst operation */\n+\t\tTEST_RING_ENQUEUE(rp, obj, esize[i], 2, ret,\n+\t\t\t\t\tTEST_RING_N | TEST_RING_BR);\n+\t\tif (ret != 2) {\n+\t\t\tprintf(\"test_ring_basic_ex: rte_ring_enqueue_burst fails\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n+\n+\t\tTEST_RING_DEQUEUE(rp, obj, esize[i], 2, ret,\n+\t\t\t\t\tTEST_RING_N | TEST_RING_BR);\n+\t\tif (ret != 2) {\n+\t\t\tprintf(\"test_ring_basic_ex: rte_ring_dequeue_burst fails\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n+\n+\t\t/* Covering the ring bulk operation */\n+\t\tTEST_RING_ENQUEUE(rp, obj, esize[i], 2, ret,\n+\t\t\t\t\tTEST_RING_N | TEST_RING_BL);\n+\t\tif (ret != 2) {\n+\t\t\tprintf(\"test_ring_basic_ex: rte_ring_enqueue_bulk fails\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n+\n+\t\tTEST_RING_DEQUEUE(rp, obj, esize[i], 2, ret,\n+\t\t\t\t\tTEST_RING_N | TEST_RING_BL);\n+\t\tif (ret != 2) {\n+\t\t\tprintf(\"test_ring_basic_ex: rte_ring_dequeue_bulk fails\\n\");\n+\t\t\tgoto fail_test;\n+\t\t}\n \n-\tret = rte_ring_dequeue_burst(rp, obj, 2, NULL);\n-\tif (ret != 2) {\n-\t\tprintf(\"test_ring_basic_ex: rte_ring_dequeue_burst fails \\n\");\n-\t\tgoto fail_test;\n+\t\trte_ring_free(rp);\n+\t\trte_free(obj);\n+\t\trp = NULL;\n+\t\tobj = NULL;\n \t}\n \n-\tret = 0;\n+\treturn 0;\n+\n fail_test:\n \trte_ring_free(rp);\n \tif (obj != NULL)\n \t\trte_free(obj);\n \n-\treturn ret;\n+\treturn -1;\n }\n \n static int\n",
    "prefixes": [
        "v7",
        "05/17"
    ]
}