get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 100728,
    "url": "https://patches.dpdk.org/api/patches/100728/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211007220013.355530-10-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-10-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211007220013.355530-10-maxime.coquelin@redhat.com",
    "date": "2021-10-07T22:00:08",
    "name": "[RFC,09/14] vhost: remove notion of async descriptor",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "734aad6ffc716be9835acc7e879a4fedab7e5b22",
    "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-10-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/100728/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/100728/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 A7846A0C43;\n\tFri,  8 Oct 2021 00:13:39 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2A123413DD;\n\tFri,  8 Oct 2021 00:13:32 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 75F8A4124B\n for <dev@dpdk.org>; Fri,  8 Oct 2021 00:13:30 +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-558-ED6gavXoMVycESD1ZbGzKQ-1; Thu, 07 Oct 2021 18:13:27 -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 6D6A48E71E5;\n Thu,  7 Oct 2021 22:00:45 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.18])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 954285C1D0;\n Thu,  7 Oct 2021 22:00:43 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1633644810;\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=V+zZLpnIGikbp5/hW2+ymT7rklSfYR4P0DEz+0tHcHA=;\n b=Dfvq0T6eXnxUJndkIeKrnq3geKCNWxh8Z9oV9hGzi6SUAkp8RsoL0z6ABAwSofE47PBFPw\n wx9Wn9Xx19c2NizNj2RYEP6+26fo4swQUH7HXuHADzPl46n7BI90R4/BnZRvhgLkb+2wTL\n yd/m0MceKwNHNBvZ1eCtKixgOmR+sP4=",
        "X-MC-Unique": "ED6gavXoMVycESD1ZbGzKQ-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:08 +0200",
        "Message-Id": "<20211007220013.355530-10-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 09/14] vhost: remove notion of async descriptor",
        "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": "Now that IO vectors iterator have been simplified, the\nrte_vhost_async_desc struct only contains a pointer on\nthe iterator array stored in the async metadata.\n\nThis patch removes it, and pass directly the iterators\narray pointer to the transfer_data callback. Doing that,\nwe avoid declaring the descriptor array in the stack, and\nalso avoid the cost of filling it.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n examples/vhost/ioat.c       | 10 +++++-----\n examples/vhost/ioat.h       |  2 +-\n lib/vhost/rte_vhost_async.h | 16 ++++------------\n lib/vhost/virtio_net.c      | 19 ++-----------------\n 4 files changed, 12 insertions(+), 35 deletions(-)",
    "diff": "diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c\nindex a8c588deff..9aeeb12fd9 100644\n--- a/examples/vhost/ioat.c\n+++ b/examples/vhost/ioat.c\n@@ -124,10 +124,10 @@ open_ioat(const char *value)\n \n int32_t\n ioat_transfer_data_cb(int vid, uint16_t queue_id,\n-\t\tstruct rte_vhost_async_desc *descs,\n+\t\tstruct rte_vhost_iov_iter *iov_iter,\n \t\tstruct rte_vhost_async_status *opaque_data, uint16_t count)\n {\n-\tuint32_t i_desc;\n+\tuint32_t i_iter;\n \tuint16_t dev_id = dma_bind[vid].dmas[queue_id * 2 + VIRTIO_RXQ].dev_id;\n \tstruct rte_vhost_iov_iter *iter = NULL;\n \tunsigned long i_seg;\n@@ -135,8 +135,8 @@ ioat_transfer_data_cb(int vid, uint16_t queue_id,\n \tunsigned short write = cb_tracker[dev_id].next_write;\n \n \tif (!opaque_data) {\n-\t\tfor (i_desc = 0; i_desc < count; i_desc++) {\n-\t\t\titer = descs[i_desc].iter;\n+\t\tfor (i_iter = 0; i_iter < count; i_iter++) {\n+\t\t\titer = iov_iter + i_iter;\n \t\t\ti_seg = 0;\n \t\t\tif (cb_tracker[dev_id].ioat_space < iter->nr_segs)\n \t\t\t\tbreak;\n@@ -161,7 +161,7 @@ ioat_transfer_data_cb(int vid, uint16_t queue_id,\n \t/* ring the doorbell */\n \trte_ioat_perform_ops(dev_id);\n \tcb_tracker[dev_id].next_write = write;\n-\treturn i_desc;\n+\treturn i_iter;\n }\n \n int32_t\ndiff --git a/examples/vhost/ioat.h b/examples/vhost/ioat.h\nindex 62e163c585..a4f09ee39b 100644\n--- a/examples/vhost/ioat.h\n+++ b/examples/vhost/ioat.h\n@@ -29,7 +29,7 @@ int open_ioat(const char *value);\n \n int32_t\n ioat_transfer_data_cb(int vid, uint16_t queue_id,\n-\t\tstruct rte_vhost_async_desc *descs,\n+\t\tstruct rte_vhost_iov_iter *iov_iter,\n \t\tstruct rte_vhost_async_status *opaque_data, uint16_t count);\n \n int32_t\ndiff --git a/lib/vhost/rte_vhost_async.h b/lib/vhost/rte_vhost_async.h\nindex 4ea5cfab10..a87ea6ba37 100644\n--- a/lib/vhost/rte_vhost_async.h\n+++ b/lib/vhost/rte_vhost_async.h\n@@ -26,14 +26,6 @@ struct rte_vhost_iov_iter {\n \tunsigned long nr_segs;\n };\n \n-/**\n- * dma transfer descriptor\n- */\n-struct rte_vhost_async_desc {\n-\t/* memory iov_iter */\n-\tstruct rte_vhost_iov_iter *iter;\n-};\n-\n /**\n  * dma transfer status\n  */\n@@ -55,17 +47,17 @@ struct rte_vhost_async_channel_ops {\n \t *  id of vhost device to perform data copies\n \t * @param queue_id\n \t *  queue id to perform data copies\n-\t * @param descs\n-\t *  an array of DMA transfer memory descriptors\n+\t * @param iov_iter\n+\t *  an array of IOV iterators\n \t * @param opaque_data\n \t *  opaque data pair sending to DMA engine\n \t * @param count\n \t *  number of elements in the \"descs\" array\n \t * @return\n-\t *  number of descs processed, negative value means error\n+\t *  number of IOV iterators processed, negative value means error\n \t */\n \tint32_t (*transfer_data)(int vid, uint16_t queue_id,\n-\t\tstruct rte_vhost_async_desc *descs,\n+\t\tstruct rte_vhost_iov_iter *iov_iter,\n \t\tstruct rte_vhost_async_status *opaque_data,\n \t\tuint16_t count);\n \t/**\ndiff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c\nindex 5ce4c14a73..b295dc1d39 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -994,15 +994,6 @@ async_iter_reset(struct vhost_async *async)\n \tasync->iovec_idx = 0;\n }\n \n-static __rte_always_inline void\n-async_fill_descs(struct vhost_async *async, struct rte_vhost_async_desc *descs)\n-{\n-\tint i;\n-\n-\tfor (i = 0; i < async->iter_idx; i++)\n-\t\tdescs[i].iter = async->iov_iter + i;\n-}\n-\n static __rte_always_inline int\n async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\tstruct rte_mbuf *m, struct buf_vector *buf_vec,\n@@ -1549,7 +1540,6 @@ 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_async_desc async_descs[MAX_PKT_BURST];\n \tstruct async_inflight_info *pkts_info = async->pkts_info;\n \tuint32_t pkt_err = 0;\n \tint32_t n_xfer;\n@@ -1594,9 +1584,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,\n \tif (unlikely(pkt_idx == 0))\n \t\treturn 0;\n \n-\tasync_fill_descs(async, async_descs);\n-\n-\tn_xfer = async->ops.transfer_data(dev->vid, queue_id, async_descs, 0, pkt_idx);\n+\tn_xfer = async->ops.transfer_data(dev->vid, queue_id, async->iov_iter, 0, pkt_idx);\n \tif (unlikely(n_xfer < 0)) {\n \t\tVHOST_LOG_DATA(ERR, \"(%d) %s: failed to transfer data for queue id %d.\\n\",\n \t\t\t\tdev->vid, __func__, queue_id);\n@@ -1811,7 +1799,6 @@ 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_async_desc async_descs[MAX_PKT_BURST];\n \tstruct async_inflight_info *pkts_info = async->pkts_info;\n \tuint32_t pkt_err = 0;\n \tuint16_t slot_idx = 0;\n@@ -1839,9 +1826,7 @@ virtio_dev_rx_async_submit_packed(struct virtio_net *dev,\n \tif (unlikely(pkt_idx == 0))\n \t\treturn 0;\n \n-\tasync_fill_descs(async, async_descs);\n-\n-\tn_xfer = async->ops.transfer_data(dev->vid, queue_id, async_descs, 0, pkt_idx);\n+\tn_xfer = async->ops.transfer_data(dev->vid, queue_id, async->iov_iter, 0, pkt_idx);\n \tif (unlikely(n_xfer < 0)) {\n \t\tVHOST_LOG_DATA(ERR, \"(%d) %s: failed to transfer data for queue id %d.\\n\",\n \t\t\t\tdev->vid, __func__, queue_id);\n",
    "prefixes": [
        "RFC",
        "09/14"
    ]
}