Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/58612/?format=api
https://patches.dpdk.org/api/patches/58612/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190905161421.55981-4-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": "<20190905161421.55981-4-yong.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190905161421.55981-4-yong.liu@intel.com", "date": "2019-09-05T16:14:10", "name": "[v1,03/14] vhost: add single packet dequeue function", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e22c71b8701cd481b94d14a2a2513204f5841d08", "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/20190905161421.55981-4-yong.liu@intel.com/mbox/", "series": [ { "id": 6248, "url": "https://patches.dpdk.org/api/series/6248/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6248", "date": "2019-09-05T16:14:07", "name": "vhost packed ring performance optimization", "version": 1, "mbox": "https://patches.dpdk.org/series/6248/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/58612/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/58612/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 F3FBB1EE23;\n\tThu, 5 Sep 2019 10:34:42 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 722D51ED96\n\tfor <dev@dpdk.org>; Thu, 5 Sep 2019 10:34:35 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Sep 2019 01:34:34 -0700", "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.142])\n\tby fmsmga006.fm.intel.com with ESMTP; 05 Sep 2019 01:34:33 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.64,470,1559545200\"; d=\"scan'208\";a=\"383781517\"", "From": "Marvin Liu <yong.liu@intel.com>", "To": "tiwei.bie@intel.com,\n\tmaxime.coquelin@redhat.com,\n\tdev@dpdk.org", "Cc": "Marvin Liu <yong.liu@intel.com>", "Date": "Fri, 6 Sep 2019 00:14:10 +0800", "Message-Id": "<20190905161421.55981-4-yong.liu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190905161421.55981-1-yong.liu@intel.com>", "References": "<20190905161421.55981-1-yong.liu@intel.com>", "Subject": "[dpdk-dev] [PATCH v1 03/14] vhost: add single packet dequeue\n\tfunction", "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": "dd 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>", "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 51ed20543..454e8b33e 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -1603,6 +1603,62 @@ 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, struct vhost_virtqueue *vq,\n+\tstruct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t *buf_id,\n+\tuint16_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\tvq->last_avail_idx, desc_count,\n+\t\t\t\t\tbuf_vec, &nr_vec,\n+\t\t\t\t\tbuf_id, &dummy_len,\n+\t\t\t\t\tVHOST_ACCESS_RO) < 0)) {\n+\t\treturn -1;\n+\t}\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\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, struct vhost_virtqueue *vq,\n+\tstruct rte_mempool *mbuf_pool, 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->last_avail_idx += desc_count;\n+\tif (vq->last_avail_idx >= vq->size) {\n+\t\tvq->last_avail_idx -= vq->size;\n+\t\tvq->avail_wrap_counter ^= 1;\n+\t}\n+\n+\treturn 0;\n+}\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": [ "v1", "03/14" ] }{ "id": 58612, "url": "