Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/61169/?format=api
https://patches.dpdk.org/api/patches/61169/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191015143014.1656-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": "<20191015143014.1656-6-yong.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20191015143014.1656-6-yong.liu@intel.com", "date": "2019-10-15T14:30:06", "name": "[v5,05/13] vhost: add packed ring single dequeue", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "6f16cede1bf06d2dff908f49dadcc379ea6b1233", "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/20191015143014.1656-6-yong.liu@intel.com/mbox/", "series": [ { "id": 6845, "url": "https://patches.dpdk.org/api/series/6845/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6845", "date": "2019-10-15T14:30:01", "name": "vhost packed ring performance optimization", "version": 5, "mbox": "https://patches.dpdk.org/series/6845/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/61169/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/61169/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 813121D167;\n\tTue, 15 Oct 2019 08:51:48 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id BECD61C43F\n\tfor <dev@dpdk.org>; Tue, 15 Oct 2019 08:51:38 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 Oct 2019 23:51:38 -0700", "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.142])\n\tby orsmga001.jf.intel.com with ESMTP; 14 Oct 2019 23:51:37 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.67,298,1566889200\"; d=\"scan'208\";a=\"279098529\"", "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": "Tue, 15 Oct 2019 22:30:06 +0800", "Message-Id": "<20191015143014.1656-6-yong.liu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20191015143014.1656-1-yong.liu@intel.com>", "References": "<20191009133849.69002-1-yong.liu@intel.com>\n\t<20191015143014.1656-1-yong.liu@intel.com>", "Subject": "[dpdk-dev] [PATCH v5 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>", "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex a8130dc06..e1b06c1ce 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -1551,6 +1551,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 dummy_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, &dummy_len,\n+\t\t\t\t\t VHOST_ACCESS_RO) < 0))\n+\t\treturn -1;\n+\n+\t*pkts = rte_pktmbuf_alloc(mbuf_pool);\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": [ "v5", "05/13" ] }{ "id": 61169, "url": "