get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53916,
    "url": "http://patchwork.dpdk.org/api/patches/53916/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190530174819.1160221-2-benjamin.walker@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": "<20190530174819.1160221-2-benjamin.walker@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190530174819.1160221-2-benjamin.walker@intel.com",
    "date": "2019-05-30T17:48:08",
    "name": "[01/12] eal: Make rte_eal_using_phys_addrs work sooner",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2615a411763dd7c00acdfc1484c7179333f8a61a",
    "submitter": {
        "id": 487,
        "url": "http://patchwork.dpdk.org/api/people/487/?format=api",
        "name": "Walker, Benjamin",
        "email": "benjamin.walker@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190530174819.1160221-2-benjamin.walker@intel.com/mbox/",
    "series": [
        {
            "id": 4830,
            "url": "http://patchwork.dpdk.org/api/series/4830/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=4830",
            "date": "2019-05-30T17:48:13",
            "name": "[01/12] eal: Make rte_eal_using_phys_addrs work sooner",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/4830/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/53916/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/53916/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5335D1B94A;\n\tThu, 30 May 2019 19:48:35 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id A54722B9A\n\tfor <dev@dpdk.org>; Thu, 30 May 2019 19:48:28 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 May 2019 10:48:27 -0700",
            "from bwalker-desk.ch.intel.com ([143.182.136.145])\n\tby fmsmga002.fm.intel.com with ESMTP; 30 May 2019 10:48:26 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,532,1549958400\"; d=\"scan'208\";a=\"180020076\"",
        "From": "Ben Walker <benjamin.walker@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Ben Walker <benjamin.walker@intel.com>",
        "Date": "Thu, 30 May 2019 10:48:08 -0700",
        "Message-Id": "<20190530174819.1160221-2-benjamin.walker@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190530174819.1160221-1-benjamin.walker@intel.com>",
        "References": "<20190530174819.1160221-1-benjamin.walker@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 01/12] eal: Make rte_eal_using_phys_addrs work\n\tsooner",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This function only returned the correct answer after\na call to initialize the memory subsystem. Make it work\nprior to that.\n\nSigned-off-by: Ben Walker <benjamin.walker@intel.com>\nChange-Id: I8f3c5128fbf5da884a956bbcc72c5a13564825d5\n---\n lib/librte_eal/linux/eal/eal_memory.c | 63 ++++++++++++---------------\n 1 file changed, 28 insertions(+), 35 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c\nindex 416dad898..0c07bb946 100644\n--- a/lib/librte_eal/linux/eal/eal_memory.c\n+++ b/lib/librte_eal/linux/eal/eal_memory.c\n@@ -66,34 +66,8 @@\n  * zone as well as a physical contiguous zone.\n  */\n \n-static bool phys_addrs_available = true;\n-\n #define RANDOMIZE_VA_SPACE_FILE \"/proc/sys/kernel/randomize_va_space\"\n \n-static void\n-test_phys_addrs_available(void)\n-{\n-\tuint64_t tmp = 0;\n-\tphys_addr_t physaddr;\n-\n-\tif (!rte_eal_has_hugepages()) {\n-\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\"Started without hugepages support, physical addresses not available\\n\");\n-\t\tphys_addrs_available = false;\n-\t\treturn;\n-\t}\n-\n-\tphysaddr = rte_mem_virt2phy(&tmp);\n-\tif (physaddr == RTE_BAD_PHYS_ADDR) {\n-\t\tif (rte_eal_iova_mode() == RTE_IOVA_PA)\n-\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\"Cannot obtain physical addresses: %s. \"\n-\t\t\t\t\"Only vfio will function.\\n\",\n-\t\t\t\tstrerror(errno));\n-\t\tphys_addrs_available = false;\n-\t}\n-}\n-\n /*\n  * Get physical address of any mapped virtual address in the current process.\n  */\n@@ -107,7 +81,7 @@ rte_mem_virt2phy(const void *virtaddr)\n \toff_t offset;\n \n \t/* Cannot parse /proc/self/pagemap, no need to log errors everywhere */\n-\tif (!phys_addrs_available)\n+\tif (!rte_eal_using_phys_addrs())\n \t\treturn RTE_BAD_IOVA;\n \n \t/* standard page size */\n@@ -1336,8 +1310,6 @@ eal_legacy_hugepage_init(void)\n \tint nr_hugefiles, nr_hugepages = 0;\n \tvoid *addr;\n \n-\ttest_phys_addrs_available();\n-\n \tmemset(used_hp, 0, sizeof(used_hp));\n \n \t/* get pointer to global configuration */\n@@ -1516,7 +1488,7 @@ eal_legacy_hugepage_init(void)\n \t\t\t\tcontinue;\n \t\t}\n \n-\t\tif (phys_addrs_available &&\n+\t\tif (rte_eal_using_phys_addrs() &&\n \t\t\t\trte_eal_iova_mode() != RTE_IOVA_VA) {\n \t\t\t/* find physical addresses for each hugepage */\n \t\t\tif (find_physaddrs(&tmp_hp[hp_offset], hpi) < 0) {\n@@ -1735,8 +1707,6 @@ eal_hugepage_init(void)\n \tuint64_t memory[RTE_MAX_NUMA_NODES];\n \tint hp_sz_idx, socket_id;\n \n-\ttest_phys_addrs_available();\n-\n \tmemset(used_hp, 0, sizeof(used_hp));\n \n \tfor (hp_sz_idx = 0;\n@@ -1879,8 +1849,6 @@ eal_legacy_hugepage_attach(void)\n \t\t\t\t\"into secondary processes\\n\");\n \t}\n \n-\ttest_phys_addrs_available();\n-\n \tfd_hugepage = open(eal_hugepage_data_path(), O_RDONLY);\n \tif (fd_hugepage < 0) {\n \t\tRTE_LOG(ERR, EAL, \"Could not open %s\\n\",\n@@ -2020,7 +1988,32 @@ rte_eal_hugepage_attach(void)\n int\n rte_eal_using_phys_addrs(void)\n {\n-\treturn phys_addrs_available;\n+\tstatic int using_phys_addrs = -1;\n+\tuint64_t tmp = 0;\n+\tphys_addr_t physaddr;\n+\n+\tif (using_phys_addrs != -1)\n+\t\treturn using_phys_addrs;\n+\n+\t/* Set the default to 1 */\n+\tusing_phys_addrs = 1;\n+\n+\tif (!rte_eal_has_hugepages()) {\n+\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\"Started without hugepages support, physical addresses not available\\n\");\n+\t\tusing_phys_addrs = 0;\n+\t\treturn using_phys_addrs;\n+\t}\n+\n+\tphysaddr = rte_mem_virt2phy(&tmp);\n+\tif (physaddr == RTE_BAD_PHYS_ADDR) {\n+\t\tif (rte_eal_iova_mode() == RTE_IOVA_PA)\n+\t\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\t\"Cannot obtain physical addresses. Only vfio will function.\\n\");\n+\t\tusing_phys_addrs = 0;\n+\t}\n+\n+\treturn using_phys_addrs;\n }\n \n static int __rte_unused\n",
    "prefixes": [
        "01/12"
    ]
}