get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74234,
    "url": "http://patchwork.dpdk.org/api/patches/74234/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/cdb0d6482a5c3a5d7d23625d230d9ef41d657320.1594903876.git.wangyunjian@huawei.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": "<cdb0d6482a5c3a5d7d23625d230d9ef41d657320.1594903876.git.wangyunjian@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/cdb0d6482a5c3a5d7d23625d230d9ef41d657320.1594903876.git.wangyunjian@huawei.com",
    "date": "2020-07-16T13:38:09",
    "name": "[1/1] eal/linux: do not create user mem map repeatedly when it exists",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "368bf248b58c799467b24623ed2dba89dd9fa1cb",
    "submitter": {
        "id": 551,
        "url": "http://patchwork.dpdk.org/api/people/551/?format=api",
        "name": "Yunjian Wang",
        "email": "wangyunjian@huawei.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/cdb0d6482a5c3a5d7d23625d230d9ef41d657320.1594903876.git.wangyunjian@huawei.com/mbox/",
    "series": [
        {
            "id": 11095,
            "url": "http://patchwork.dpdk.org/api/series/11095/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=11095",
            "date": "2020-07-16T13:38:09",
            "name": "[1/1] eal/linux: do not create user mem map repeatedly when it exists",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/11095/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/74234/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/74234/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A8B2CA054B;\n\tThu, 16 Jul 2020 15:38:45 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 374301D557;\n\tThu, 16 Jul 2020 15:38:44 +0200 (CEST)",
            "from huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by dpdk.org (Postfix) with ESMTP id E40231D526;\n Thu, 16 Jul 2020 15:38:39 +0200 (CEST)",
            "from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58])\n by Forcepoint Email with ESMTP id 915F35F092CE6B63138D;\n Thu, 16 Jul 2020 21:38:33 +0800 (CST)",
            "from localhost (10.174.185.168) by DGGEMS406-HUB.china.huawei.com\n (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Thu, 16 Jul 2020\n 21:38:27 +0800"
        ],
        "From": "wangyunjian <wangyunjian@huawei.com>",
        "To": "<dev@dpdk.org>, <david.marchand@redhat.com>",
        "CC": "<jerry.lilijun@huawei.com>, <xudingke@huawei.com>, Yunjian Wang\n <wangyunjian@huawei.com>, <stable@dpdk.org>",
        "Date": "Thu, 16 Jul 2020 21:38:09 +0800",
        "Message-ID": "\n <cdb0d6482a5c3a5d7d23625d230d9ef41d657320.1594903876.git.wangyunjian@huawei.com>",
        "X-Mailer": "git-send-email 1.9.5.msysgit.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.174.185.168]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH 1/1] eal/linux: do not create user mem map\n\trepeatedly when it exists",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Yunjian Wang <wangyunjian@huawei.com>\n\nCurrently, we will create new user mem map entry for the same memory\nsegment, but in fact it has already been added to the user mem maps.\nIt's not necessary to create it twice.\n\nFixes: 0cbce3a167f1 (\"vfio: skip DMA map failure if already mapped\")\nCc: stable@dpdk.org\n\nSigned-off-by: Yunjian Wang <wangyunjian@huawei.com>\n---\n lib/librte_eal/linux/eal_vfio.c | 7 +++++++\n 1 file changed, 7 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c\nindex abb12a354..d8a8c39ab 100644\n--- a/lib/librte_eal/linux/eal_vfio.c\n+++ b/lib/librte_eal/linux/eal_vfio.c\n@@ -1828,6 +1828,13 @@ container_dma_map(struct vfio_config *vfio_cfg, uint64_t vaddr, uint64_t iova,\n \t\tret = -1;\n \t\tgoto out;\n \t}\n+\n+\t/* we don't need create new user mem map entry\n+\t * for the same memory segment.\n+\t */\n+\tif (errno == EBUSY || errno == EEXIST)\n+\t\tgoto out;\n+\n \t/* create new user mem map entry */\n \tnew_map = &user_mem_maps->maps[user_mem_maps->n_maps++];\n \tnew_map->addr = vaddr;\n",
    "prefixes": [
        "1/1"
    ]
}