get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 61844,
    "url": "https://patches.dpdk.org/api/patches/61844/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191024160832.14543-6-yong.liu@intel.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": "<20191024160832.14543-6-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191024160832.14543-6-yong.liu@intel.com",
    "date": "2019-10-24T16:08:24",
    "name": "[v9,05/13] vhost: add packed ring single dequeue",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a1e8335bea81c8791a0759df94ffcfca7498fc77",
    "submitter": {
        "id": 17,
        "url": "https://patches.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@intel.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/20191024160832.14543-6-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 7033,
            "url": "https://patches.dpdk.org/api/series/7033/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=7033",
            "date": "2019-10-24T16:08:19",
            "name": "vhost packed ring performance optimization",
            "version": 9,
            "mbox": "https://patches.dpdk.org/series/7033/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/61844/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/61844/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A29581E864;\n\tThu, 24 Oct 2019 10:28:59 +0200 (CEST)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id B91111E54F\n\tfor <dev@dpdk.org>; Thu, 24 Oct 2019 10:28:44 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Oct 2019 01:28:44 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.142])\n\tby fmsmga002.fm.intel.com with ESMTP; 24 Oct 2019 01:28:42 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.68,224,1569308400\"; d=\"scan'208\";a=\"228431085\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com, \n\tstephen@networkplumber.org, gavin.hu@arm.com",
        "Cc": "dev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Fri, 25 Oct 2019 00:08:24 +0800",
        "Message-Id": "<20191024160832.14543-6-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191024160832.14543-1-yong.liu@intel.com>",
        "References": "<20191021220813.55236-1-yong.liu@intel.com>\n\t<20191024160832.14543-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v9 05/13] vhost: add packed ring single dequeue",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add vhost single packet dequeue function for packed ring and meanwhile\nleft space for shadow used ring update function.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/librte_vhost/virtio_net.c | 55 +++++++++++++++++++++++++++++++++++\n 1 file changed, 55 insertions(+)",
    "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 4ddf26567..87f2ae49e 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -1635,6 +1635,61 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \treturn i;\n }\n \n+static __rte_always_inline int\n+vhost_dequeue_single_packed(struct virtio_net *dev,\n+\t\t\t    struct vhost_virtqueue *vq,\n+\t\t\t    struct rte_mempool *mbuf_pool,\n+\t\t\t    struct rte_mbuf **pkts,\n+\t\t\t    uint16_t *buf_id,\n+\t\t\t    uint16_t *desc_count)\n+{\n+\tstruct buf_vector buf_vec[BUF_VECTOR_MAX];\n+\tuint32_t buf_len;\n+\tuint16_t nr_vec = 0;\n+\tint err;\n+\n+\tif (unlikely(fill_vec_buf_packed(dev, vq,\n+\t\t\t\t\t vq->last_avail_idx, desc_count,\n+\t\t\t\t\t buf_vec, &nr_vec,\n+\t\t\t\t\t buf_id, &buf_len,\n+\t\t\t\t\t VHOST_ACCESS_RO) < 0))\n+\t\treturn -1;\n+\n+\t*pkts = virtio_dev_pktmbuf_alloc(dev, mbuf_pool, buf_len);\n+\tif (unlikely(*pkts == NULL)) {\n+\t\tRTE_LOG(ERR, VHOST_DATA,\n+\t\t\t\"Failed to allocate memory for mbuf.\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\terr = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, *pkts,\n+\t\t\t\tmbuf_pool);\n+\tif (unlikely(err)) {\n+\t\trte_pktmbuf_free(*pkts);\n+\t\treturn -1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static __rte_unused int\n+virtio_dev_tx_single_packed(struct virtio_net *dev,\n+\t\t\t    struct vhost_virtqueue *vq,\n+\t\t\t    struct rte_mempool *mbuf_pool,\n+\t\t\t    struct rte_mbuf **pkts)\n+{\n+\n+\tuint16_t buf_id, desc_count;\n+\n+\tif (vhost_dequeue_single_packed(dev, vq, mbuf_pool, pkts, &buf_id,\n+\t\t\t\t\t&desc_count))\n+\t\treturn -1;\n+\n+\tvq_inc_last_avail_packed(vq, desc_count);\n+\n+\treturn 0;\n+}\n+\n static __rte_noinline uint16_t\n virtio_dev_tx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tstruct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count)\n",
    "prefixes": [
        "v9",
        "05/13"
    ]
}