Show a patch.

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

{
    "id": 73561,
    "url": "https://patches.dpdk.org/api/patches/73561/",
    "web_url": "https://patches.dpdk.org/patch/73561/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20200708214843.3080-1-dmitry.kozliuk@gmail.com>",
    "date": "2020-07-08T21:48:43",
    "name": "[v2] eal/windows: detect insufficient privileges for hugepages",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ce1be389ee0ea9d248de8a245f4232626cdbfda8",
    "submitter": {
        "id": 1581,
        "url": "https://patches.dpdk.org/api/people/1581/",
        "name": "Dmitry Kozlyuk",
        "email": "dmitry.kozliuk@gmail.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/patch/73561/mbox/",
    "series": [
        {
            "id": 10900,
            "url": "https://patches.dpdk.org/api/series/10900/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10900",
            "date": "2020-07-08T21:48:43",
            "name": "[v2] eal/windows: detect insufficient privileges for hugepages",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/10900/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73561/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/73561/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "Date": "Thu,  9 Jul 2020 00:48:43 +0300",
        "In-Reply-To": "<20200707202203.8780-1-dmitry.kozliuk@gmail.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 2.25.4",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7BCA8A0526;\n\tWed,  8 Jul 2020 23:49:04 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C30BE1E534;\n\tWed,  8 Jul 2020 23:49:03 +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 909531E4EE\n for <dev@dpdk.org>; Wed,  8 Jul 2020 23:49:02 +0200 (CEST)",
            "by mail-lj1-f193.google.com with SMTP id h19so56000689ljg.13\n for <dev@dpdk.org>; Wed, 08 Jul 2020 14:49:02 -0700 (PDT)",
            "from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru.\n [37.110.65.23])\n by smtp.gmail.com with ESMTPSA id x16sm300032lfc.76.2020.07.08.14.49.00\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 08 Jul 2020 14:49:00 -0700 (PDT)"
        ],
        "References": "<20200707202203.8780-1-dmitry.kozliuk@gmail.com>",
        "X-Google-Smtp-Source": "\n ABdhPJw5nJP04GUwKwQUphJceaOYCu6ZpjOXsb3ssXYNzfRfOZ9rR9tE33Rd78U7jlEiR0JeG666vA==",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=IuHGwqkiYYLN5EW1JBKcPuwEK1JR7nTMvB9gA6BUOLo=;\n b=im+7MylA3flro3FID7FdfmochYSq13tOW88d0VeWOW4GBpo6crbDda6wn+EF75gdQA\n FpdTlXvSUraJN6WV9cdHaetDT8DADuqKyVVgewM4tgHC1ZKok+qrOCDSVDIaBNH8720V\n uXN/9hBhEBbaN7uKetqJK9eWa34ltvtJ6MmsRdcrIee2TZv7wgE6lrkqeproW7Krj5A/\n 85s4JoB62vOygEjfRty12hNxDT/hMzCA+FHTBVvB8y8CxPoolvjmb648wkui9kykuWKF\n yp3QtvgmBBeHNVuTCEKIvBEfUdKU03eZ0fS0TYy4jsKcvlqU0kFxQhgp9iLC90l9mGLs\n +StQ==",
        "MIME-Version": "1.0",
        "X-Received": "by 2002:a2e:8807:: with SMTP id x7mr21164023ljh.21.1594244941675;\n Wed, 08 Jul 2020 14:49:01 -0700 (PDT)",
        "Message-Id": "<20200708214843.3080-1-dmitry.kozliuk@gmail.com>",
        "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=IuHGwqkiYYLN5EW1JBKcPuwEK1JR7nTMvB9gA6BUOLo=;\n b=JGQksL4x37XjPGa8nwaYS3m8IfaBWL49yjyA/+XCtcSq8lXzL4pSYSMgEjDgbqJocY\n o0a+QlCCnLlivhD27BiWe5MHWidFpNhlBiVPVO4+3faKtooR3c+rk7th6/lpzw+W4oir\n tDjiP0Za2qelphw/DxPzlTpfA34DbTJeML5Bv/i1Fr3RjLC2f6sMLHPVOho8lpFWoX/t\n SsI3gBJ5dMuj/0qiayZ7IIIfCFCZ2hNyb+hY1F3F/ZRRQZR7FIG3pF/Zhj4ccxKz0QbW\n 1ldlxkOx4EF12k//+u2HblYCOzUgYTHox+tF60h65YzvrXHqqOoZfYlTWNDejRXFfRRc\n OuSA==",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Content-Transfer-Encoding": "8bit",
        "From": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@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>",
        "To": "dev@dpdk.org",
        "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>",
        "X-BeenThere": "dev@dpdk.org",
        "X-Gm-Message-State": "AOAM532OohWGUbPKd/LJjhCVCy+GregSzMZMWogp/1lXWu0S7NBgB7AY\n MKOBcfl6p/nB4qNNSr/3VnIYSJystD6FJw==",
        "Cc": "Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,\n Ranjit Menon <ranjit.menon@intel.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>,\n Tal Shnaiderman <talshn@mellanox.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v2] eal/windows: detect insufficient privileges\n\tfor hugepages"
    },
    "content": "AdjustTokenPrivileges() succeeds even if no requested privileges have\nbeen granted; this behavior is documented. Check last error code in\naddition to return value to detect such case.\n\nMake error messages more specific and add troubleshooting hint.\n\nSigned-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\n\nv2:\n    Improve error reporting (Tal Shnaiderman).\n\n lib/librte_eal/windows/eal_hugepages.c | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/windows/eal_hugepages.c b/lib/librte_eal/windows/eal_hugepages.c\nindex 5779cd325..7f8a7dfca 100644\n--- a/lib/librte_eal/windows/eal_hugepages.c\n+++ b/lib/librte_eal/windows/eal_hugepages.c\n@@ -41,6 +41,10 @@ hugepage_claim_privilege(void)\n \t\tgoto exit;\n \t}\n \n+\t/* AdjustTokenPrivileges() may succeed with ERROR_NOT_ALL_ASSIGNED. */\n+\tif (GetLastError() != ERROR_SUCCESS)\n+\t\tgoto exit;\n+\n \tret = 0;\n \n exit:\n@@ -98,12 +102,14 @@ int\n eal_hugepage_info_init(void)\n {\n \tif (hugepage_claim_privilege() < 0) {\n-\t\tRTE_LOG(ERR, EAL, \"Cannot claim hugepage privilege\\n\");\n+\t\tRTE_LOG(ERR, EAL, \"Cannot claim hugepage privilege\\n\"\n+\t\t\t\"Verify that large-page support privilege \"\n+\t\t\t\"is assigned to the current user\\n\");\n \t\treturn -1;\n \t}\n \n \tif (hugepage_info_init() < 0) {\n-\t\tRTE_LOG(ERR, EAL, \"Cannot get hugepage information\\n\");\n+\t\tRTE_LOG(ERR, EAL, \"Cannot discover available hugepages\\n\");\n \t\treturn -1;\n \t}\n \n",
    "prefixes": [
        "v2"
    ]
}