get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 100730,
    "url": "https://patches.dpdk.org/api/patches/100730/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211007220013.355530-5-maxime.coquelin@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": "<20211007220013.355530-5-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211007220013.355530-5-maxime.coquelin@redhat.com",
    "date": "2021-10-07T22:00:03",
    "name": "[RFC,04/14] vhost: simplify async IO vectors iterators",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "33c3b18d5f61cd846cf7f7907215441ac7ee2bb1",
    "submitter": {
        "id": 512,
        "url": "https://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@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/20211007220013.355530-5-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 19439,
            "url": "https://patches.dpdk.org/api/series/19439/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19439",
            "date": "2021-10-07T22:00:01",
            "name": "vhost: clean-up and simplify async implementation",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/19439/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/100730/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/100730/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 D853DA0C43;\n\tFri,  8 Oct 2021 00:13:57 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C740C41271;\n\tFri,  8 Oct 2021 00:13:57 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id CC56041271\n for <dev@dpdk.org>; Fri,  8 Oct 2021 00:13:55 +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-41-8vt5z87rN8OQ5y-5hjiChA-1; Thu, 07 Oct 2021 18:13:54 -0400",
            "from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com\n [10.5.11.16])\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 28CE296317B;\n Thu,  7 Oct 2021 22:00:27 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.18])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 5CB325C1D0;\n Thu,  7 Oct 2021 22:00:25 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1633644835;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=vKjLAjtJUhKkW9lQfbmdIhT7+PaRXFgE6YQdfTqtGbU=;\n b=Oa99anl3lk/AMpclmkd+bkmK+tk5Pzb6sezh/czXB72uoQdvPPVDjWLqVRPMQJ1/pRCDAr\n Se4B06CaU918A223JXER6J8TkyMPuDMHqt3Rw7voB9EsUmtdpC/KDWWhc0SA6nAsgmTc3O\n k38pkZj/xVc+QQ7GsCPccuzTErIikDI=",
        "X-MC-Unique": "8vt5z87rN8OQ5y-5hjiChA-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org, chenbo.xia@intel.com, jiayu.hu@intel.com,\n yuanx.wang@intel.com, wenwux.ma@intel.com, bruce.richardson@intel.com,\n john.mcnamara@intel.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Date": "Fri,  8 Oct 2021 00:00:03 +0200",
        "Message-Id": "<20211007220013.355530-5-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20211007220013.355530-1-maxime.coquelin@redhat.com>",
        "References": "<20211007220013.355530-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.16",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@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] [RFC 04/14] vhost: simplify async IO vectors iterators",
        "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": "This patch splits the iterator arrays in two, one for\nsource and one for destination. The goal is make the code\neasier to understand.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/vhost.h      |  5 +++--\n lib/vhost/virtio_net.c | 24 ++++++++++++------------\n 2 files changed, 15 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h\nindex f2d9535174..cb4c0f022a 100644\n--- a/lib/vhost/vhost.h\n+++ b/lib/vhost/vhost.h\n@@ -48,7 +48,7 @@\n \n #define MAX_PKT_BURST 32\n \n-#define VHOST_MAX_ASYNC_IT (MAX_PKT_BURST * 2)\n+#define VHOST_MAX_ASYNC_IT (MAX_PKT_BURST)\n #define VHOST_MAX_ASYNC_VEC (BUF_VECTOR_MAX * 2)\n \n #define PACKED_DESC_ENQUEUE_USED_FLAG(w)\t\\\n@@ -132,7 +132,8 @@ struct vhost_async {\n \t/* operation callbacks for DMA */\n \tstruct rte_vhost_async_channel_ops ops;\n \n-\tstruct rte_vhost_iov_iter it_pool[VHOST_MAX_ASYNC_IT];\n+\tstruct rte_vhost_iov_iter src_iov_iter[VHOST_MAX_ASYNC_IT];\n+\tstruct rte_vhost_iov_iter dst_iov_iter[VHOST_MAX_ASYNC_IT];\n \tstruct iovec src_iovec[VHOST_MAX_ASYNC_VEC];\n \tstruct iovec dst_iovec[VHOST_MAX_ASYNC_VEC];\n \ndiff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c\nindex 4e0e1584b8..e2a9e138b7 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -1511,7 +1511,8 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,\n \tuint16_t avail_head;\n \n \tstruct vhost_async *async = vq->async;\n-\tstruct rte_vhost_iov_iter *it_pool = async->it_pool;\n+\tstruct rte_vhost_iov_iter *src_iter = async->src_iov_iter;\n+\tstruct rte_vhost_iov_iter *dst_iter = async->dst_iov_iter;\n \tstruct rte_vhost_async_desc tdes[MAX_PKT_BURST];\n \tstruct iovec *src_iovec = async->src_iovec;\n \tstruct iovec *dst_iovec = async->dst_iovec;\n@@ -1547,20 +1548,19 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,\n \n \t\tif (async_mbuf_to_desc(dev, vq, pkts[pkt_idx], buf_vec, nr_vec, num_buffers,\n \t\t\t\t&src_iovec[iovec_idx], &dst_iovec[iovec_idx],\n-\t\t\t\t&it_pool[it_idx], &it_pool[it_idx + 1]) < 0) {\n+\t\t\t\t&src_iter[it_idx], &dst_iter[it_idx]) < 0) {\n \t\t\tvq->shadow_used_idx -= num_buffers;\n \t\t\tbreak;\n \t\t}\n \n-\t\tasync_fill_desc(&tdes[pkt_burst_idx++], &it_pool[it_idx],\n-\t\t\t\t&it_pool[it_idx + 1]);\n+\t\tasync_fill_desc(&tdes[pkt_burst_idx++], &src_iter[it_idx], &dst_iter[it_idx]);\n \n \t\tslot_idx = (async->pkts_idx + pkt_idx) & (vq->size - 1);\n \t\tpkts_info[slot_idx].descs = num_buffers;\n \t\tpkts_info[slot_idx].mbuf = pkts[pkt_idx];\n \n-\t\tiovec_idx += it_pool[it_idx].nr_segs;\n-\t\tit_idx += 2;\n+\t\tiovec_idx += src_iter[it_idx].nr_segs;\n+\t\tit_idx++;\n \n \t\tvq->last_avail_idx += num_buffers;\n \n@@ -1829,7 +1829,8 @@ virtio_dev_rx_async_submit_packed(struct virtio_net *dev,\n \tuint16_t num_descs;\n \n \tstruct vhost_async *async = vq->async;\n-\tstruct rte_vhost_iov_iter *it_pool = async->it_pool;\n+\tstruct rte_vhost_iov_iter *src_iter = async->src_iov_iter;\n+\tstruct rte_vhost_iov_iter *dst_iter = async->dst_iov_iter;\n \tstruct rte_vhost_async_desc tdes[MAX_PKT_BURST];\n \tstruct iovec *src_iovec = async->src_iovec;\n \tstruct iovec *dst_iovec = async->dst_iovec;\n@@ -1846,18 +1847,17 @@ virtio_dev_rx_async_submit_packed(struct virtio_net *dev,\n \t\tif (unlikely(virtio_dev_rx_async_packed(dev, vq, pkts[pkt_idx],\n \t\t\t\t\t\t&num_descs, &num_buffers,\n \t\t\t\t\t\t&src_iovec[iovec_idx], &dst_iovec[iovec_idx],\n-\t\t\t\t\t\t&it_pool[it_idx], &it_pool[it_idx + 1]) < 0))\n+\t\t\t\t\t\t&src_iter[it_idx], &dst_iter[it_idx]) < 0))\n \t\t\tbreak;\n \n \t\tslot_idx = (async->pkts_idx + pkt_idx) % vq->size;\n \n-\t\tasync_fill_desc(&tdes[pkt_burst_idx++], &it_pool[it_idx],\n-\t\t\t\t&it_pool[it_idx + 1]);\n+\t\tasync_fill_desc(&tdes[pkt_burst_idx++], &src_iter[it_idx], &dst_iter[it_idx]);\n \t\tpkts_info[slot_idx].descs = num_descs;\n \t\tpkts_info[slot_idx].nr_buffers = num_buffers;\n \t\tpkts_info[slot_idx].mbuf = pkts[pkt_idx];\n-\t\tiovec_idx += it_pool[it_idx].nr_segs;\n-\t\tit_idx += 2;\n+\t\tiovec_idx += src_iter[it_idx].nr_segs;\n+\t\tit_idx++;\n \n \t\tpkt_idx++;\n \t\tremained--;\n",
    "prefixes": [
        "RFC",
        "04/14"
    ]
}