get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87552,
    "url": "http://patchwork.dpdk.org/api/patches/87552/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/4e0688f841f6ba2408fde949aabce8e36c0d46f0.1611934186.git.anatoly.burakov@intel.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": "<4e0688f841f6ba2408fde949aabce8e36c0d46f0.1611934186.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/4e0688f841f6ba2408fde949aabce8e36c0d46f0.1611934186.git.anatoly.burakov@intel.com",
    "date": "2021-01-29T15:29:51",
    "name": "mem: fix deadlock on secondary allocation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7b43a36ceb82f1159dad9535586b4fb605a47095",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Burakov, Anatoly",
        "email": "anatoly.burakov@intel.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/4e0688f841f6ba2408fde949aabce8e36c0d46f0.1611934186.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 15034,
            "url": "http://patchwork.dpdk.org/api/series/15034/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=15034",
            "date": "2021-01-29T15:29:51",
            "name": "mem: fix deadlock on secondary allocation",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/15034/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/87552/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/87552/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 0DA7FA09E4;\n\tFri, 29 Jan 2021 16:29:56 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7F9654067B;\n\tFri, 29 Jan 2021 16:29:55 +0100 (CET)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id BD49740395\n for <dev@dpdk.org>; Fri, 29 Jan 2021 16:29:54 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Jan 2021 07:29:53 -0800",
            "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.179])\n by FMSMGA003.fm.intel.com with ESMTP; 29 Jan 2021 07:29:52 -0800"
        ],
        "IronPort-SDR": [
            "\n esN6ALK0NtF/ezkM6v8W0OMIND7Q4mWIEh/J5VXMAqqlv50tF5UpoS5EyjHbd1uFEAt3op6c7l\n sheDJYkGeK5w==",
            "\n xKEOgWcEIMh2kQDaRkqoPzHgXJ5cRS1LiBbzFBReNJpx3xMcGiwPp2oBNtB5jUvsqNrNPwdbkl\n PWAqyBBKuEyA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9878\"; a=\"168104846\"",
            "E=Sophos;i=\"5.79,385,1602572400\"; d=\"scan'208\";a=\"168104846\"",
            "E=Sophos;i=\"5.79,385,1602572400\"; d=\"scan'208\";a=\"411508803\""
        ],
        "X-ExtLoop1": "1",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net,\n\tjames.r.harris@intel.com",
        "Date": "Fri, 29 Jan 2021 15:29:51 +0000",
        "Message-Id": "\n <4e0688f841f6ba2408fde949aabce8e36c0d46f0.1611934186.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] mem: fix deadlock on secondary allocation",
        "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": "Previous fix used `rte_malloc_heap_socket_is_external()` to check if the\nheap was an external heap. However, that API is thread-safe, and when\nwe're inside the allocation process, we're already write-locked, so\ncalling `rte_malloc_heap_socket_is_external()` will result in a\ndeadlock followed by a timeout.\n\nFix it by replacing the API call with a check against maximum number of\nNUMA nodes, because external heaps always have higher socket ID's.\n\nFixes: 7ac31e82bc8f (\"mem: improve parameter checking on memory hotplug\")\n\nReported-by: Jim Harris <james.r.harris@intel.com>\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/malloc_mp.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c\nindex 0b19d4d5fb..b1f7f7824b 100644\n--- a/lib/librte_eal/common/malloc_mp.c\n+++ b/lib/librte_eal/common/malloc_mp.c\n@@ -241,8 +241,13 @@ handle_alloc_request(const struct malloc_mp_req *m,\n \n \theap = &mcfg->malloc_heaps[ar->malloc_heap_idx];\n \n-\t/* for allocations, we must only use internal heaps */\n-\tif (rte_malloc_heap_socket_is_external(heap->socket_id)) {\n+\t/*\n+\t * for allocations, we must only use internal heaps, but since the\n+\t * rte_malloc_heap_socket_is_external() is thread-safe and we're already\n+\t * read-locked, we'll have to take advantage of the fac that internal\n+\t * socket ID's are always lower than RTE_MAX_NUMA_NODES.\n+\t */\n+\tif (heap->socket_id >= RTE_MAX_NUMA_NODES) {\n \t\tRTE_LOG(ERR, EAL, \"Attempting to allocate from external heap\\n\");\n \t\treturn -1;\n \t}\n",
    "prefixes": []
}