get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 75468,
    "url": "http://patches.dpdk.org/api/patches/75468/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200812191847.16529-5-steven.lariau@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": "<20200812191847.16529-5-steven.lariau@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200812191847.16529-5-steven.lariau@arm.com",
    "date": "2020-08-12T19:18:47",
    "name": "[v2,4/4] test/stack: remove atomics operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "66c146f47b3f52e533f23c4a5a414bf0e68e5530",
    "submitter": {
        "id": 1862,
        "url": "http://patches.dpdk.org/api/people/1862/?format=api",
        "name": "Steven Lariau",
        "email": "steven.lariau@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/20200812191847.16529-5-steven.lariau@arm.com/mbox/",
    "series": [
        {
            "id": 11622,
            "url": "http://patches.dpdk.org/api/series/11622/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11622",
            "date": "2020-08-12T19:18:43",
            "name": "test/stack: improve multithreaded test",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/11622/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/75468/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/75468/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 A2398A04DB;\n\tWed, 12 Aug 2020 21:21:05 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 387941C0D5;\n\tWed, 12 Aug 2020 21:21:02 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by dpdk.org (Postfix) with ESMTP id 607F71C0D4\n for <dev@dpdk.org>; Wed, 12 Aug 2020 21:21:01 +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 E04C8D6E;\n Wed, 12 Aug 2020 12:21:00 -0700 (PDT)",
            "from localhost.localdomain (unknown [10.57.38.163])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9A0E33F22E;\n Wed, 12 Aug 2020 12:20:59 -0700 (PDT)"
        ],
        "From": "Steven Lariau <steven.lariau@arm.com>",
        "To": "Gage Eads <gage.eads@intel.com>,\n\tOlivier Matz <olivier.matz@6wind.com>",
        "Cc": "dev@dpdk.org,\n\tnd@arm.com,\n\tSteven Lariau <steven.lariau@arm.com>",
        "Date": "Wed, 12 Aug 2020 20:18:47 +0100",
        "Message-Id": "<20200812191847.16529-5-steven.lariau@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200812191847.16529-1-steven.lariau@arm.com>",
        "References": "<20200805155721.19808-1-steven.lariau@arm.com>\n <20200812191847.16529-1-steven.lariau@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/4] test/stack: remove atomics operations",
        "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": "Remove the part that checks if there is enough room in the stack, it's\nalways true as long as size of stack >= MAX_BULK*rte_lcore_count().\nThis check used an atomic cmpset, and read / write to a shared size\nvariable. These operations result in some form of synchronization\nthat might get in the way of the actual stack testing.\n\nSigned-off-by: Steven Lariau <steven.lariau@arm.com>\nReviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>\nReviewed-by: Phil Yang <phil.yang@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nAcked-by: Gage Eads <gage.eads@intel.com>\n---\n app/test/test_stack.c | 24 +++---------------------\n 1 file changed, 3 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/app/test/test_stack.c b/app/test/test_stack.c\nindex d959b566a..463460ccc 100644\n--- a/app/test/test_stack.c\n+++ b/app/test/test_stack.c\n@@ -273,7 +273,6 @@ test_free_null(void)\n \n struct test_args {\n \tstruct rte_stack *s;\n-\trte_atomic64_t *sz;\n };\n \n static struct test_args thread_test_args;\n@@ -285,21 +284,9 @@ stack_thread_push_pop(__rte_unused void *args)\n \tint i;\n \n \tfor (i = 0; i < NUM_ITERS_PER_THREAD; i++) {\n-\t\tunsigned int success, num;\n+\t\tunsigned int num;\n \n-\t\t/* Reserve up to min(MAX_BULK, available slots) stack entries,\n-\t\t * then push and pop those stack entries.\n-\t\t */\n-\t\tdo {\n-\t\t\tuint64_t sz = rte_atomic64_read(thread_test_args.sz);\n-\t\t\tvolatile uint64_t *sz_addr;\n-\n-\t\t\tsz_addr = (volatile uint64_t *)thread_test_args.sz;\n-\n-\t\t\tnum = RTE_MIN(rte_rand() % MAX_BULK, STACK_SIZE - sz);\n-\n-\t\t\tsuccess = rte_atomic64_cmpset(sz_addr, sz, sz + num);\n-\t\t} while (success == 0);\n+\t\tnum = rte_rand() % MAX_BULK;\n \n \t\tif (rte_stack_push(thread_test_args.s, obj_table, num) != num) {\n \t\t\tprintf(\"[%s():%u] Failed to push %u pointers\\n\",\n@@ -312,8 +299,6 @@ stack_thread_push_pop(__rte_unused void *args)\n \t\t\t       __func__, __LINE__, num);\n \t\t\treturn -1;\n \t\t}\n-\n-\t\trte_atomic64_sub(thread_test_args.sz, num);\n \t}\n \n \treturn 0;\n@@ -324,7 +309,6 @@ test_stack_multithreaded(uint32_t flags)\n {\n \tunsigned int lcore_id;\n \tstruct rte_stack *s;\n-\trte_atomic64_t size;\n \tint result = 0;\n \n \tif (rte_lcore_count() < 2) {\n@@ -335,16 +319,14 @@ test_stack_multithreaded(uint32_t flags)\n \tprintf(\"[%s():%u] Running with %u lcores\\n\",\n \t       __func__, __LINE__, rte_lcore_count());\n \n-\ts = rte_stack_create(\"test\", STACK_SIZE, rte_socket_id(), flags);\n+\ts = rte_stack_create(\"test\", MAX_BULK * rte_lcore_count(), rte_socket_id(), flags);\n \tif (s == NULL) {\n \t\tprintf(\"[%s():%u] Failed to create a stack\\n\",\n \t\t       __func__, __LINE__);\n \t\treturn -1;\n \t}\n \n-\trte_atomic64_init(&size);\n \tthread_test_args.s = s;\n-\tthread_test_args.sz = &size;\n \n \tif (rte_eal_mp_remote_launch(stack_thread_push_pop, NULL, CALL_MASTER))\n \t\trte_panic(\"Failed to launch tests\\n\");\n",
    "prefixes": [
        "v2",
        "4/4"
    ]
}