Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/96074/?format=api
http://patchwork.dpdk.org/api/patches/96074/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210720035125.14214-3-joyce.kong@arm.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20210720035125.14214-3-joyce.kong@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210720035125.14214-3-joyce.kong@arm.com", "date": "2021-07-20T03:51:19", "name": "[v3,2/8] test/spinlock: use compile atomics for lcores sync", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "df1ff67e67e2017906deff5debb87b734a9819e3", "submitter": { "id": 970, "url": "http://patchwork.dpdk.org/api/people/970/?format=api", "name": "Joyce Kong", "email": "joyce.kong@arm.com" }, "delegate": { "id": 24651, "url": "http://patchwork.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210720035125.14214-3-joyce.kong@arm.com/mbox/", "series": [ { "id": 17901, "url": "http://patchwork.dpdk.org/api/series/17901/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=17901", "date": "2021-07-20T03:51:17", "name": "use compiler atomic builtins for test", "version": 3, "mbox": "http://patchwork.dpdk.org/series/17901/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/96074/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/96074/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B5DE6A0C43;\n\tTue, 20 Jul 2021 05:52:12 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AE705410FC;\n\tTue, 20 Jul 2021 05:52:07 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id DED77410F8\n for <dev@dpdk.org>; Tue, 20 Jul 2021 05:52:06 +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 3EFE31FB;\n Mon, 19 Jul 2021 20:52:06 -0700 (PDT)", "from net-arm-n1sdp.shanghai.arm.com (net-arm-n1sdp.shanghai.arm.com\n [10.169.208.222])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DB9023F694;\n Mon, 19 Jul 2021 20:52:02 -0700 (PDT)" ], "From": "Joyce Kong <joyce.kong@arm.com>", "To": "thomas@monjalon.net, david.marchand@redhat.com,\n roretzla@linux.microsoft.com, stephen@networkplumber.org,\n olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru,\n harry.van.haaren@intel.com, honnappa.nagarahalli@arm.com,\n ruifeng.wang@arm.com", "Cc": "dev@dpdk.org,\n\tnd@arm.com", "Date": "Mon, 19 Jul 2021 22:51:19 -0500", "Message-Id": "<20210720035125.14214-3-joyce.kong@arm.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20210720035125.14214-1-joyce.kong@arm.com>", "References": "<20210616025459.22717-1-joyce.kong@arm.com>\n <20210720035125.14214-1-joyce.kong@arm.com>", "Subject": "[dpdk-dev] [PATCH v3 2/8] test/spinlock: use compile atomics for\n lcores sync", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "Convert rte_atomic usages to compiler atomic built-ins for lcores\nsync in spinlock testcases.\n\nSigned-off-by: Joyce Kong <joyce.kong@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nAcked-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n app/test/test_spinlock.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)", "diff": "diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c\nindex 054fb43a9f..3f59372300 100644\n--- a/app/test/test_spinlock.c\n+++ b/app/test/test_spinlock.c\n@@ -17,7 +17,6 @@\n #include <rte_lcore.h>\n #include <rte_cycles.h>\n #include <rte_spinlock.h>\n-#include <rte_atomic.h>\n \n #include \"test.h\"\n \n@@ -49,7 +48,7 @@ static rte_spinlock_t sl_tab[RTE_MAX_LCORE];\n static rte_spinlock_recursive_t slr;\n static unsigned count = 0;\n \n-static rte_atomic32_t synchro;\n+static uint32_t synchro;\n \n static int\n test_spinlock_per_core(__rte_unused void *arg)\n@@ -111,7 +110,7 @@ load_loop_fn(void *func_param)\n \n \t/* wait synchro for workers */\n \tif (lcore != rte_get_main_lcore())\n-\t\twhile (rte_atomic32_read(&synchro) == 0);\n+\t\trte_wait_until_equal_32(&synchro, 1, __ATOMIC_RELAXED);\n \n \tbegin = rte_get_timer_cycles();\n \twhile (lcount < MAX_LOOP) {\n@@ -150,11 +149,11 @@ test_spinlock_perf(void)\n \tprintf(\"\\nTest with lock on %u cores...\\n\", rte_lcore_count());\n \n \t/* Clear synchro and start workers */\n-\trte_atomic32_set(&synchro, 0);\n+\t__atomic_store_n(&synchro, 0, __ATOMIC_RELAXED);\n \trte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MAIN);\n \n \t/* start synchro and launch test on main */\n-\trte_atomic32_set(&synchro, 1);\n+\t__atomic_store_n(&synchro, 1, __ATOMIC_RELAXED);\n \tload_loop_fn(&lock);\n \n \trte_eal_mp_wait_lcore();\n", "prefixes": [ "v3", "2/8" ] }{ "id": 96074, "url": "