get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127986,
    "url": "http://patchwork.dpdk.org/api/patches/127986/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1685735107-19208-5-git-send-email-roretzla@linux.microsoft.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": "<1685735107-19208-5-git-send-email-roretzla@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1685735107-19208-5-git-send-email-roretzla@linux.microsoft.com",
    "date": "2023-06-02T19:45:05",
    "name": "[v4,4/6] net/ixgbe: replace rte atomics with GCC builtin atomics",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d6f0f064f0f3dce09b60eb88d0776ac4b724d233",
    "submitter": {
        "id": 2077,
        "url": "http://patchwork.dpdk.org/api/people/2077/?format=api",
        "name": "Tyler Retzlaff",
        "email": "roretzla@linux.microsoft.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1685735107-19208-5-git-send-email-roretzla@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 28333,
            "url": "http://patchwork.dpdk.org/api/series/28333/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28333",
            "date": "2023-06-02T19:45:02",
            "name": "replace rte atomics with GCC builtin atomics",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/28333/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/127986/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/127986/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 1319742C12;\n\tFri,  2 Jun 2023 21:45:35 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BF5CE42D38;\n\tFri,  2 Jun 2023 21:45:18 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 5A06F427E9\n for <dev@dpdk.org>; Fri,  2 Jun 2023 21:45:13 +0200 (CEST)",
            "by linux.microsoft.com (Postfix, from userid 1086)\n id 82A6020B9C3D; Fri,  2 Jun 2023 12:45:12 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 82A6020B9C3D",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1685735112;\n bh=hBUXtnCafl/cw/F2ThnPo/PzfDmuyCL29G6Ppwv+EBY=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=B2HuZvMpZMXZlcj2ViBLm0ozz2UQ32MM7LKAGpuiOuE+DVPNu10VWZ/PU6zATlVKI\n jEprt+kmp/5YcNG+OBi5j2GRL/FJDdlBweM6wnnIWo5U98i1V34IWEgMcUFNhjS7Z0\n JUMrQkoeu9X80YQz6F5eJAYy4v/mB5noRgYqU29M=",
        "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "To": "dev@dpdk.org,\n\tdavid.marchand@redhat.com",
        "Cc": "Olivier Matz <olivier.matz@6wind.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Kevin Laatz <kevin.laatz@intel.com>, Qiming Yang <qiming.yang@intel.com>,\n Qi Zhang <qi.z.zhang@intel.com>, Wenjun Wu <wenjun1.wu@intel.com>,\n Tetsuya Mukawa <mtetsuyah@gmail.com>, Honnappa.Nagarahalli@arm.com,\n thomas@monjalon.net, Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "Subject": "[PATCH v4 4/6] net/ixgbe: replace rte atomics with GCC builtin\n atomics",
        "Date": "Fri,  2 Jun 2023 12:45:05 -0700",
        "Message-Id": "<1685735107-19208-5-git-send-email-roretzla@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1685735107-19208-1-git-send-email-roretzla@linux.microsoft.com>",
        "References": "<1679084388-19267-1-git-send-email-roretzla@linux.microsoft.com>\n <1685735107-19208-1-git-send-email-roretzla@linux.microsoft.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\n---\n drivers/net/ixgbe/ixgbe_bypass.c |  1 -\n drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++++++------\n drivers/net/ixgbe/ixgbe_ethdev.h |  3 ++-\n drivers/net/ixgbe/ixgbe_flow.c   |  1 -\n drivers/net/ixgbe/ixgbe_rxtx.c   |  1 -\n 5 files changed, 14 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_bypass.c b/drivers/net/ixgbe/ixgbe_bypass.c\nindex 94f34a2..f615d18 100644\n--- a/drivers/net/ixgbe/ixgbe_bypass.c\n+++ b/drivers/net/ixgbe/ixgbe_bypass.c\n@@ -3,7 +3,6 @@\n  */\n \n #include <time.h>\n-#include <rte_atomic.h>\n #include <ethdev_driver.h>\n #include \"ixgbe_ethdev.h\"\n #include \"ixgbe_bypass_api.h\"\ndiff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex 88118bc..4bb85af 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -1127,7 +1127,8 @@ struct rte_ixgbe_xstats_name_off {\n \t\treturn 0;\n \t}\n \n-\trte_atomic32_clear(&ad->link_thread_running);\n+\t/* NOTE: review for potential ordering optimization */\n+\t__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);\n \tixgbe_parse_devargs(eth_dev->data->dev_private,\n \t\t\t    pci_dev->device.devargs);\n \trte_eth_copy_pci_info(eth_dev, pci_dev);\n@@ -1625,7 +1626,8 @@ static int ixgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)\n \t\treturn 0;\n \t}\n \n-\trte_atomic32_clear(&ad->link_thread_running);\n+\t/* NOTE: review for potential ordering optimization */\n+\t__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);\n \tixgbevf_parse_devargs(eth_dev->data->dev_private,\n \t\t\t      pci_dev->device.devargs);\n \n@@ -4186,7 +4188,8 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,\n \tstruct ixgbe_adapter *ad = dev->data->dev_private;\n \tuint32_t timeout = timeout_ms ? timeout_ms : WARNING_TIMEOUT;\n \n-\twhile (rte_atomic32_read(&ad->link_thread_running)) {\n+\t/* NOTE: review for potential ordering optimization */\n+\twhile (__atomic_load_n(&ad->link_thread_running, __ATOMIC_SEQ_CST)) {\n \t\tmsec_delay(1);\n \t\ttimeout--;\n \n@@ -4222,7 +4225,8 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,\n \tixgbe_setup_link(hw, speed, true);\n \n \tintr->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG;\n-\trte_atomic32_clear(&ad->link_thread_running);\n+\t/* NOTE: review for potential ordering optimization */\n+\t__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);\n \treturn NULL;\n }\n \n@@ -4317,7 +4321,8 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,\n \tif (link_up == 0) {\n \t\tif (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {\n \t\t\tixgbe_dev_wait_setup_link_complete(dev, 0);\n-\t\t\tif (rte_atomic32_test_and_set(&ad->link_thread_running)) {\n+\t\t\t/* NOTE: review for potential ordering optimization */\n+\t\t\tif (__atomic_test_and_set(&ad->link_thread_running, __ATOMIC_SEQ_CST)) {\n \t\t\t\t/* To avoid race condition between threads, set\n \t\t\t\t * the IXGBE_FLAG_NEED_LINK_CONFIG flag only\n \t\t\t\t * when there is no link thread running.\n@@ -4330,7 +4335,8 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,\n \t\t\t\t\tdev) < 0) {\n \t\t\t\t\tPMD_DRV_LOG(ERR,\n \t\t\t\t\t\t\"Create link thread failed!\");\n-\t\t\t\t\trte_atomic32_clear(&ad->link_thread_running);\n+\t\t\t\t\t/* NOTE: review for potential ordering optimization */\n+\t\t\t\t\t__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tPMD_DRV_LOG(ERR,\ndiff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h\nindex 48290af..2ca6998 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.h\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.h\n@@ -6,6 +6,7 @@\n #define _IXGBE_ETHDEV_H_\n \n #include <stdint.h>\n+#include <stdbool.h>\n #include <sys/queue.h>\n \n #include \"base/ixgbe_type.h\"\n@@ -510,7 +511,7 @@ struct ixgbe_adapter {\n \t */\n \tuint8_t pflink_fullchk;\n \tuint8_t mac_ctrl_frame_fwd;\n-\trte_atomic32_t link_thread_running;\n+\tbool link_thread_running;\n \tpthread_t link_thread_tid;\n };\n \ndiff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c\nindex eac81ee..687341c 100644\n--- a/drivers/net/ixgbe/ixgbe_flow.c\n+++ b/drivers/net/ixgbe/ixgbe_flow.c\n@@ -18,7 +18,6 @@\n #include <rte_log.h>\n #include <rte_debug.h>\n #include <rte_pci.h>\n-#include <rte_atomic.h>\n #include <rte_branch_prediction.h>\n #include <rte_memory.h>\n #include <rte_eal.h>\ndiff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c\nindex c9d6ca9..8d7251d 100644\n--- a/drivers/net/ixgbe/ixgbe_rxtx.c\n+++ b/drivers/net/ixgbe/ixgbe_rxtx.c\n@@ -27,7 +27,6 @@\n #include <rte_eal.h>\n #include <rte_per_lcore.h>\n #include <rte_lcore.h>\n-#include <rte_atomic.h>\n #include <rte_branch_prediction.h>\n #include <rte_mempool.h>\n #include <rte_malloc.h>\n",
    "prefixes": [
        "v4",
        "4/6"
    ]
}