get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 113197,
    "url": "http://patches.dpdk.org/api/patches/113197/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220622011944.6115-1-gaoxiangliu0@163.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20220622011944.6115-1-gaoxiangliu0@163.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220622011944.6115-1-gaoxiangliu0@163.com",
    "date": "2022-06-22T01:19:44",
    "name": "[v2] vhost: fix avail idx update error when desc copy failed",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f68d9750189e0b6285453d1245b0c7435d4b33ee",
    "submitter": {
        "id": 2304,
        "url": "http://patches.dpdk.org/api/people/2304/?format=api",
        "name": "Gaoxiang Liu",
        "email": "gaoxiangliu0@163.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220622011944.6115-1-gaoxiangliu0@163.com/mbox/",
    "series": [
        {
            "id": 23669,
            "url": "http://patches.dpdk.org/api/series/23669/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23669",
            "date": "2022-06-22T01:19:44",
            "name": "[v2] vhost: fix avail idx update error when desc copy failed",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/23669/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/113197/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/113197/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 033DEA00C3;\n\tWed, 22 Jun 2022 03:20:04 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DD6F44069C;\n\tWed, 22 Jun 2022 03:20:03 +0200 (CEST)",
            "from m12-17.163.com (m12-17.163.com [220.181.12.17])\n by mails.dpdk.org (Postfix) with ESMTP id 434AB40151;\n Wed, 22 Jun 2022 03:20:01 +0200 (CEST)",
            "from DESKTOP-ONA2IA7.localdomain (unknown [223.104.244.95])\n by smtp13 (Coremail) with SMTP id EcCowAC312czbrJilGW4JQ--.19471S4;\n Wed, 22 Jun 2022 09:19:57 +0800 (CST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=/YOV1\n lbCnahQJOU4smohnJ7D7HZnUpFZxIpi1qDxo3M=; b=hcy233xRpZ/F06F5pSpxs\n c0+0RZa/LmdeTKlzRUqjE87l5CSzw31Tmc1QueMp2ABqK1MZozLu0jOyRJC+Hogr\n ApWR+oErg89Y0k+7abKZzsenOJ+PjWZiZg42hoHapoPfwCFUf2Wd6vxakR0QNMyq\n YGpSQVdqIeNbV58aAJq8a8=",
        "From": "Gaoxiang Liu <gaoxiangliu0@163.com>",
        "To": "maxime.coquelin@redhat.com,\n\tchenbo.xia@intel.com",
        "Cc": "dev@dpdk.org, liugaoxiang@huawei.com, Gaoxiang Liu <gaoxiangliu0@163.com>,\n stable@dpdk.org",
        "Subject": "[PATCH v2] vhost: fix avail idx update error when desc copy failed",
        "Date": "Wed, 22 Jun 2022 09:19:44 +0800",
        "Message-Id": "<20220622011944.6115-1-gaoxiangliu0@163.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20220622005600.5920-1-gaoxiangliu0@163.com>",
        "References": "<20220622005600.5920-1-gaoxiangliu0@163.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "EcCowAC312czbrJilGW4JQ--.19471S4",
        "X-Coremail-Antispam": "1Uf129KBjvJXoW7ZF45Jr1kAr4fZr1UCw48WFg_yoW8JFW7pF\n WayFWUuFySgr1IgaykWrn7u34vka97K3W7JFsrXF47uFW3J3Z7tFy8K3WFyr1UurZ3Ar18\n ZF10gry5Cw4Uu3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pMKZG-UUUUU=",
        "X-Originating-IP": "[223.104.244.95]",
        "X-CM-SenderInfo": "xjdr5xxdqjzxjxq6il2tof0z/1tbiPh0oOlxBs22gHQAAsP",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "When copy_desc_to_mbuf function failed, i added 1.\nAnd last_avail_idx added i, other than i - 1.\nIt may cause that the first mbuf in mbuf-list is dropped,\nthe second mbuf in mbuf-list is received in the following\nrx procedure.\nAnd The pkt_len of the second mbuf is zero, resulting in\nsegment fault when parsing the mbuf.\n\nFixes: 0fd5608ef97f (\"vhost: handle mbuf allocation failure\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>\n\n---\nv2:\n* Fixed other idx update errors.\n---\n lib/vhost/virtio_net.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c\nindex 68a26eb17d..eb254e1024 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -2850,11 +2850,11 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tif (dropped)\n \t\trte_pktmbuf_free_bulk(&pkts[i - 1], count - i + 1);\n \n-\tvq->last_avail_idx += i;\n+\tvq->last_avail_idx += i - dropped;\n \n \tdo_data_copy_dequeue(vq);\n-\tif (unlikely(i < count))\n-\t\tvq->shadow_used_idx = i;\n+\tif (unlikely((i - dropped) < count))\n+\t\tvq->shadow_used_idx = i - dropped;\n \tif (likely(vq->shadow_used_idx)) {\n \t\tflush_shadow_used_ring_split(dev, vq);\n \t\tvhost_vring_call_split(dev, vq);\n",
    "prefixes": [
        "v2"
    ]
}