get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 93270,
    "url": "https://patches.dpdk.org/api/patches/93270/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/83fa6253725a7bc69bccb7897f380422354a2898.1621008025.git.bnemeth@redhat.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": "<83fa6253725a7bc69bccb7897f380422354a2898.1621008025.git.bnemeth@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/83fa6253725a7bc69bccb7897f380422354a2898.1621008025.git.bnemeth@redhat.com",
    "date": "2021-05-14T16:02:07",
    "name": "vhost: fix invalid use of stored last used index",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d1a85f22eb469878974a168269219ce44a584655",
    "submitter": {
        "id": 2072,
        "url": "https://patches.dpdk.org/api/people/2072/?format=api",
        "name": "Balazs Nemeth",
        "email": "bnemeth@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/83fa6253725a7bc69bccb7897f380422354a2898.1621008025.git.bnemeth@redhat.com/mbox/",
    "series": [
        {
            "id": 16996,
            "url": "https://patches.dpdk.org/api/series/16996/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16996",
            "date": "2021-05-14T16:02:07",
            "name": "vhost: fix invalid use of stored last used index",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/16996/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/93270/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/93270/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 3B828A0A0C;\n\tFri, 14 May 2021 18:02:26 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AB61B40042;\n\tFri, 14 May 2021 18:02:25 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [216.205.24.124])\n by mails.dpdk.org (Postfix) with ESMTP id C556140041\n for <dev@dpdk.org>; Fri, 14 May 2021 18:02:23 +0200 (CEST)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-63-AuZ21RSAMsy5X8-5RuU5sg-1; Fri, 14 May 2021 12:02:20 -0400",
            "from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com\n [10.5.11.14])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 754AE80B70A;\n Fri, 14 May 2021 16:02:19 +0000 (UTC)",
            "from bnemeth.users.ipa.redhat.com (ovpn-113-158.ams2.redhat.com\n [10.36.113.158])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 538D55D9D7;\n Fri, 14 May 2021 16:02:18 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1621008142;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=xYshReLnX/ccKaFeOX5hxvTgbbmr3ZnUdArdfSEwzA4=;\n b=XsEDBP8MyZHnPSLKB7xfvmnqw6fRHz+0DbAZ8C2H6zItiZAkXJQMMHmSISfO3Mq4l/qjyQ\n eGahJJRvi5yrTIuPyUZE7bVlHRSkh9tzXuweOEwpgXYtGWgY6bm2wYTxoPIxGmxOgbmCAT\n jXBS+NVeXJa7+iZhZ7ldLyiKijd9Oqc=",
        "X-MC-Unique": "AuZ21RSAMsy5X8-5RuU5sg-1",
        "From": "Balazs Nemeth <bnemeth@redhat.com>",
        "To": "bnemeth@redhat.com,\n\tdev@dpdk.org,\n\tweix.ling@intel.com",
        "Date": "Fri, 14 May 2021 18:02:07 +0200",
        "Message-Id": "\n <83fa6253725a7bc69bccb7897f380422354a2898.1621008025.git.bnemeth@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=bnemeth@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"",
        "Subject": "[dpdk-dev] [PATCH] vhost: fix invalid use of stored last used index",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The optimization introduced by commit d18db8049c7c (\"vhost: read last\nused index once\") didn't account for the fact that\nvhost_flush_enqueue_shadow_packed increments the last_used_idx. For this\nreason, store last_used_idx after the potential call to\nvhost_flush_enqueue_shadow_packed.\n\nFixes: d18db8049c7c (\"vhost: read last used index once\")\nSigned-off-by: Balazs Nemeth <bnemeth@redhat.com>\n---\n lib/vhost/virtio_net.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c\nindex abfd67d38c..8da8a86a10 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -218,14 +218,17 @@ vhost_flush_enqueue_batch_packed(struct virtio_net *dev,\n {\n \tuint16_t i;\n \tuint16_t flags;\n-\tuint16_t last_used_idx = vq->last_used_idx;\n-\tstruct vring_packed_desc *desc_base = &vq->desc_packed[last_used_idx];\n+\tuint16_t last_used_idx;\n+\tstruct vring_packed_desc *desc_base;\n \n \tif (vq->shadow_used_idx) {\n \t\tdo_data_copy_enqueue(dev, vq);\n \t\tvhost_flush_enqueue_shadow_packed(dev, vq);\n \t}\n \n+\tlast_used_idx = vq->last_used_idx;\n+\tdesc_base = &vq->desc_packed[last_used_idx];\n+\n \tflags = PACKED_DESC_ENQUEUE_USED_FLAG(vq->used_wrap_counter);\n \n \tvhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {\n",
    "prefixes": []
}