get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42152,
    "url": "http://patches.dpdk.org/api/patches/42152/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1530619789-33337-4-git-send-email-alejandro.lucero@netronome.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": "<1530619789-33337-4-git-send-email-alejandro.lucero@netronome.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1530619789-33337-4-git-send-email-alejandro.lucero@netronome.com",
    "date": "2018-07-03T12:09:46",
    "name": "[v2,3/6] bus/pci: use IOVAs check when setting IOVA mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "db11594fb01b6e42e9cdc03b7308b11033a1ab23",
    "submitter": {
        "id": 270,
        "url": "http://patches.dpdk.org/api/people/270/?format=api",
        "name": "Alejandro Lucero",
        "email": "alejandro.lucero@netronome.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1530619789-33337-4-git-send-email-alejandro.lucero@netronome.com/mbox/",
    "series": [
        {
            "id": 371,
            "url": "http://patches.dpdk.org/api/series/371/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=371",
            "date": "2018-07-03T12:09:43",
            "name": "use IOVAs check based on DMA mask",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/371/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42152/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/42152/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 9E75B1BF00;\n\tTue,  3 Jul 2018 14:10:08 +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 102BA1BE3A;\n\tTue,  3 Jul 2018 14:09:57 +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\tw63C9raO033394; Tue, 3 Jul 2018 13:09:53 +0100",
            "(from alucero@localhost)\n\tby netronome.com (8.14.4/8.14.4/Submit) id w63C9rhm033393;\n\tTue, 3 Jul 2018 13:09:53 +0100"
        ],
        "From": "Alejandro Lucero <alejandro.lucero@netronome.com>",
        "To": "dev@dpdk.org",
        "Cc": "stable@dpdk.org, anatoly.burakov@intel.com, maxime.coquelin@redhat.com",
        "Date": "Tue,  3 Jul 2018 13:09:46 +0100",
        "Message-Id": "<1530619789-33337-4-git-send-email-alejandro.lucero@netronome.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1530619789-33337-1-git-send-email-alejandro.lucero@netronome.com>",
        "References": "<1530619789-33337-1-git-send-email-alejandro.lucero@netronome.com>",
        "Subject": "[dpdk-dev] [PATCH v2 3/6] bus/pci: use IOVAs check when setting\n\tIOVA mode",
        "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": "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, 11 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c\nindex 74deef3..792c819 100644\n--- a/drivers/bus/pci/linux/pci.c\n+++ b/drivers/bus/pci/linux/pci.c\n@@ -43,6 +43,7 @@\n #include <rte_devargs.h>\n #include <rte_memcpy.h>\n #include <rte_vfio.h>\n+#include <rte_memory.h>\n \n #include \"eal_private.h\"\n #include \"eal_filesystem.h\"\n@@ -613,10 +614,12 @@\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+\n+\tif (!rte_eal_check_dma_mask(mgaw))\n+\t\treturn true;\n+\telse\n \t\treturn false;\n \n-\treturn true;\n }\n #elif defined(RTE_ARCH_PPC_64)\n static bool\n@@ -640,13 +643,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) < 0)\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": [
        "v2",
        "3/6"
    ]
}