get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 67969,
    "url": "https://patches.dpdk.org/api/patches/67969/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200408082921.31000-4-mk@semihalf.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": "<20200408082921.31000-4-mk@semihalf.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200408082921.31000-4-mk@semihalf.com",
    "date": "2020-04-08T08:28:54",
    "name": "[v3,03/30] net/ena/base: prevent allocation of 0-sized memory",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c265b3ee0527ff780ce4b4eb095580f0627b8c61",
    "submitter": {
        "id": 786,
        "url": "https://patches.dpdk.org/api/people/786/?format=api",
        "name": "Michal Krawczyk",
        "email": "mk@semihalf.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200408082921.31000-4-mk@semihalf.com/mbox/",
    "series": [
        {
            "id": 9246,
            "url": "https://patches.dpdk.org/api/series/9246/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9246",
            "date": "2020-04-08T08:28:51",
            "name": "Update ENA driver to v2.1.0",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/9246/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/67969/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/67969/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 6A97AA0597;\n\tWed,  8 Apr 2020 10:30:00 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C31151C0B6;\n\tWed,  8 Apr 2020 10:29:32 +0200 (CEST)",
            "from mail-lj1-f193.google.com (mail-lj1-f193.google.com\n [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id AE1FC1C00D\n for <dev@dpdk.org>; Wed,  8 Apr 2020 10:29:28 +0200 (CEST)",
            "by mail-lj1-f193.google.com with SMTP id 142so2122184ljj.7\n for <dev@dpdk.org>; Wed, 08 Apr 2020 01:29:28 -0700 (PDT)",
            "from mkPC.semihalf.local (193-106-246-138.noc.fibertech.net.pl.\n [193.106.246.138])\n by smtp.gmail.com with ESMTPSA id e8sm765685lja.3.2020.04.08.01.29.26\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 08 Apr 2020 01:29:27 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=semihalf-com.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=/KxbpCL3IXWW8qCiFu9QpdXKCLKmVd0eih2DDTSlqdo=;\n b=1GiYpVGbfGnqb6rR9Sf09PNpPCW0sDxd0wV3Cn6zNJKbkbGF4EGbfmI8hk1dN9dORQ\n Whdj8d9xdg6w6G40rNHc5BYn389ERIKNrJCsizzFMZTsrBfCEy5YZgGc58LWRNEfDhpH\n FiovHGMl9VdtCgO6IIoLgebd2V0iXfs69XWzrix4JKtmgiAeK1TNdrMh+a8154Agml9m\n eS2GZg7oukqrN5HS+w/iNrICOYEImmOtLz6bOo7NTQDD7F+NCmwl9+p5CGTM5b3Ih+Xj\n ewXRaxeS5drkLocOPaF7QgxujDND2mRyzQ7xx83kBHK/40FGDTq5vhrt51GfS8oG6hpx\n C5yA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=/KxbpCL3IXWW8qCiFu9QpdXKCLKmVd0eih2DDTSlqdo=;\n b=PGIMnknBs4YQWjpbjIT7uvfORiNkSuyzHkiZqdOs8l/ErKFv8arHox/hSVra+CG4vn\n uAQrI/uNX994KAqu8tF+oXhbmp+g3gdrppmSwwO+2LQ1o5T2ThuV+Jge3oryLlNW8iyu\n j4HtsRC5jC8su8zS3TPceKET0vqYAJDZhYobDSK0NYope1UrP/XNSygahHM1Wz4J1j5L\n l6YdXKD1Zdk5mdbIWwfPCSGGTh2fB6yfpgOucLVzcPB3SxDhyqOMbBR1sJc45ZUniG/c\n 0SsgqrivSmy+5hEk3DZOW5E1g52fb6rwsDtNBUUbzTeR+2UCIkuo8w3Twj1BgtZfwJ4N\n briw==",
        "X-Gm-Message-State": "AGi0PuZr8qADqCZBaN19F3wHfCOPbd2ieb4WEcW3yRg7BGvxs6v3dRsy\n xC44IDv8b9VEkcoSyvVHiHeFRAPoygQ=",
        "X-Google-Smtp-Source": "\n APiQypJx6K2Y47DxFDaabpvOcRLVUXy3sn4zuw/lOUzpRnGSQF1DkaIM2Fvj3oTHpaMWda3T5efxYA==",
        "X-Received": "by 2002:a2e:b4f1:: with SMTP id s17mr4135965ljm.283.1586334568109;\n Wed, 08 Apr 2020 01:29:28 -0700 (PDT)",
        "From": "Michal Krawczyk <mk@semihalf.com>",
        "To": "dev@dpdk.org",
        "Cc": "mw@semihalf.com, mba@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com,\n igorch@amazon.com, ferruh.yigit@intel.com, arybchenko@solarflare.com,\n stable@dpdk.org, Michal Krawczyk <mk@semihalf.com>",
        "Date": "Wed,  8 Apr 2020 10:28:54 +0200",
        "Message-Id": "<20200408082921.31000-4-mk@semihalf.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200408082921.31000-1-mk@semihalf.com>",
        "References": "<20200408082921.31000-1-mk@semihalf.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 03/30] net/ena/base: prevent allocation of\n\t0-sized memory",
        "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": "From: Igor Chauskin <igorch@amazon.com>\n\nrte_memzone_reserve() will reserve the biggest contiguous memzone\navailable if received 0 as size param.\n\nFixes: 9ba7981ec992 (\"ena: add communication layer for DPDK\")\nCc: stable@dpdk.org\n\nSigned-off-by: Igor Chauskin <igorch@amazon.com>\nReviewed-by: Michal Krawczyk <mk@semihalf.com>\nReviewed-by: Guy Tzalik <gtzalik@amazon.com>\n---\n drivers/net/ena/base/ena_plat_dpdk.h | 29 ++++++++++++++++------------\n 1 file changed, 17 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h\nindex 70261bdbc6..4b8fe017dd 100644\n--- a/drivers/net/ena/base/ena_plat_dpdk.h\n+++ b/drivers/net/ena/base/ena_plat_dpdk.h\n@@ -184,15 +184,18 @@ extern rte_atomic32_t ena_alloc_cnt;\n \n #define ENA_MEM_ALLOC_COHERENT(dmadev, size, virt, phys, handle)\t\\\n \tdo {\t\t\t\t\t\t\t\t\\\n-\t\tconst struct rte_memzone *mz;\t\t\t\t\\\n-\t\tchar z_name[RTE_MEMZONE_NAMESIZE];\t\t\t\\\n+\t\tconst struct rte_memzone *mz = NULL;\t\t\t\\\n \t\tENA_TOUCH(dmadev); ENA_TOUCH(handle);\t\t\t\\\n-\t\tsnprintf(z_name, sizeof(z_name),\t\t\t\\\n+\t\tif (size > 0) {\t\t\t\t\t\t\\\n+\t\t\tchar z_name[RTE_MEMZONE_NAMESIZE];\t\t\\\n+\t\t\tsnprintf(z_name, sizeof(z_name),\t\t\\\n \t\t\t \"ena_alloc_%d\",\t\t\t\t\\\n \t\t\t rte_atomic32_add_return(&ena_alloc_cnt, 1));\t\\\n-\t\tmz = rte_memzone_reserve(z_name, size, SOCKET_ID_ANY,\t\\\n-\t\t\t\tRTE_MEMZONE_IOVA_CONTIG);\t\t\\\n-\t\thandle = mz;\t\t\t\t\t\t\\\n+\t\t\tmz = rte_memzone_reserve(z_name, size,\t\t\\\n+\t\t\t\t\tSOCKET_ID_ANY,\t\t\t\\\n+\t\t\t\t\tRTE_MEMZONE_IOVA_CONTIG);\t\\\n+\t\t\thandle = mz;\t\t\t\t\t\\\n+\t\t}\t\t\t\t\t\t\t\\\n \t\tif (mz == NULL) {\t\t\t\t\t\\\n \t\t\tvirt = NULL;\t\t\t\t\t\\\n \t\t\tphys = 0;\t\t\t\t\t\\\n@@ -210,15 +213,17 @@ extern rte_atomic32_t ena_alloc_cnt;\n #define ENA_MEM_ALLOC_COHERENT_NODE(\t\t\t\t\t\\\n \tdmadev, size, virt, phys, mem_handle, node, dev_node)\t\t\\\n \tdo {\t\t\t\t\t\t\t\t\\\n-\t\tconst struct rte_memzone *mz;\t\t\t\t\\\n-\t\tchar z_name[RTE_MEMZONE_NAMESIZE];\t\t\t\\\n+\t\tconst struct rte_memzone *mz = NULL;\t\t\t\\\n \t\tENA_TOUCH(dmadev); ENA_TOUCH(dev_node);\t\t\t\\\n-\t\tsnprintf(z_name, sizeof(z_name),\t\t\t\\\n+\t\tif (size > 0) {\t\t\t\t\t\t\\\n+\t\t\tchar z_name[RTE_MEMZONE_NAMESIZE];\t\t\\\n+\t\t\tsnprintf(z_name, sizeof(z_name),\t\t\\\n \t\t\t \"ena_alloc_%d\",\t\t\t\t\\\n-\t\t\t rte_atomic32_add_return(&ena_alloc_cnt, 1));\t\\\n-\t\tmz = rte_memzone_reserve(z_name, size, node,\t\t\\\n+\t\t\t rte_atomic32_add_return(&ena_alloc_cnt, 1));   \\\n+\t\t\tmz = rte_memzone_reserve(z_name, size, node,\t\\\n \t\t\t\tRTE_MEMZONE_IOVA_CONTIG);\t\t\\\n-\t\tmem_handle = mz;\t\t\t\t\t\\\n+\t\t\tmem_handle = mz;\t\t\t\t\\\n+\t\t}\t\t\t\t\t\t\t\\\n \t\tif (mz == NULL) {\t\t\t\t\t\\\n \t\t\tvirt = NULL;\t\t\t\t\t\\\n \t\t\tphys = 0;\t\t\t\t\t\\\n",
    "prefixes": [
        "v3",
        "03/30"
    ]
}