Show a patch.

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

{
    "id": 74458,
    "url": "https://patches.dpdk.org/api/patches/74458/",
    "web_url": "https://patches.dpdk.org/patch/74458/",
    "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": "<20200720025242.3066787-1-patrick.fu@intel.com>",
    "date": "2020-07-20T02:52:42",
    "name": "[v1] vhost: support cross page buf in async data path",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "45036d0342674c2efe387281bfadb7d43eeff12f",
    "submitter": {
        "id": 1781,
        "url": "https://patches.dpdk.org/api/people/1781/",
        "name": "Patrick Fu",
        "email": "patrick.fu@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74458/mbox/",
    "series": [
        {
            "id": 11157,
            "url": "https://patches.dpdk.org/api/series/11157/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11157",
            "date": "2020-07-20T02:52:42",
            "name": "[v1] vhost: support cross page buf in async data path",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11157/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74458/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74458/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9687\"; a=\"151191512\"",
            "E=Sophos;i=\"5.75,373,1589266800\"; d=\"scan'208\";a=\"151191512\"",
            "E=Sophos;i=\"5.75,373,1589266800\"; d=\"scan'208\";a=\"391910597\""
        ],
        "IronPort-SDR": [
            "\n r3WRVQ6F3LyazJfCxQ/LIpOE1pofXkiI8ciCKbfKGaNHUR1spxZrQm8i3YZIG9YfcAZZRP3Fir\n /3IlFXpADg1g==",
            "\n p/JMtpUo6CtE3xnC8jR9x9e2uQYTcCoyRwWSzv/Ov0oksumKLPMvdPkxOyy9V0depn3jFywrKY\n q+oythFFLoOw=="
        ],
        "X-Amp-File-Uploaded": "False",
        "Precedence": "list",
        "X-Mailman-Version": "2.1.15",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v1] vhost: support cross page buf in async data\n\tpath",
        "Sender": "\"dev\" <dev-bounces@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 8FF12A0540;\n\tMon, 20 Jul 2020 04:54:35 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EBE691AFB;\n\tMon, 20 Jul 2020 04:54:34 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id D87041023\n for <dev@dpdk.org>; Mon, 20 Jul 2020 04:54:32 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Jul 2020 19:54:31 -0700",
            "from npg-dpdk-patrickfu-casc2.sh.intel.com ([10.67.119.92])\n by fmsmga001.fm.intel.com with ESMTP; 19 Jul 2020 19:54:29 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Mailer": "git-send-email 2.18.4",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-ExtLoop1": "1",
        "Date": "Mon, 20 Jul 2020 10:52:42 +0800",
        "To": "dev@dpdk.org,\n\tmaxime.coquelin@redhat.com,\n\tchenbo.xia@intel.com",
        "From": "patrick.fu@intel.com",
        "Errors-To": "dev-bounces@dpdk.org",
        "Cc": "patrick.fu@intel.com",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<20200720025242.3066787-1-patrick.fu@intel.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "From: Patrick Fu <patrick.fu@intel.com>\n\nAsync copy fails when ring buffer cross two physical pages. This patch\nfix the failure by letting copies occur in sync mode if crossing page\nbuffers are given.\n\nFixes: cd6760da1076 (\"vhost: introduce async enqueue for split ring\")\n\nSigned-off-by: Patrick Fu <patrick.fu@intel.com>\n---\n lib/librte_vhost/virtio_net.c | 12 +++---------\n 1 file changed, 3 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 1d0be3dd4..44b22a8ad 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -1071,16 +1071,10 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t}\n \n \t\tcpy_len = RTE_MIN(buf_avail, mbuf_avail);\n+\t\thpa = (void *)(uintptr_t)gpa_to_hpa(dev,\n+\t\t\t\tbuf_iova + buf_offset, cpy_len);\n \n-\t\tif (unlikely(cpy_len >= cpy_threshold)) {\n-\t\t\thpa = (void *)(uintptr_t)gpa_to_hpa(dev,\n-\t\t\t\t\tbuf_iova + buf_offset, cpy_len);\n-\n-\t\t\tif (unlikely(!hpa)) {\n-\t\t\t\terror = -1;\n-\t\t\t\tgoto out;\n-\t\t\t}\n-\n+\t\tif (unlikely(cpy_len >= cpy_threshold && hpa)) {\n \t\t\tasync_fill_vec(src_iovec + tvec_idx,\n \t\t\t\t(void *)(uintptr_t)rte_pktmbuf_iova_offset(m,\n \t\t\t\t\t\tmbuf_offset), cpy_len);\n",
    "prefixes": [
        "v1"
    ]
}