Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/125471/?format=api
http://patches.dpdk.org/api/patches/125471/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1679610881-25997-5-git-send-email-roretzla@linux.microsoft.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": "<1679610881-25997-5-git-send-email-roretzla@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1679610881-25997-5-git-send-email-roretzla@linux.microsoft.com", "date": "2023-03-23T22:34:38", "name": "[v2,4/7] net/ice: replace rte atomics with GCC builtin atomics", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a9843fa5c2a59df78008c633036baa3ecb42e6c2", "submitter": { "id": 2077, "url": "http://patches.dpdk.org/api/people/2077/?format=api", "name": "Tyler Retzlaff", "email": "roretzla@linux.microsoft.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1679610881-25997-5-git-send-email-roretzla@linux.microsoft.com/mbox/", "series": [ { "id": 27529, "url": "http://patches.dpdk.org/api/series/27529/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27529", "date": "2023-03-23T22:34:35", "name": "replace rte atomics with GCC builtin atomics", "version": 2, "mbox": "http://patches.dpdk.org/series/27529/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/125471/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/125471/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 288164280D;\n\tThu, 23 Mar 2023 23:35:12 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0980342C54;\n\tThu, 23 Mar 2023 23:34:49 +0100 (CET)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id B0DFF4161A\n for <dev@dpdk.org>; Thu, 23 Mar 2023 23:34:43 +0100 (CET)", "by linux.microsoft.com (Postfix, from userid 1086)\n id 0C81B20DEE46; Thu, 23 Mar 2023 15:34:42 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 0C81B20DEE46", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1679610883;\n bh=NZUoL5B2q5Grwd+P/y25x3Mjz5Wjc8owPOQWGiUp0oY=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=Exr55Rerz14BP9FUcl+khRYPAapmkKbHud0tZ+E+yMkdi18VnvZmQ9TusR3sxfL66\n 85PekWXzldHuF2duWpeo4OOctpB9jNI1mtExz8VK58nJEh/GGC/pPcCYuw4CUCUsLS\n QslL0Vrty5fm6V7Sk+fyTS3DW8U5DxDpl9kSUiy8=", "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>", "To": "dev@dpdk.org", "Cc": "Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, thomas@monjalon.net,\n stephen@networkplumber.org, mb@smartsharesystems.com,\n Tyler Retzlaff <roretzla@linux.microsoft.com>", "Subject": "[PATCH v2 4/7] net/ice: replace rte atomics with GCC builtin atomics", "Date": "Thu, 23 Mar 2023 15:34:38 -0700", "Message-Id": "<1679610881-25997-5-git-send-email-roretzla@linux.microsoft.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1679610881-25997-1-git-send-email-roretzla@linux.microsoft.com>", "References": "<1679084388-19267-1-git-send-email-roretzla@linux.microsoft.com>\n <1679610881-25997-1-git-send-email-roretzla@linux.microsoft.com>", "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" }, "content": "Replace the use of rte_atomic.h types and functions, instead use GCC\nsupplied C++11 memory model builtins.\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n drivers/net/ice/ice_dcf.c | 1 -\n drivers/net/ice/ice_dcf_ethdev.c | 1 -\n drivers/net/ice/ice_ethdev.c | 12 ++++++++----\n 3 files changed, 8 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c\nindex 1c3d22a..80d2cbd 100644\n--- a/drivers/net/ice/ice_dcf.c\n+++ b/drivers/net/ice/ice_dcf.c\n@@ -14,7 +14,6 @@\n #include <rte_common.h>\n \n #include <rte_pci.h>\n-#include <rte_atomic.h>\n #include <rte_eal.h>\n #include <rte_ether.h>\n #include <ethdev_driver.h>\ndiff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex dcbf2af..13ff245 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -11,7 +11,6 @@\n #include <rte_interrupts.h>\n #include <rte_debug.h>\n #include <rte_pci.h>\n-#include <rte_atomic.h>\n #include <rte_eal.h>\n #include <rte_ether.h>\n #include <ethdev_pci.h>\ndiff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 9a88cf9..5608f6a 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -3927,8 +3927,10 @@ static int ice_init_rss(struct ice_pf *pf)\n \tstruct rte_eth_link *dst = link;\n \tstruct rte_eth_link *src = &dev->data->dev_link;\n \n-\tif (rte_atomic64_cmpset((uint64_t *)dst, *(uint64_t *)dst,\n-\t\t\t\t*(uint64_t *)src) == 0)\n+\t// NOTE: review for potential ordering optimization\n+\tif (!__atomic_compare_exchange_n((uint64_t *)dst,\n+\t\t(uint64_t *)dst, *(uint64_t *)src, 0,\n+\t\t__ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST))\n \t\treturn -1;\n \n \treturn 0;\n@@ -3941,8 +3943,10 @@ static int ice_init_rss(struct ice_pf *pf)\n \tstruct rte_eth_link *dst = &dev->data->dev_link;\n \tstruct rte_eth_link *src = link;\n \n-\tif (rte_atomic64_cmpset((uint64_t *)dst, *(uint64_t *)dst,\n-\t\t\t\t*(uint64_t *)src) == 0)\n+\t// NOTE: review for potential ordering optimization\n+\tif (!__atomic_compare_exchange_n((uint64_t *)dst,\n+\t\t(uint64_t *)dst, *(uint64_t *)src, 0,\n+\t\t__ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST))\n \t\treturn -1;\n \n \treturn 0;\n", "prefixes": [ "v2", "4/7" ] }{ "id": 125471, "url": "