get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 85305,
    "url": "https://patches.dpdk.org/api/patches/85305/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201217111616.24057-1-sarosh.arif@emumba.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": "<20201217111616.24057-1-sarosh.arif@emumba.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201217111616.24057-1-sarosh.arif@emumba.com",
    "date": "2020-12-17T11:16:16",
    "name": "[v2] usertools: show an error message if unable to reserve requested hugepages",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9d0509186c86d5759594f127698b713f99ffb133",
    "submitter": {
        "id": 1638,
        "url": "https://patches.dpdk.org/api/people/1638/?format=api",
        "name": "Sarosh Arif",
        "email": "sarosh.arif@emumba.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201217111616.24057-1-sarosh.arif@emumba.com/mbox/",
    "series": [
        {
            "id": 14346,
            "url": "https://patches.dpdk.org/api/series/14346/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14346",
            "date": "2020-12-17T11:16:16",
            "name": "[v2] usertools: show an error message if unable to reserve requested hugepages",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/14346/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/85305/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/85305/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 C415AA09F6;\n\tThu, 17 Dec 2020 12:16:57 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A2F62CA0A;\n\tThu, 17 Dec 2020 12:16:55 +0100 (CET)",
            "from mail-wr1-f53.google.com (mail-wr1-f53.google.com\n [209.85.221.53]) by dpdk.org (Postfix) with ESMTP id 1B8FCCA02\n for <dev@dpdk.org>; Thu, 17 Dec 2020 12:16:54 +0100 (CET)",
            "by mail-wr1-f53.google.com with SMTP id y17so26160835wrr.10\n for <dev@dpdk.org>; Thu, 17 Dec 2020 03:16:54 -0800 (PST)",
            "from localhost.localdomain ([182.191.83.208])\n by smtp.gmail.com with ESMTPSA id h16sm8148818wrq.29.2020.12.17.03.16.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 17 Dec 2020 03:16:52 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=emumba-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=Yjjkr1YnxL2KB4IBI4F2fu9HbkzAPcn+qP3R2xAE/XI=;\n b=CMIroDp2fQYmDfwkezRBTOZ/Yyci6+wBc4cA1Et0nJg3xEmjhi45Z+I0KjuESgD6C6\n MDHM6/oCkkmntHIpZM9BMIW+4danF6m/jwqjrtSMiQ/2TjeZTDDck9Qs2KI6ZI1mWc4T\n v0Bvc68VzNo/wBRUub2ics6cVdYPk7Usr9KUb+q6XU5ceXA6/5b2uRAWqiEfkAGqUUbc\n y/cK7YwkfdB7v6xqOF8FrMwYzqxV/9nJHfBF0aahUIVodRi2iNLdanGL5xPP1p5hjter\n xB+KGGYQOZAOXnW9zfWajaN0subBaUYeSjso9D5KIqkjm/fhjszSifdYnkTFDk8U7LwS\n Zj0A==",
        "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=Yjjkr1YnxL2KB4IBI4F2fu9HbkzAPcn+qP3R2xAE/XI=;\n b=NimiPdaeNax2JHRwajm/CFrKrmZ5zYWdJ/vVgQJakwQPuy48+QDlzfzOJT9PmidmBK\n siUqi7NoXH3+wYXQjDQ6pJx0vkgyNC0zGvX+0vv2ychF824LBIVOO8IMf9hCpzXw7CLq\n ps3vPdBTzNN7L8pTsiQxFASTvndcg1k7eG0T+vNBsKUi1nZHN9F6dWbVu4acpa06sv3M\n bSC/apYAIamNUlzg3/IRKsqiekETUmQFWKIwbkfnSjI2JAqIyBkZoFP82CTjZa3om8uZ\n Pzz00LJC0OQqmrroW14AvArC2OUXMyEAqnyBiQ71ctqI9kYprVKGOY0EHmERCi219IAP\n tRaQ==",
        "X-Gm-Message-State": "AOAM530zBvxiyOIHoDaV/198cQN+QKJKNKJUVNckx0Y6OCpSq7K9oo2j\n BFNfSezeoF3S9fnHdE4c9GuLXQ==",
        "X-Google-Smtp-Source": "\n ABdhPJwa1kygpNmkvPwAG/sIKefPb/2kXwl7LJZNYk7myFth+/lF8oyRKIOmMY8TGiUVJWcli1TYLA==",
        "X-Received": "by 2002:a5d:62c8:: with SMTP id o8mr44007959wrv.51.1608203812660;\n Thu, 17 Dec 2020 03:16:52 -0800 (PST)",
        "From": "Sarosh Arif <sarosh.arif@emumba.com>",
        "To": "sthemmin@microsoft.com",
        "Cc": "dev@dpdk.org,\n\tSarosh Arif <sarosh.arif@emumba.com>",
        "Date": "Thu, 17 Dec 2020 16:16:16 +0500",
        "Message-Id": "<20201217111616.24057-1-sarosh.arif@emumba.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20201130124533.23341-1-sarosh.arif@emumba.com>",
        "References": "<20201130124533.23341-1-sarosh.arif@emumba.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [v2 PATCH] usertools: show an error message if unable to\n\treserve requested hugepages",
        "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": "Sometimes the system is unable to reserve the requested hugepages because\nenough space is not available in the RAM. In that case, currently the\nscript displays no error message hence the user can be under the delusion\nthat the hugepages he requested are all successfully reserved. This patch\ndisplays an error message if the pages reserved are different from the\nrequested pages and shows the actual pages reserved.\n\n\nSigned-off-by: Sarosh Arif <sarosh.arif@emumba.com>\n---\nv2:\nuse a global variable SHOW_HUGEPAGES to remove linter warnings\n---\n usertools/dpdk-hugepages.py | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/usertools/dpdk-hugepages.py b/usertools/dpdk-hugepages.py\nindex 1be100ca3..83332c096 100755\n--- a/usertools/dpdk-hugepages.py\n+++ b/usertools/dpdk-hugepages.py\n@@ -16,6 +16,8 @@\n # systemd mount point for huge pages\n HUGE_MOUNT = \"/dev/hugepages\"\n \n+# show hugepages flag\n+SHOW_HUGEPAGES = False\n \n def fmt_memsize(kb):\n     '''Format memory size in kB into conventional format'''\n@@ -62,6 +64,10 @@ def set_hugepages(path, pages):\n         filename = os.path.basename(path)\n         size = filename[10:]\n         sys.exit('{} is not a valid system huge page size'.format(size))\n+    if get_hugepages(path) != pages:\n+        print(\"Unable to reserve required pages. The pages reserved are:\")\n+        global SHOW_HUGEPAGES\n+        SHOW_HUGEPAGES = True\n \n \n def show_numa_pages():\n@@ -233,6 +239,9 @@ def main():\n         metavar='SIZE',\n         help='setup huge pages by doing clear, unmount, reserve and mount')\n     args = parser.parse_args()\n+\n+    global SHOW_HUGEPAGES\n+    SHOW_HUGEPAGES = args.show\n \n     if args.setup:\n         args.clear = True\n@@ -260,7 +269,7 @@ def main():\n             int(reserve_kb / pagesize_kb), pagesize_kb, node=args.node)\n     if args.mount:\n         mount_huge(pagesize_kb, HUGE_MOUNT)\n-    if args.show:\n+    if SHOW_HUGEPAGES:\n         show_pages()\n         print()\n         show_mount()\n",
    "prefixes": [
        "v2"
    ]
}