get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73413,
    "url": "https://patches.dpdk.org/api/patches/73413/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1594115449-13750-4-git-send-email-phil.yang@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": "<1594115449-13750-4-git-send-email-phil.yang@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1594115449-13750-4-git-send-email-phil.yang@arm.com",
    "date": "2020-07-07T09:50:48",
    "name": "[v6,3/4] devtools: prevent use of rte atomic APIs in future patches",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fdd52bf3cd930033027a0ec07ca25cf3b42ef00c",
    "submitter": {
        "id": 833,
        "url": "https://patches.dpdk.org/api/people/833/?format=api",
        "name": "Phil Yang",
        "email": "phil.yang@arm.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1594115449-13750-4-git-send-email-phil.yang@arm.com/mbox/",
    "series": [
        {
            "id": 10843,
            "url": "https://patches.dpdk.org/api/series/10843/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10843",
            "date": "2020-07-07T09:50:45",
            "name": "generic rte atomic APIs deprecate proposal",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/10843/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73413/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/73413/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 11045A00BE;\n\tTue,  7 Jul 2020 11:51:50 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 926601DDA7;\n\tTue,  7 Jul 2020 11:51:38 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by dpdk.org (Postfix) with ESMTP id 1CBD71DDA7\n for <dev@dpdk.org>; Tue,  7 Jul 2020 11:51:37 +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 936D4C0A;\n Tue,  7 Jul 2020 02:51:36 -0700 (PDT)",
            "from phil-VirtualBox.shanghai.arm.com\n (phil-VirtualBox.shanghai.arm.com [10.169.109.153])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6F97D3F718;\n Tue,  7 Jul 2020 02:51:33 -0700 (PDT)"
        ],
        "From": "Phil Yang <phil.yang@arm.com>",
        "To": "thomas@monjalon.net,\n\tdev@dpdk.org,\n\tdavid.marchand@redhat.com",
        "Cc": "drc@linux.vnet.ibm.com, Honnappa.Nagarahalli@arm.com, jerinj@marvell.com,\n konstantin.ananyev@intel.com, Ola.Liljedahl@arm.com, ruifeng.wang@arm.com,\n nd@arm.com",
        "Date": "Tue,  7 Jul 2020 17:50:48 +0800",
        "Message-Id": "<1594115449-13750-4-git-send-email-phil.yang@arm.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1594115449-13750-1-git-send-email-phil.yang@arm.com>",
        "References": "<1590483667-10318-1-git-send-email-phil.yang@arm.com>\n <1594115449-13750-1-git-send-email-phil.yang@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v6 3/4] devtools: prevent use of rte atomic APIs\n\tin future patches",
        "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": "In order to deprecate the rte_atomic and rte_smp barrier APIs, prevent\nthe patches from using these APIs in the converted modules and compilers\n__sync built-ins in all modules.\n\nThe converted modules:\nlib/librte_distributor\nlib/librte_hash\nlib/librte_kni\nlib/librte_lpm\nlib/librte_rcu\nlib/librte_ring\nlib/librte_stack\nlib/librte_vhost\nlib/librte_timer\nlib/librte_ipsec\ndrivers/event/octeontx\ndrivers/event/octeontx2\ndrivers/event/opdl\ndrivers/net/bnx2x\ndrivers/net/hinic\ndrivers/net/hns3\ndrivers/net/memif\ndrivers/net/thunderx\ndrivers/net/virtio\nexamples/l2fwd-event\n\nOn x86 the __atomic_thread_fence(__ATOMIC_SEQ_CST) is quite expensive\nfor SMP case. Flag the new code which use __atomic_thread_fence API.\n\nSigned-off-by: Phil Yang <phil.yang@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\n---\n devtools/checkpatches.sh | 40 ++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 40 insertions(+)",
    "diff": "diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh\nindex 58021aa..68dc598 100755\n--- a/devtools/checkpatches.sh\n+++ b/devtools/checkpatches.sh\n@@ -51,6 +51,13 @@ print_usage () {\n \n check_forbidden_additions() { # <patch>\n \tres=0\n+\tc11_atomics_dir=\"lib/librte_distributor lib/librte_hash lib/librte_kni\n+\t\t\t lib/librte_lpm lib/librte_rcu lib/librte_ring\n+\t\t\t lib/librte_stack lib/librte_vhost\n+\t\t\t drivers/event/octeontx drivers/event/octeontx2\n+\t\t\t drivers/event/opdl drivers/net/bnx2x drivers/net/hinic\n+\t\t\t drivers/net/hns3 drivers/net/memif drivers/net/thunderx\n+\t\t\t drivers/net/virtio examples/l2fwd-event\"\n \n \t# refrain from new additions of rte_panic() and rte_exit()\n \t# multiple folders and expressions are separated by spaces\n@@ -74,6 +81,39 @@ check_forbidden_additions() { # <patch>\n \t\t-v EXPRESSIONS='for[[:space:]]*\\\\((char|u?int|unsigned|s?size_t)' \\\n \t\t-v RET_ON_FAIL=1 \\\n \t\t-v MESSAGE='Declaring a variable inside for()' \\\n+\n+\t# refrain from new additions of 16/32/64 bits rte_atomic_xxx()\n+\t# multiple folders and expressions are separated by spaces\n+\tawk -v FOLDERS=\"$c11_atomics_dir\" \\\n+\t\t-v EXPRESSIONS=\"rte_atomic[0-9][0-9]_.*\\\\\\(\" \\\n+\t\t-v RET_ON_FAIL=1 \\\n+\t\t-v MESSAGE='Use of rte_atomicNN_xxx APIs not allowed, use __atomic_xxx built-ins' \\\n+\t\t-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \\\n+\t\t\"$1\" || res=1\n+\n+\t# refrain from new additions of rte_smp_XXmb()\n+\t# multiple folders and expressions are separated by spaces\n+\tawk -v FOLDERS=\"$c11_atomics_dir\" \\\n+\t\t-v EXPRESSIONS=\"rte_smp_(r|w)?mb\\\\\\(\" \\\n+\t\t-v RET_ON_FAIL=1 \\\n+\t\t-v MESSAGE='Use of rte_smp_r/wmb not allowed, use __atomic_xxx built-ins' \\\n+\t\t-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \\\n+\t\t\"$1\" || res=1\n+\n+\t# refrain from using compiler __sync built-ins\n+\tawk -v FOLDERS=\"lib drivers app examples\" \\\n+\t\t-v EXPRESSIONS=\"__sync_.*\\\\\\(\" \\\n+\t\t-v RET_ON_FAIL=1 \\\n+\t\t-v MESSAGE='Use of __sync_xxx built-ins not allowed, use __atomic_xxx built-ins' \\\n+\t\t-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \\\n+\t\t\"$1\" || res=1\n+\n+\t# refrain from using compiler __atomic_thread_fence()\n+\t# It should be avoided on x86 for SMP case.\n+\tawk -v FOLDERS=\"lib drivers app examples\" \\\n+\t\t-v EXPRESSIONS=\"__atomic_thread_fence\\\\\\(\" \\\n+\t\t-v RET_ON_FAIL=1 \\\n+\t\t-v MESSAGE='Use of __atomic_thread_fence is not allowed, use rte_atomic_thread_fence' \\\n \t\t-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \\\n \t\t\"$1\" || res=1\n \n",
    "prefixes": [
        "v6",
        "3/4"
    ]
}