Show a patch.

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

{
    "id": 44050,
    "url": "http://patches.dpdk.org/api/patches/44050/",
    "web_url": "http://patches.dpdk.org/patch/44050/",
    "project": {
        "id": 1,
        "url": "http://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": "<1535642492-21831-4-git-send-email-alejandro.lucero@netronome.com>",
    "date": "2018-08-30T15:21:30",
    "name": "[3/5] bus/pci: use IOVAs check when setting IOVA mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "5aed03b0fa9cecaca4f0c56fbe99c8cb73d640a3",
    "submitter": {
        "id": 270,
        "url": "http://patches.dpdk.org/api/people/270/",
        "name": "Alejandro Lucero",
        "email": "alejandro.lucero@netronome.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/44050/mbox/",
    "series": [
        {
            "id": 1117,
            "url": "http://patches.dpdk.org/api/series/1117/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1117",
            "date": "2018-08-30T15:21:27",
            "name": "use IOVAs check based on DMA mask",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1117/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44050/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/44050/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<1535642492-21831-1-git-send-email-alejandro.lucero@netronome.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 1.9.1",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 99BE65323;\n\tThu, 30 Aug 2018 17:22:36 +0200 (CEST)",
            "from netronome.com (host-79-78-33-110.static.as9105.net\n\t[79.78.33.110]) by dpdk.org (Postfix) with ESMTP id 2F87C4CBD;\n\tThu, 30 Aug 2018 17:22:28 +0200 (CEST)",
            "from netronome.com (localhost [127.0.0.1])\n\tby netronome.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id\n\tw7UFLZIP021919; Thu, 30 Aug 2018 16:21:35 +0100",
            "(from alucero@localhost)\n\tby netronome.com (8.14.4/8.14.4/Submit) id w7UFLZXb021918;\n\tThu, 30 Aug 2018 16:21:35 +0100"
        ],
        "References": "<1535642492-21831-1-git-send-email-alejandro.lucero@netronome.com>",
        "Delivered-To": "patchwork@dpdk.org",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1535642492-21831-4-git-send-email-alejandro.lucero@netronome.com>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Precedence": "list",
        "From": "Alejandro Lucero <alejandro.lucero@netronome.com>",
        "X-Original-To": "patchwork@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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "dev@dpdk.org",
        "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>",
        "Date": "Thu, 30 Aug 2018 16:21:30 +0100",
        "Cc": "stable@dpdk.org",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH 3/5] bus/pci: use IOVAs check when setting IOVA\n\tmode"
    },
    "content": "Although VT-d emulation currently only supports 39 bits, it could\nbe iovas being within that supported range. This patch allows\nIOVA mode in such a case.\n\nIndeed, memory initialization code can be modified for using lower\nvirtual addresses than those used by the kernel for 64 bits processes\nby default, and therefore memsegs iovas can use 39 bits or less for\nmost system. And this is likely 100% true for VMs.\n\nSigned-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>\n---\n drivers/bus/pci/linux/pci.c | 15 ++++++++++-----\n 1 file changed, 10 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c\nindex 04648ac..215dc10 100644\n--- a/drivers/bus/pci/linux/pci.c\n+++ b/drivers/bus/pci/linux/pci.c\n@@ -588,10 +588,11 @@\n \tfclose(fp);\n \n \tmgaw = ((vtd_cap_reg & VTD_CAP_MGAW_MASK) >> VTD_CAP_MGAW_SHIFT) + 1;\n-\tif (mgaw < X86_VA_WIDTH)\n-\t\treturn false;\n \n-\treturn true;\n+\tif (!rte_eal_check_dma_mask(mgaw))\n+\t\treturn true;\n+\telse\n+\t\treturn false;\n }\n #elif defined(RTE_ARCH_PPC_64)\n static bool\n@@ -615,13 +616,17 @@\n {\n \tstruct rte_pci_device *dev = NULL;\n \tstruct rte_pci_driver *drv = NULL;\n+\tint iommu_dma_mask_check_done = 0;\n \n \tFOREACH_DRIVER_ON_PCIBUS(drv) {\n \t\tFOREACH_DEVICE_ON_PCIBUS(dev) {\n \t\t\tif (!rte_pci_match(drv, dev))\n \t\t\t\tcontinue;\n-\t\t\tif (!pci_one_device_iommu_support_va(dev))\n-\t\t\t\treturn false;\n+\t\t\tif (!iommu_dma_mask_check_done) {\n+\t\t\t\tif (!pci_one_device_iommu_support_va(dev))\n+\t\t\t\t\treturn false;\n+\t\t\t\tiommu_dma_mask_check_done  = 1;\n+\t\t\t}\n \t\t}\n \t}\n \treturn true;\n",
    "prefixes": [
        "3/5"
    ]
}