get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53924,
    "url": "http://patchwork.dpdk.org/api/patches/53924/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190530174819.1160221-13-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-13-benjamin.walker@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190530174819.1160221-13-benjamin.walker@intel.com",
    "date": "2019-05-30T17:48:19",
    "name": "[12/12] eal: If bus can't decide PA or VA, try to access PA",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "56b20bc28a88f4b343362a8c03062112a1782087",
    "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-13-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/53924/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/53924/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 A1B4D1B9A4;\n\tThu, 30 May 2019 19:48:50 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id E095E1B945\n\tfor <dev@dpdk.org>; Thu, 30 May 2019 19:48:29 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 May 2019 10:48:28 -0700",
            "from bwalker-desk.ch.intel.com ([143.182.136.145])\n\tby fmsmga002.fm.intel.com with ESMTP; 30 May 2019 10:48:28 -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=\"180020118\"",
        "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:19 -0700",
        "Message-Id": "<20190530174819.1160221-13-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 12/12] eal: If bus can't decide PA or VA,\n\ttry to access PA",
        "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": "If the bus can't determine a preference for IOVA_PA vs.\nIOVA_VA by looking at the devices and drivers, as a\nlast resort test if physical addresses are even accessible\nin /proc/self/pagemap. If they are, use IOVA_PA. If they\nare not, use IOVA_VA.\n\nChange-Id: If1eeb723283b80b24bd973987054fdad62f59cbd\n---\n lib/librte_eal/common/eal_common_bus.c |  4 ----\n lib/librte_eal/linux/eal/eal.c         | 28 +++++++++++++++++++-------\n 2 files changed, 21 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c\nindex c8f1901f0..77f1be1b4 100644\n--- a/lib/librte_eal/common/eal_common_bus.c\n+++ b/lib/librte_eal/common/eal_common_bus.c\n@@ -237,10 +237,6 @@ rte_bus_get_iommu_class(void)\n \t\t\tmode |= bus->get_iommu_class();\n \t}\n \n-\tif (mode != RTE_IOVA_VA) {\n-\t\t/* Use default IOVA mode */\n-\t\tmode = RTE_IOVA_PA;\n-\t}\n \treturn mode;\n }\n \ndiff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c\nindex 161399619..283aae120 100644\n--- a/lib/librte_eal/linux/eal/eal.c\n+++ b/lib/librte_eal/linux/eal/eal.c\n@@ -948,6 +948,7 @@ rte_eal_init(int argc, char **argv)\n \tstatic char logid[PATH_MAX];\n \tchar cpuset[RTE_CPU_AFFINITY_STR_LEN];\n \tchar thread_name[RTE_MAX_THREAD_NAME_LEN];\n+\tenum rte_iova_mode iova_mode;\n \n \t/* checks if the machine is adequate */\n \tif (!rte_cpu_is_supported()) {\n@@ -1037,18 +1038,31 @@ rte_eal_init(int argc, char **argv)\n \n \t/* if no EAL option \"--iova-mode=<pa|va>\", use bus IOVA scheme */\n \tif (internal_config.iova_mode == RTE_IOVA_DC) {\n-\t\t/* autodetect the IOVA mapping mode (default is RTE_IOVA_PA) */\n-\t\trte_eal_get_configuration()->iova_mode =\n-\t\t\trte_bus_get_iommu_class();\n+\t\t/* autodetect the IOVA mapping mode */\n+\t\tiova_mode = rte_bus_get_iommu_class();\n \n \t\t/* Workaround for KNI which requires physical address to work */\n-\t\tif (rte_eal_get_configuration()->iova_mode == RTE_IOVA_VA &&\n+\t\tif (iova_mode == RTE_IOVA_VA &&\n \t\t\t\trte_eal_check_module(\"rte_kni\") == 1) {\n-\t\t\trte_eal_get_configuration()->iova_mode = RTE_IOVA_PA;\n+\t\t\tiova_mode = RTE_IOVA_PA;\n \t\t\tRTE_LOG(WARNING, EAL,\n-\t\t\t\t\"Some devices want IOVA as VA but PA will be used because.. \"\n-\t\t\t\t\"KNI module inserted\\n\");\n+\t\t\t\t\"Some devices want IOVA as VA but PA will be\"\n+\t\t\t\t\" used because KNI module inserted\\n\");\n+\t\t}\n+\n+\t\tif (iova_mode == RTE_IOVA_DC) {\n+\t\t\t/* If the bus doesn't care, check if physical addresses are\n+\t\t\t * accessible. */\n+\t\t\tif (rte_eal_using_phys_addrs()) {\n+\t\t\t\t/* Physical addresses are available, so the safest\n+\t\t\t\t * choice is to use those. */\n+\t\t\t\tiova_mode = RTE_IOVA_PA;\n+\t\t\t} else {\n+\t\t\t\tiova_mode = RTE_IOVA_VA;\n+\t\t\t}\n \t\t}\n+\n+\t\trte_eal_get_configuration()->iova_mode = iova_mode;\n \t} else {\n \t\trte_eal_get_configuration()->iova_mode =\n \t\t\tinternal_config.iova_mode;\n",
    "prefixes": [
        "12/12"
    ]
}