get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 71728,
    "url": "http://patches.dpdk.org/api/patches/71728/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200618135049.489773-5-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200618135049.489773-5-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200618135049.489773-5-bruce.richardson@intel.com",
    "date": "2020-06-18T13:50:49",
    "name": "[4/4] eal: cache last directory permissions checked",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "738f0aeba82e8e43c7002f8e191642b43db3d6d4",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200618135049.489773-5-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 10501,
            "url": "http://patches.dpdk.org/api/series/10501/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10501",
            "date": "2020-06-18T13:50:45",
            "name": "improve runtime loading of shared drivers",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/10501/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/71728/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/71728/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 C1092A04A5;\n\tThu, 18 Jun 2020 15:51:37 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D293E1BF7D;\n\tThu, 18 Jun 2020 15:51:17 +0200 (CEST)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id 57A461BF72\n for <dev@dpdk.org>; Thu, 18 Jun 2020 15:51:15 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Jun 2020 06:51:14 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.84])\n by fmsmga006.fm.intel.com with ESMTP; 18 Jun 2020 06:51:13 -0700"
        ],
        "IronPort-SDR": [
            "\n D0KMl0wqfyM2aCQsJhpUdn4ahBQ7CC2nAptn7EwQBgPTIjyuJM+Xc4F4SpSF1xaZCQlZlllAlQ\n RbmKaIwXCIyQ==",
            "\n GY7IWhlR9SNFBVILeABocNHN6Iv+dM/jSnY69wgwflJbCs2NGExdCTno4cDnYrLTtEeEaB5Lef\n HrxLgXScQFxA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9655\"; a=\"204065810\"",
            "E=Sophos;i=\"5.73,526,1583222400\"; d=\"scan'208\";a=\"204065810\"",
            "E=Sophos;i=\"5.73,526,1583222400\"; d=\"scan'208\";a=\"477200748\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, david.marchand@redhat.com,\n Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu, 18 Jun 2020 14:50:49 +0100",
        "Message-Id": "<20200618135049.489773-5-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200618135049.489773-1-bruce.richardson@intel.com>",
        "References": "<20200618135049.489773-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 4/4] eal: cache last directory permissions checked",
        "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": "When loading a directory of drivers, we check the same hierarchy multiple\ntimes. If we just cache the last directory checked, this avoids repeated\nchecks of the same path, since all drivers in that path have been added to\nthe list consecutively.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/librte_eal/common/eal_common_options.c | 11 +++++++++--\n 1 file changed, 9 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 2a62a1342..0901b493c 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -384,11 +384,18 @@ verify_perms(const char *dirpath)\n \n \t/* if not root, check down one level first */\n \tif (strcmp(dirpath, \"/\") != 0) {\n+\t\tstatic __thread char last_dir_checked[PATH_MAX];\n \t\tchar copy[PATH_MAX];\n+\t\tconst char *dir;\n \n \t\tstrlcpy(copy, dirpath, PATH_MAX);\n-\t\tif (verify_perms(dirname(copy)) != 0)\n-\t\t\treturn -1;\n+\t\tdir = dirname(copy);\n+\t\tif (strncmp(dir, last_dir_checked, PATH_MAX) != 0) {\n+\t\t\tif (verify_perms(dir) != 0)\n+\t\t\t\treturn -1;\n+\t\t\telse\n+\t\t\t\tstrlcpy(last_dir_checked, dir, PATH_MAX);\n+\t\t}\n \t}\n \n \t/* call stat to check for permissions and ensure not world writable */\n",
    "prefixes": [
        "4/4"
    ]
}