Show a patch.

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

{
    "id": 74687,
    "url": "https://patches.dpdk.org/api/patches/74687/",
    "web_url": "https://patches.dpdk.org/patch/74687/",
    "project": {
        "id": 1,
        "url": "https://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": "<1595515713-24640-1-git-send-email-wangyunjian@huawei.com>",
    "date": "2020-07-23T14:48:33",
    "name": "[v2] eal/linux: do not create user mem map repeatedly when it exists",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "67aef0401b904b3c92f3c71148fd80ed303bbf7c",
    "submitter": {
        "id": 551,
        "url": "https://patches.dpdk.org/api/people/551/",
        "name": "wangyunjian",
        "email": "wangyunjian@huawei.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74687/mbox/",
    "series": [
        {
            "id": 11257,
            "url": "https://patches.dpdk.org/api/series/11257/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11257",
            "date": "2020-07-23T14:48:33",
            "name": "[v2] eal/linux: do not create user mem map repeatedly when it exists",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/11257/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74687/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74687/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "CC": "<jerry.lilijun@huawei.com>, <xudingke@huawei.com>, Yunjian Wang\n <wangyunjian@huawei.com>, <stable@dpdk.org>",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "MIME-Version": "1.0",
        "References": "\n <cdb0d6482a5c3a5d7d23625d230d9ef41d657320.1594903876.git.wangyunjian@huawei.com>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v2] eal/linux: do not create user mem map\n\trepeatedly when it exists",
        "Content-Type": "text/plain",
        "From": "wangyunjian <wangyunjian@huawei.com>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C3440A0521;\n\tThu, 23 Jul 2020 16:48:51 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1C0051BF7B;\n\tThu, 23 Jul 2020 16:48:51 +0200 (CEST)",
            "from huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by dpdk.org (Postfix) with ESMTP id 2C268E07;\n Thu, 23 Jul 2020 16:48:48 +0200 (CEST)",
            "from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60])\n by Forcepoint Email with ESMTP id 8BC26A299DF5D2E1A726;\n Thu, 23 Jul 2020 22:48:46 +0800 (CST)",
            "from localhost (10.174.185.168) by DGGEMS407-HUB.china.huawei.com\n (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Thu, 23 Jul 2020\n 22:48:39 +0800"
        ],
        "X-Originating-IP": "[10.174.185.168]",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Mailer": "git-send-email 1.9.5.msysgit.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-CFilter-Loop": "Reflected",
        "Message-ID": "<1595515713-24640-1-git-send-email-wangyunjian@huawei.com>",
        "Date": "Thu, 23 Jul 2020 22:48:33 +0800",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "To": "<dev@dpdk.org>, <david.marchand@redhat.com>, <anatoly.burakov@intel.com>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "In-Reply-To": "\n <cdb0d6482a5c3a5d7d23625d230d9ef41d657320.1594903876.git.wangyunjian@huawei.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Return-Path": "<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\nTo resolve the issue, add support to remove the same entry in the\nfunction compact_user_maps().\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---\nv2:\n* Remove the same entry in the function compact_user_maps()\n---\n lib/librte_eal/linux/eal_vfio.c | 5 +++++\n 1 file changed, 5 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c\nindex abb12a354..df99307b7 100644\n--- a/lib/librte_eal/linux/eal_vfio.c\n+++ b/lib/librte_eal/linux/eal_vfio.c\n@@ -167,6 +167,10 @@ adjust_map(struct user_mem_map *src, struct user_mem_map *end,\n static int\n merge_map(struct user_mem_map *left, struct user_mem_map *right)\n {\n+\t/* merge the same maps into one */\n+\tif (memcmp(left, right, sizeof(struct user_mem_map)) == 0)\n+\t\tgoto out;\n+\n \tif (left->addr + left->len != right->addr)\n \t\treturn 0;\n \tif (left->iova + left->len != right->iova)\n@@ -174,6 +178,7 @@ merge_map(struct user_mem_map *left, struct user_mem_map *right)\n \n \tleft->len += right->len;\n \n+out:\n \tmemset(right, 0, sizeof(*right));\n \n \treturn 1;\n",
    "prefixes": [
        "v2"
    ]
}