Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/17353/?format=api
https://patches.dpdk.org/api/patches/17353/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1480587729-47204-1-git-send-email-haifeng.lin@huawei.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": "<1480587729-47204-1-git-send-email-haifeng.lin@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1480587729-47204-1-git-send-email-haifeng.lin@huawei.com", "date": "2016-12-01T10:22:09", "name": "[dpdk-dev] vhost: fix add_guest_pages bug", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "656369eaf430114add47c513b09196e5586c9d5e", "submitter": { "id": 69, "url": "https://patches.dpdk.org/api/people/69/?format=api", "name": "Linhaifeng", "email": "haifeng.lin@huawei.com" }, "delegate": { "id": 355, "url": "https://patches.dpdk.org/api/users/355/?format=api", "username": "yliu", "first_name": "Yuanhan", "last_name": "Liu", "email": "yuanhan.liu@linux.intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1480587729-47204-1-git-send-email-haifeng.lin@huawei.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/17353/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/17353/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 01C4C58C5;\n\tThu, 1 Dec 2016 11:22:39 +0100 (CET)", "from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66])\n\tby dpdk.org (Postfix) with ESMTP id ADEE05689\n\tfor <dev@dpdk.org>; Thu, 1 Dec 2016 11:22:35 +0100 (CET)", "from 172.24.1.136 (EHLO szxeml434-hub.china.huawei.com)\n\t([172.24.1.136])\n\tby szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued)\n\twith ESMTP id CME06787; Thu, 01 Dec 2016 18:22:26 +0800 (CST)", "from localhost (10.177.20.223) by szxeml434-hub.china.huawei.com\n\t(10.82.67.225) with Microsoft SMTP Server id 14.3.235.1;\n\tThu, 1 Dec 2016 18:22:17 +0800" ], "From": "Haifeng Lin <haifeng.lin@huawei.com>", "To": "<dev@dpdk.org>, <yuanhan.liu@linux.intel.com>,\n\t<maxime.coquelin@redhat.com>", "CC": "Haifeng Lin <haifeng.lin@huawei.com>", "Date": "Thu, 1 Dec 2016 18:22:09 +0800", "Message-ID": "<1480587729-47204-1-git-send-email-haifeng.lin@huawei.com>", "X-Mailer": "git-send-email 1.8.5.2.msysgit.0", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.177.20.223]", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [PATCH] vhost: fix add_guest_pages bug", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://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": "<http://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": "When reg_size < page_size the function read in\nrte_mem_virt2phy would not return, becasue gpa\nis invalid.\n\nSigned-off-by: Haifeng Lin <haifeng.lin@huawei.com>\n---\n lib/librte_vhost/vhost_user.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 6b83c15..ce55e85 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -447,14 +447,14 @@ add_guest_pages(struct virtio_net *dev, struct virtio_memory_region *reg,\n \treg_size -= size;\n \n \twhile (reg_size > 0) {\n+\t\tsize = reg_size >= page_size ? page_size : reg_size;\n \t\thost_phys_addr = rte_mem_virt2phy((void *)(uintptr_t)\n \t\t\t\t\t\t host_user_addr);\n-\t\tadd_one_guest_page(dev, guest_phys_addr, host_phys_addr,\n-\t\t\t\t page_size);\n+\t\tadd_one_guest_page(dev, guest_phys_addr, host_phys_addr, size);\n \n-\t\thost_user_addr += page_size;\n-\t\tguest_phys_addr += page_size;\n-\t\treg_size -= page_size;\n+\t\thost_user_addr += size;\n+\t\tguest_phys_addr += size;\n+\t\treg_size -= size;\n \t}\n }\n \n", "prefixes": [ "dpdk-dev" ] }{ "id": 17353, "url": "