Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/85602/?format=api
https://patches.dpdk.org/api/patches/85602/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201221142321.51606-3-joyce.kong@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": "<20201221142321.51606-3-joyce.kong@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201221142321.51606-3-joyce.kong@arm.com", "date": "2020-12-21T14:23:19", "name": "[v1,2/4] net/virtio: replace smp barrier with IO barrier", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "3c3ce81d2a4658473c38310deb4291b38e7f88e6", "submitter": { "id": 970, "url": "https://patches.dpdk.org/api/people/970/?format=api", "name": "Joyce Kong", "email": "joyce.kong@arm.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201221142321.51606-3-joyce.kong@arm.com/mbox/", "series": [ { "id": 14407, "url": "https://patches.dpdk.org/api/series/14407/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14407", "date": "2020-12-21T14:23:17", "name": "replace smp barriers in virtio with C11 atomic", "version": 1, "mbox": "https://patches.dpdk.org/series/14407/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/85602/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/85602/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 96A7AA09EF;\n\tMon, 21 Dec 2020 15:24:31 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4D794CC17;\n\tMon, 21 Dec 2020 15:23:54 +0100 (CET)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by dpdk.org (Postfix) with ESMTP id BEC6BCBB4\n for <dev@dpdk.org>; Mon, 21 Dec 2020 15:23:52 +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 317F01FB;\n Mon, 21 Dec 2020 06:23:51 -0800 (PST)", "from net-arm-thunderx2-03.shanghai.arm.com\n (net-arm-thunderx2-03.shanghai.arm.com [10.169.208.206])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0D5983F6CF;\n Mon, 21 Dec 2020 06:23:48 -0800 (PST)" ], "From": "Joyce Kong <joyce.kong@arm.com>", "To": "maxime.coquelin@redhat.com, chenbo.xia@intel.com,\n honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com", "Cc": "dev@dpdk.org,\n\tnd@arm.com", "Date": "Mon, 21 Dec 2020 22:23:19 +0800", "Message-Id": "<20201221142321.51606-3-joyce.kong@arm.com>", "X-Mailer": "git-send-email 2.29.2", "In-Reply-To": "<20201221142321.51606-1-joyce.kong@arm.com>", "References": "<20201221142321.51606-1-joyce.kong@arm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v1 2/4] net/virtio: replace smp barrier with IO\n\tbarrier", "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": "Replace rte_smp_wmb/rmb with rte_io_wmb/rmb as they are the same on x86\nand ppc platforms. Then, for function virtqueue_fetch_flags_packed/\nvirtqueue_store_flags_packed, the if and else branch are still identical\nfor the platforms except Arm.\n\nSigned-off-by: Joyce Kong <joyce.kong@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\n---\n drivers/net/virtio/virtqueue.h | 27 +++++++++++++--------------\n 1 file changed, 13 insertions(+), 14 deletions(-)", "diff": "diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h\nindex 42c4c9882..ac3d9e750 100644\n--- a/drivers/net/virtio/virtqueue.h\n+++ b/drivers/net/virtio/virtqueue.h\n@@ -66,16 +66,15 @@ virtqueue_fetch_flags_packed(struct vring_packed_desc *dp,\n \tuint16_t flags;\n \n \tif (weak_barriers) {\n-/* x86 prefers to using rte_smp_rmb over __atomic_load_n as it reports\n+/* x86 prefers to using rte_io_rmb over __atomic_load_n as it reports\n * a better perf(~1.5%), which comes from the saved branch by the compiler.\n- * The if and else branch are identical with the smp and io barriers both\n- * defined as compiler barriers on x86.\n+ * The if and else branch are identical on the platforms except Arm.\n */\n-#ifdef RTE_ARCH_X86_64\n-\t\tflags = dp->flags;\n-\t\trte_smp_rmb();\n-#else\n+#ifdef RTE_ARCH_ARM\n \t\tflags = __atomic_load_n(&dp->flags, __ATOMIC_ACQUIRE);\n+#else\n+\t\tflags = dp->flags;\n+\t\trte_io_rmb();\n #endif\n \t} else {\n \t\tflags = dp->flags;\n@@ -90,22 +89,22 @@ virtqueue_store_flags_packed(struct vring_packed_desc *dp,\n \t\t\t uint16_t flags, uint8_t weak_barriers)\n {\n \tif (weak_barriers) {\n-/* x86 prefers to using rte_smp_wmb over __atomic_store_n as it reports\n+/* x86 prefers to using rte_io_wmb over __atomic_store_n as it reports\n * a better perf(~1.5%), which comes from the saved branch by the compiler.\n- * The if and else branch are identical with the smp and io barriers both\n- * defined as compiler barriers on x86.\n+ * The if and else branch are identical on the platforms except Arm.\n */\n-#ifdef RTE_ARCH_X86_64\n-\t\trte_smp_wmb();\n-\t\tdp->flags = flags;\n-#else\n+#ifdef RTE_ARCH_ARM\n \t\t__atomic_store_n(&dp->flags, flags, __ATOMIC_RELEASE);\n+#else\n+\t\trte_io_wmb();\n+\t\tdp->flags = flags;\n #endif\n \t} else {\n \t\trte_io_wmb();\n \t\tdp->flags = flags;\n \t}\n }\n+\n #ifdef RTE_PMD_PACKET_PREFETCH\n #define rte_packet_prefetch(p) rte_prefetch1(p)\n #else\n", "prefixes": [ "v1", "2/4" ] }{ "id": 85602, "url": "