get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 90748,
    "url": "https://patches.dpdk.org/api/patches/90748/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/94228658a6582daf009196f351cf665857826a4f.1617725759.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": "<94228658a6582daf009196f351cf665857826a4f.1617725759.git.bnemeth@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/94228658a6582daf009196f351cf665857826a4f.1617725759.git.bnemeth@redhat.com",
    "date": "2021-04-06T16:17:41",
    "name": "vhost: read last used index once",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6dd5856800c962398e894731b6b5b494fcac0bfc",
    "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/94228658a6582daf009196f351cf665857826a4f.1617725759.git.bnemeth@redhat.com/mbox/",
    "series": [
        {
            "id": 16136,
            "url": "https://patches.dpdk.org/api/series/16136/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16136",
            "date": "2021-04-06T16:17:41",
            "name": "vhost: read last used index once",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/16136/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/90748/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/90748/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 B1453A0546;\n\tTue,  6 Apr 2021 18:17:55 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F2CF214125D;\n\tTue,  6 Apr 2021 18:17:52 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [63.128.21.124])\n by mails.dpdk.org (Postfix) with ESMTP id AB1AC14125D\n for <dev@dpdk.org>; Tue,  6 Apr 2021 18:17:51 +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-536-uoElESN1NiCpLQT5i_jbvA-1; Tue, 06 Apr 2021 12:17:48 -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 90057839A5B\n for <dev@dpdk.org>; Tue,  6 Apr 2021 16:17:47 +0000 (UTC)",
            "from bnemeth.users.ipa.redhat.com (ovpn-112-176.ams2.redhat.com\n [10.36.112.176])\n by smtp.corp.redhat.com (Postfix) with ESMTP id B6BEF5D9DC;\n Tue,  6 Apr 2021 16:17:46 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1617725871;\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=aqnYzqtgvU9hEZLTOb7WP1TMSclBGNCmAnZpxmzJN8I=;\n b=FH8hCI/1c8gsKcoV8DBiBXaVB3+UFfJzMNzLGQjcHnE9Vw2sqy6sNB9A/I1Fu6ogDZ5TP0\n O/zNZXO2coiwxqsRtIOPZRNa/sCRFM9ToalAHaAKFj5ZeYmFsnP2MKafiuKOxcR7UiT1V8\n jFCF6bhh41QjTJFJbPc5zJLcqgc/tzM=",
        "X-MC-Unique": "uoElESN1NiCpLQT5i_jbvA-1",
        "From": "Balazs Nemeth <bnemeth@redhat.com>",
        "To": "bnemeth@redhat.com,\n\tdev@dpdk.org",
        "Date": "Tue,  6 Apr 2021 18:17:41 +0200",
        "Message-Id": "\n <94228658a6582daf009196f351cf665857826a4f.1617725759.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: read last used index once",
        "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": "Instead of calculating the address of a packed descriptor based on the\nvq->desc_packed and vq->last_used_idx every time, store that base\naddress in desc_base. On arm, this saves 176 bytes in code size of\nfunction in which vhost_flush_enqueue_batch_packed gets inlined.\n---\n lib/librte_vhost/virtio_net.c | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 179c57b46..f091384a6 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -217,6 +217,8 @@ 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 \n \tif (vq->shadow_used_idx) {\n \t\tdo_data_copy_enqueue(dev, vq);\n@@ -226,16 +228,17 @@ vhost_flush_enqueue_batch_packed(struct virtio_net *dev,\n \tflags = PACKED_DESC_ENQUEUE_USED_FLAG(vq->used_wrap_counter);\n \n \tvhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {\n-\t\tvq->desc_packed[vq->last_used_idx + i].id = ids[i];\n-\t\tvq->desc_packed[vq->last_used_idx + i].len = lens[i];\n+\t\tdesc_base[i].id = ids[i];\n+\t\tdesc_base[i].len = lens[i];\n \t}\n \n \trte_atomic_thread_fence(__ATOMIC_RELEASE);\n \n-\tvhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE)\n-\t\tvq->desc_packed[vq->last_used_idx + i].flags = flags;\n+\tvhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {\n+\t\tdesc_base[i].flags = flags;\n+\t}\n \n-\tvhost_log_cache_used_vring(dev, vq, vq->last_used_idx *\n+\tvhost_log_cache_used_vring(dev, vq, last_used_idx *\n \t\t\t\t   sizeof(struct vring_packed_desc),\n \t\t\t\t   sizeof(struct vring_packed_desc) *\n \t\t\t\t   PACKED_BATCH_SIZE);\n",
    "prefixes": []
}