get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 964076,
    "url": "http://patchwork.ozlabs.org/api/patches/964076/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20180830185352.3369-9-logang@deltatee.com/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api",
        "name": "Linux PCI development",
        "link_name": "linux-pci",
        "list_id": "linux-pci.vger.kernel.org",
        "list_email": "linux-pci@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20180830185352.3369-9-logang@deltatee.com>",
    "list_archive_url": null,
    "date": "2018-08-30T18:53:47",
    "name": "[v5,08/13] IB/core: Ensure we map P2P memory correctly in rdma_rw_ctx_[init|destroy]()",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "5cf52a51df285c9136ab1a6cde0e639412f6a390",
    "submitter": {
        "id": 70191,
        "url": "http://patchwork.ozlabs.org/api/people/70191/?format=api",
        "name": "Logan Gunthorpe",
        "email": "logang@deltatee.com"
    },
    "delegate": {
        "id": 6763,
        "url": "http://patchwork.ozlabs.org/api/users/6763/?format=api",
        "username": "bhelgaas",
        "first_name": "Bjorn",
        "last_name": "Helgaas",
        "email": "bhelgaas@google.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20180830185352.3369-9-logang@deltatee.com/mbox/",
    "series": [
        {
            "id": 63352,
            "url": "http://patchwork.ozlabs.org/api/series/63352/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=63352",
            "date": "2018-08-30T18:53:41",
            "name": "Copy Offload in NVMe Fabrics with P2P PCI Memory",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/63352/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/964076/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/964076/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-pci-owner@vger.kernel.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=deltatee.com"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 421Wrk5fq8z9s0n\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 31 Aug 2018 04:55:02 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1728076AbeH3W6e (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 30 Aug 2018 18:58:34 -0400",
            "from ale.deltatee.com ([207.54.116.67]:40060 \"EHLO\n\tale.deltatee.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1727359AbeH3W5l (ORCPT <rfc822;linux-pci@vger.kernel.org>);\n\tThu, 30 Aug 2018 18:57:41 -0400",
            "from cgy1-donard.priv.deltatee.com ([172.16.1.31])\n\tby ale.deltatee.com with esmtps\n\t(TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89)\n\t(envelope-from <gunthorp@deltatee.com>)\n\tid 1fvS4t-0006On-Nd; Thu, 30 Aug 2018 12:54:02 -0600",
            "from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim\n\t4.89) (envelope-from <gunthorp@deltatee.com>)\n\tid 1fvS4o-0000tc-UC; Thu, 30 Aug 2018 12:53:54 -0600"
        ],
        "From": "Logan Gunthorpe <logang@deltatee.com>",
        "To": "linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,\n\tlinux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org,\n\tlinux-nvdimm@lists.01.org, linux-block@vger.kernel.org",
        "Cc": "Stephen Bates <sbates@raithlin.com>, Christoph Hellwig <hch@lst.de>,\n\tKeith Busch <keith.busch@intel.com>, Sagi Grimberg <sagi@grimberg.me>,\n\tBjorn Helgaas <bhelgaas@google.com>, Jason Gunthorpe <jgg@mellanox.com>, \n\tMax Gurtovoy <maxg@mellanox.com>,\n\tDan Williams <dan.j.williams@intel.com>, =?utf-8?b?SsOpcsO0bWUgR2xp?=\n\t=?utf-8?q?sse?= <jglisse@redhat.com>,\n\tBenjamin Herrenschmidt <benh@kernel.crashing.org>, Alex Williamson\n\t<alex.williamson@redhat.com>, =?utf-8?q?Christian_K=C3=B6nig?=\n\t<christian.koenig@amd.com>, Logan Gunthorpe <logang@deltatee.com>",
        "Date": "Thu, 30 Aug 2018 12:53:47 -0600",
        "Message-Id": "<20180830185352.3369-9-logang@deltatee.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20180830185352.3369-1-logang@deltatee.com>",
        "References": "<20180830185352.3369-1-logang@deltatee.com>",
        "X-SA-Exim-Connect-IP": "172.16.1.31",
        "X-SA-Exim-Rcpt-To": "linux-nvme@lists.infradead.org, linux-nvdimm@lists.01.org,\n\tlinux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,\n\tlinux-rdma@vger.kernel.org, linux-block@vger.kernel.org,\n\tsbates@raithlin.com, hch@lst.de, sagi@grimberg.me,\n\tbhelgaas@google.com, jgg@mellanox.com, maxg@mellanox.com,\n\tkeith.busch@intel.com, dan.j.williams@intel.com,\n\tbenh@kernel.crashing.org, jglisse@redhat.com,\n\talex.williamson@redhat.com, christian.koenig@amd.com,\n\tlogang@deltatee.com",
        "X-SA-Exim-Mail-From": "gunthorp@deltatee.com",
        "X-Spam-Checker-Version": "SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-6.7 required=5.0 tests=ALL_TRUSTED,BAYES_00,\n\tMYRULES_NO_TEXT autolearn=no autolearn_force=no version=3.4.1",
        "Subject": "[PATCH v5 08/13] IB/core: Ensure we map P2P memory correctly in\n\trdma_rw_ctx_[init|destroy]()",
        "X-SA-Exim-Version": "4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000)",
        "X-SA-Exim-Scanned": "Yes (on ale.deltatee.com)",
        "Sender": "linux-pci-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<linux-pci.vger.kernel.org>",
        "X-Mailing-List": "linux-pci@vger.kernel.org"
    },
    "content": "In order to use PCI P2P memory the pci_p2pmem_map_sg() function must be\ncalled to map the correct PCI bus address.\n\nTo do this, check the first page in the scatter list to see if it is P2P\nmemory or not. At the moment, scatter lists that contain P2P memory must\nbe homogeneous so if the first page is P2P the entire SGL should be P2P.\n\nSigned-off-by: Logan Gunthorpe <logang@deltatee.com>\nReviewed-by: Christoph Hellwig <hch@lst.de>\n---\n drivers/infiniband/core/rw.c | 11 +++++++++--\n 1 file changed, 9 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c\nindex 683e6d11a564..d22c4a2ebac6 100644\n--- a/drivers/infiniband/core/rw.c\n+++ b/drivers/infiniband/core/rw.c\n@@ -12,6 +12,7 @@\n  */\n #include <linux/moduleparam.h>\n #include <linux/slab.h>\n+#include <linux/pci-p2pdma.h>\n #include <rdma/mr_pool.h>\n #include <rdma/rw.h>\n \n@@ -280,7 +281,11 @@ int rdma_rw_ctx_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u8 port_num,\n \tstruct ib_device *dev = qp->pd->device;\n \tint ret;\n \n-\tret = ib_dma_map_sg(dev, sg, sg_cnt, dir);\n+\tif (is_pci_p2pdma_page(sg_page(sg)))\n+\t\tret = pci_p2pdma_map_sg(dev->dma_device, sg, sg_cnt, dir);\n+\telse\n+\t\tret = ib_dma_map_sg(dev, sg, sg_cnt, dir);\n+\n \tif (!ret)\n \t\treturn -ENOMEM;\n \tsg_cnt = ret;\n@@ -602,7 +607,9 @@ void rdma_rw_ctx_destroy(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u8 port_num,\n \t\tbreak;\n \t}\n \n-\tib_dma_unmap_sg(qp->pd->device, sg, sg_cnt, dir);\n+\t/* P2PDMA contexts do not need to be unmapped */\n+\tif (!is_pci_p2pdma_page(sg_page(sg)))\n+\t\tib_dma_unmap_sg(qp->pd->device, sg, sg_cnt, dir);\n }\n EXPORT_SYMBOL(rdma_rw_ctx_destroy);\n \n",
    "prefixes": [
        "v5",
        "08/13"
    ]
}