Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/56220/?format=api
https://patches.dpdk.org/api/patches/56220/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190708171320.38802-14-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": "<20190708171320.38802-14-yong.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190708171320.38802-14-yong.liu@intel.com", "date": "2019-07-08T17:13:20", "name": "[RFC,13/13] remove useless vhost functions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "da85a70a4e80f6d35f93b29766532f53cfc5a564", "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/20190708171320.38802-14-yong.liu@intel.com/mbox/", "series": [ { "id": 5390, "url": "https://patches.dpdk.org/api/series/5390/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5390", "date": "2019-07-08T17:13:08", "name": "[RFC,01/13] add vhost normal enqueue function", "version": 1, "mbox": "https://patches.dpdk.org/series/5390/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/56220/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/56220/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 0635D1BDF6;\n\tMon, 8 Jul 2019 11:30:18 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 9CB541B9AD\n\tfor <dev@dpdk.org>; Mon, 8 Jul 2019 11:30:03 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Jul 2019 02:30:03 -0700", "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.142])\n\tby orsmga007.jf.intel.com with ESMTP; 08 Jul 2019 02:30:01 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.63,466,1557212400\"; d=\"scan'208\";a=\"155821737\"", "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": "Tue, 9 Jul 2019 01:13:20 +0800", "Message-Id": "<20190708171320.38802-14-yong.liu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190708171320.38802-1-yong.liu@intel.com>", "References": "<20190708171320.38802-1-yong.liu@intel.com>", "Subject": "[dpdk-dev] [RFC PATCH 13/13] remove useless vhost functions", "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": "Signed-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 6bcf565f0..df8dcbe1f 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -97,72 +97,6 @@ update_shadow_used_ring_split(struct vhost_virtqueue *vq,\n \tvq->shadow_used_split[i].len = len;\n }\n \n-static __rte_always_inline void\n-flush_shadow_used_ring_packed(struct virtio_net *dev,\n-\t\t\tstruct vhost_virtqueue *vq)\n-{\n-\tint i;\n-\tuint16_t used_idx = vq->last_used_idx;\n-\tuint16_t head_idx = vq->last_used_idx;\n-\tuint16_t head_flags = 0;\n-\n-\t/* Split loop in two to save memory barriers */\n-\tfor (i = 0; i < vq->shadow_used_idx; i++) {\n-\t\tvq->desc_packed[used_idx].id = vq->shadow_used_packed[i].id;\n-\t\tvq->desc_packed[used_idx].len = vq->shadow_used_packed[i].len;\n-\n-\t\tused_idx += vq->shadow_used_packed[i].count;\n-\t\tif (used_idx >= vq->size)\n-\t\t\tused_idx -= vq->size;\n-\t}\n-\n-\trte_smp_wmb();\n-\n-\tfor (i = 0; i < vq->shadow_used_idx; i++) {\n-\t\tuint16_t flags;\n-\n-\t\tif (vq->shadow_used_packed[i].len)\n-\t\t\tflags = VRING_DESC_F_WRITE;\n-\t\telse\n-\t\t\tflags = 0;\n-\n-\t\tif (vq->used_wrap_counter) {\n-\t\t\tflags |= VRING_DESC_F_USED;\n-\t\t\tflags |= VRING_DESC_F_AVAIL;\n-\t\t} else {\n-\t\t\tflags &= ~VRING_DESC_F_USED;\n-\t\t\tflags &= ~VRING_DESC_F_AVAIL;\n-\t\t}\n-\n-\t\tif (i > 0) {\n-\t\t\tvq->desc_packed[vq->last_used_idx].flags = flags;\n-\n-\t\t\tvhost_log_cache_used_vring(dev, vq,\n-\t\t\t\t\tvq->last_used_idx *\n-\t\t\t\t\tsizeof(struct vring_packed_desc),\n-\t\t\t\t\tsizeof(struct vring_packed_desc));\n-\t\t} else {\n-\t\t\thead_idx = vq->last_used_idx;\n-\t\t\thead_flags = flags;\n-\t\t}\n-\n-\t\tvq->last_used_idx += vq->shadow_used_packed[i].count;\n-\t\tif (vq->last_used_idx >= vq->size) {\n-\t\t\tvq->used_wrap_counter ^= 1;\n-\t\t\tvq->last_used_idx -= vq->size;\n-\t\t}\n-\t}\n-\n-\tvq->desc_packed[head_idx].flags = head_flags;\n-\n-\tvhost_log_cache_used_vring(dev, vq,\n-\t\t\t\thead_idx *\n-\t\t\t\tsizeof(struct vring_packed_desc),\n-\t\t\t\tsizeof(struct vring_packed_desc));\n-\n-\tvq->shadow_used_idx = 0;\n-\tvhost_log_cache_sync(dev, vq);\n-}\n \n static __rte_always_inline void\n flush_dequeue_shadow_used_packed_inorder(struct virtio_net *dev,\n@@ -447,17 +381,6 @@ update_dequeue_shadow_used_ring_packed(struct vhost_virtqueue *vq,\n \t}\n }\n \n-static __rte_always_inline void\n-update_shadow_used_ring_packed(struct vhost_virtqueue *vq,\n-\t\t\t uint16_t desc_idx, uint32_t len, uint16_t count)\n-{\n-\tuint16_t i = vq->shadow_used_idx++;\n-\n-\tvq->shadow_used_packed[i].id = desc_idx;\n-\tvq->shadow_used_packed[i].len = len;\n-\tvq->shadow_used_packed[i].count = count;\n-}\n-\n static inline void\n do_data_copy_enqueue(struct virtio_net *dev, struct vhost_virtqueue *vq)\n {\n@@ -883,64 +806,6 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \treturn 0;\n }\n \n-/*\n- * Returns -1 on fail, 0 on success\n- */\n-static inline int\n-reserve_avail_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n-\t\t\t\tuint32_t size, struct buf_vector *buf_vec,\n-\t\t\t\tuint16_t *nr_vec, uint16_t *num_buffers,\n-\t\t\t\tuint16_t *nr_descs)\n-{\n-\tuint16_t avail_idx;\n-\tuint16_t vec_idx = 0;\n-\tuint16_t max_tries, tries = 0;\n-\n-\tuint16_t buf_id = 0;\n-\tuint32_t len = 0;\n-\tuint16_t desc_count;\n-\n-\t*num_buffers = 0;\n-\tavail_idx = vq->last_avail_idx;\n-\n-\tif (rxvq_is_mergeable(dev))\n-\t\tmax_tries = vq->size - 1;\n-\telse\n-\t\tmax_tries = 1;\n-\n-\twhile (size > 0) {\n-\t\t/*\n-\t\t * if we tried all available ring items, and still\n-\t\t * can't get enough buf, it means something abnormal\n-\t\t * happened.\n-\t\t */\n-\t\tif (unlikely(++tries > max_tries))\n-\t\t\treturn -1;\n-\n-\t\tif (unlikely(fill_vec_buf_packed(dev, vq,\n-\t\t\t\t\t\tavail_idx, &desc_count,\n-\t\t\t\t\t\tbuf_vec, &vec_idx,\n-\t\t\t\t\t\t&buf_id, &len,\n-\t\t\t\t\t\tVHOST_ACCESS_RW) < 0))\n-\t\t\treturn -1;\n-\n-\t\tlen = RTE_MIN(len, size);\n-\t\tupdate_shadow_used_ring_packed(vq, buf_id, len, desc_count);\n-\t\tsize -= len;\n-\n-\t\tavail_idx += desc_count;\n-\t\tif (avail_idx >= vq->size)\n-\t\t\tavail_idx -= vq->size;\n-\n-\t\t*nr_descs += desc_count;\n-\t\t*num_buffers += 1;\n-\t}\n-\n-\t*nr_vec = vec_idx;\n-\n-\treturn 0;\n-}\n-\n static __rte_noinline void\n copy_vnet_hdr_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tstruct buf_vector *buf_vec,\n", "prefixes": [ "RFC", "13/13" ] }{ "id": 56220, "url": "