get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 32474,
    "url": "https://patches.dpdk.org/api/patches/32474/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/4d6dbd867adc051a3cf444d365c2aae604821f77.1513681966.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<4d6dbd867adc051a3cf444d365c2aae604821f77.1513681966.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/4d6dbd867adc051a3cf444d365c2aae604821f77.1513681966.git.anatoly.burakov@intel.com",
    "date": "2017-12-19T11:14:50",
    "name": "[dpdk-dev,RFC,v2,23/23] eal: map/unmap memory with VFIO when alloc/free pages",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cd7af49c01817a7b85ce9920c4aa9c0b948ecac9",
    "submitter": {
        "id": 4,
        "url": "https://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/4d6dbd867adc051a3cf444d365c2aae604821f77.1513681966.git.anatoly.burakov@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/32474/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/32474/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 4D9721B228;\n\tTue, 19 Dec 2017 12:15:34 +0100 (CET)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 77E221D7\n\tfor <dev@dpdk.org>; Tue, 19 Dec 2017 12:14:57 +0100 (CET)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Dec 2017 03:14:56 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga006.jf.intel.com with ESMTP; 19 Dec 2017 03:14:54 -0800",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tvBJBEr7c003157; Tue, 19 Dec 2017 11:14:53 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id vBJBErJY010348;\n\tTue, 19 Dec 2017 11:14:53 GMT",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id vBJBErCp010344;\n\tTue, 19 Dec 2017 11:14:53 GMT"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.45,426,1508828400\"; d=\"scan'208\";a=\"4054829\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "andras.kovacs@ericsson.com, laszlo.vadkeri@ericsson.com,\n\tkeith.wiles@intel.com, benjamin.walker@intel.com,\n\tbruce.richardson@intel.com, thomas@monjalon.net",
        "Date": "Tue, 19 Dec 2017 11:14:50 +0000",
        "Message-Id": "<4d6dbd867adc051a3cf444d365c2aae604821f77.1513681966.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1513681966.git.anatoly.burakov@intel.com>",
            "<cover.1513681966.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1513681966.git.anatoly.burakov@intel.com>",
            "<cover.1513681966.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [RFC v2 23/23] eal: map/unmap memory with VFIO when\n\talloc/free pages",
        "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/linuxapp/eal/eal_memalloc.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c\nindex 13172a0..8b3f219 100755\n--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c\n@@ -61,6 +61,7 @@\n #include <rte_eal_memconfig.h>\n #include <rte_eal.h>\n #include <rte_memory.h>\n+#include <rte_iommu.h>\n \n #include \"eal_filesystem.h\"\n #include \"eal_internal_cfg.h\"\n@@ -259,6 +260,11 @@ alloc_page(struct rte_memseg *ms, void *addr, uint64_t size, int socket_id,\n \tms->iova = iova;\n \tms->socket_id = socket_id;\n \n+\t/* map the segment so that VFIO has access to it */\n+\tif (rte_iommu_dma_map(ms->addr_64, iova, size)) {\n+\t\tRTE_LOG(DEBUG, EAL, \"Cannot register segment with VFIO\\n\");\n+\t}\n+\n \tgoto out;\n \n mapped:\n@@ -295,6 +301,11 @@ free_page(struct rte_memseg *ms, struct hugepage_info *hi, unsigned list_idx,\n \t\t\t\tlist_idx * RTE_MAX_MEMSEG_PER_LIST + seg_idx);\n \t}\n \n+\t/* unmap the segment from VFIO */\n+\tif (rte_iommu_dma_unmap(ms->addr_64, ms->iova, ms->len)) {\n+\t\tRTE_LOG(DEBUG, EAL, \"Cannot unregister segment with VFIO\\n\");\n+\t}\n+\n \tmunmap(ms->addr, ms->hugepage_sz);\n \n \t// TODO: race condition?\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "v2",
        "23/23"
    ]
}